diff --git a/BudgetMasterServer/src/main/resources/languages/base_de.properties b/BudgetMasterServer/src/main/resources/languages/base_de.properties index 76fa8dfda827112ff63dc0c0b7eae5f3ee2ab0ec..32adf22bfcfb6dec74359beb93436292a2ea3bb0 100644 --- a/BudgetMasterServer/src/main/resources/languages/base_de.properties +++ b/BudgetMasterServer/src/main/resources/languages/base_de.properties @@ -78,12 +78,12 @@ save.as.template.errorsInForm=Vorlage konnte nicht erstellt werden, da Fehler im transaction.change.type=Buchungstyp ändern transaction.change.type.warning=Hinweis: Nicht gespeicherte Änderungen gehen verloren! transaction.change.type.new=Neuer Buchungstyp -transaction.warning.name.keyword.title=Schlüsselwort erkannt +transaction.warning.name.keyword.title=Buchung wirklich als Ausgabe speichern? transaction.warning.name.keyword.description.part1=Der Titel der Buchung enthält das Schlüsselwort -transaction.warning.name.keyword.description.part2=ist jedoch nicht als Einnahme markiert.<br><br>Hast du vielleicht vergessen die Buchung als Einnahme zu markieren? -transaction.warning.name.keyword.button.ignore=Als Ausgabe speichern -transaction.warning.name.keyword.button.cancel=Anpassen -transaction.warning.name.keyword.button.edit=Schlüsselwörter editieren (neuer Tab) +transaction.warning.name.keyword.description.part2=ist jedoch nicht als Einnahme markiert. +transaction.warning.name.keyword.button.ignore=Ja +transaction.warning.name.keyword.button.cancel=Abbrechen +transaction.warning.name.keyword.button.edit=Schlüsselwörter editieren template.group.default=Ungruppiert # WEEK DAYS diff --git a/BudgetMasterServer/src/main/resources/languages/base_en.properties b/BudgetMasterServer/src/main/resources/languages/base_en.properties index 0fd62daaadc26c5ad070e0bee97f9717d12bc6c4..c660b5d9d8a5d7ce3cc2c94c0ded65bd50d58681 100644 --- a/BudgetMasterServer/src/main/resources/languages/base_en.properties +++ b/BudgetMasterServer/src/main/resources/languages/base_en.properties @@ -79,12 +79,12 @@ save.as.template.errorsInForm=Template could not be created because errors exist transaction.change.type=Change type transaction.change.type.warning=Note: Unsaved changes will be lost! transaction.change.type.new=New type -transaction.warning.name.keyword.title=Keyword detected +transaction.warning.name.keyword.title=Really save transaction as expenditure? transaction.warning.name.keyword.description.part1=The transaction tile contains the keyword -transaction.warning.name.keyword.description.part2=but is not marked as income.<br><br>Did you possibly forget to mark the transaction as income? -transaction.warning.name.keyword.button.ignore=Save as expenditure -transaction.warning.name.keyword.button.cancel=Edit -transaction.warning.name.keyword.button.edit=Edit keywords (new tab) +transaction.warning.name.keyword.description.part2=but is not marked as income. +transaction.warning.name.keyword.button.ignore=Yes +transaction.warning.name.keyword.button.cancel=Cancel +transaction.warning.name.keyword.button.edit=Edit keywords template.group.default=Not grouped # WEEK DAYS diff --git a/BudgetMasterServer/src/main/resources/static/css/transactions.css b/BudgetMasterServer/src/main/resources/static/css/transactions.css index e56625df8dbd8f218fe7572acda6ef4499bf2125..dba193019645faa078f250278f428773261d1641 100644 --- a/BudgetMasterServer/src/main/resources/static/css/transactions.css +++ b/BudgetMasterServer/src/main/resources/static/css/transactions.css @@ -133,4 +133,8 @@ font-weight: bold; border-bottom: 2px solid var(--color-text); padding: 0.3rem 0.5rem; +} + +#modalTransactionNameKeywordWarning { + width: 40%; } \ No newline at end of file diff --git a/BudgetMasterServer/src/main/resources/static/js/transactions.js b/BudgetMasterServer/src/main/resources/static/js/transactions.js index 9954335030c8e0993c52de1cbcc145dd4e5c8c3d..78480e064d84f5cc45c9156b4b6cf42aed0e0084 100644 --- a/BudgetMasterServer/src/main/resources/static/js/transactions.js +++ b/BudgetMasterServer/src/main/resources/static/js/transactions.js @@ -386,7 +386,7 @@ function validateForm(isSaveAndContinue = false, allowEmptyAmount = false, skipK { // name (keyword check) let isExpenditureSwitch = document.getElementById('input-isPayment'); - let isExpenditure = isExpenditureSwitch !== null && isExpenditureSwitch.value === "1"; + let isExpenditure = isExpenditureSwitch !== null && (isExpenditureSwitch.value === "1" || isExpenditureSwitch.value === "true"); if(!skipKeywordCheck && isExpenditure) { let nameContainsKeywords = checkNameForKeywords(isSaveAndContinue); diff --git a/BudgetMasterServer/src/main/resources/templates/transactions/transactionNameKeywordWarningModal.ftl b/BudgetMasterServer/src/main/resources/templates/transactions/transactionNameKeywordWarningModal.ftl index 173e58c629b6b7afb49f778d2da30ca74dd5ae4a..15840d31e6347d0b281e496fe17af7e00c04b20f 100644 --- a/BudgetMasterServer/src/main/resources/templates/transactions/transactionNameKeywordWarningModal.ftl +++ b/BudgetMasterServer/src/main/resources/templates/transactions/transactionNameKeywordWarningModal.ftl @@ -13,16 +13,13 @@ ${locale.getString("transaction.warning.name.keyword.description.part2")} </div> </div> - - <div class="row"> - <div class="col s12"> - <@header.buttonLink url='/settings' icon='rule_folder' localizationKey='transaction.warning.name.keyword.button.edit' color='background-blue' classes='text-white' target='_blank'/> - </div> - </div> </div> <div class="modal-footer background-color"> - <@header.buttonLink id='keyword-warning-button-ignore' url='' icon='save' localizationKey='transaction.warning.name.keyword.button.ignore' color='red' classes='text-white' noUrl=true/> - <@header.buttonLink id='keyword-warning-button-cancel' url='' icon='edit' localizationKey='transaction.warning.name.keyword.button.cancel' color='green' classes='modal-action modal-close text-white' noUrl=true/> + <div class="left"> + <@header.buttonLink url='/settings' icon='rule_folder' localizationKey='transaction.warning.name.keyword.button.edit' color='background-blue' classes='text-white modal-' target='_blank'/> + </div> + <@header.buttonLink id='keyword-warning-button-cancel' url='' icon='clear' localizationKey='transaction.warning.name.keyword.button.cancel' color='red' classes='modal-action modal-close text-white' noUrl=true/> + <@header.buttonLink id='keyword-warning-button-ignore' url='' icon='save' localizationKey='transaction.warning.name.keyword.button.ignore' color='green' classes='text-white' noUrl=true/> </div> </div>