Remove isComplete option, always default to false

This commit is contained in:
Robbie Antenesse 2019-05-24 15:09:57 -06:00
parent 3667ee4345
commit b1140eebb7
3 changed files with 3 additions and 9 deletions

View File

@ -286,10 +286,6 @@
<input type="checkbox" id="editSortByDefinition"><br>
<small>Checking this box will sort the words in alphabetical order based on the Definition instead of the Word.</small>
</label>
<label>Mark Complete
<input type="checkbox" id="editIsComplete"><br>
<small>Checking this box will mark this as "complete" and prevent any changes from being made.</small>
</label>
<label>Make Public
<input type="checkbox" id="editIsPublic"><br>
<small>Checking this box will make this public via a link you can share with others.</small>

View File

@ -13,7 +13,7 @@ export function openEditModal() {
const { name, specification, description, partsOfSpeech } = window.currentDictionary;
const { consonants, vowels, blends, phonotactics } = window.currentDictionary.details.phonology;
const { orthography, grammar } = window.currentDictionary.details;
const { allowDuplicates, caseSensitive, sortByDefinition, isComplete, isPublic } = window.currentDictionary.settings;
const { allowDuplicates, caseSensitive, sortByDefinition, isPublic } = window.currentDictionary.settings;
document.getElementById('editName').value = name;
document.getElementById('editSpecification').value = specification;
@ -35,7 +35,6 @@ export function openEditModal() {
document.getElementById('editCaseSensitive').checked = caseSensitive;
if (allowDuplicates) document.getElementById('editCaseSensitive').disabled = true;
document.getElementById('editSortByDefinition').checked = sortByDefinition;
document.getElementById('editIsComplete').checked = isComplete;
document.getElementById('editIsPublic').checked = isPublic;
document.getElementById('editModal').style.display = '';
@ -62,7 +61,6 @@ export function saveEditModal() {
window.currentDictionary.settings.caseSensitive = document.getElementById('editCaseSensitive').checked;
const needsReSort = window.currentDictionary.settings.sortByDefinition !== document.getElementById('editSortByDefinition').checked;
window.currentDictionary.settings.sortByDefinition = document.getElementById('editSortByDefinition').checked;
window.currentDictionary.settings.isComplete = document.getElementById('editIsComplete').checked;
window.currentDictionary.settings.isPublic = document.getElementById('editIsPublic').checked;
addMessage('Saved ' + window.currentDictionary.specification + ' Successfully');

View File

@ -124,7 +124,7 @@ VALUES ($new_id, ?, ?, ?, ?)";
'allowDuplicates' => $result['allow_duplicates'] === '1' ? true : false,
'caseSensitive' => $result['case_sensitive'] === '1' ? true : false,
'sortByDefinition' => $result['sort_by_definition'] === '1' ? true : false,
'isComplete' => $result['is_complete'] === '1' ? true : false,
'isComplete' => false,
'isPublic' => $result['is_public'] === '1' ? true : false,
),
'lastUpdated' => is_null($result['last_updated']) ? $result['created_on'] : $result['last_updated'],
@ -156,7 +156,7 @@ WHERE user=$user AND id=$dictionary";
':allow_duplicates' => $dictionary_object['settings']['allowDuplicates'] ? 1 : 0,
':case_sensitive' => $dictionary_object['settings']['caseSensitive'] ? 1 : 0,
':sort_by_definition' => $dictionary_object['settings']['sortByDefinition'] ? 1 : 0,
':is_complete' => $dictionary_object['settings']['isComplete'] ? 1 : 0,
':is_complete' => 0,
':is_public' => $dictionary_object['settings']['isPublic'] ? 1 : 0,
':last_updated' => $dictionary_object['lastUpdated'],
':created_on' => $dictionary_object['createdOn'],