Skip to content
Snippets Groups Projects
Commit 71a73350 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#677 - only check for keywords if transactions is marked as expenditure

parent 62c23f47
Branches
Tags
No related merge requests found
...@@ -385,7 +385,8 @@ function convertDateWithoutDots(dateString) ...@@ -385,7 +385,8 @@ function convertDateWithoutDots(dateString)
function validateForm(isSaveAndContinue = false, allowEmptyAmount = false, skipKeywordCheck = false) function validateForm(isSaveAndContinue = false, allowEmptyAmount = false, skipKeywordCheck = false)
{ {
// name (keyword check) // name (keyword check)
if(!skipKeywordCheck) let isExpenditure = document.getElementById('input-isPayment').value === "1";
if(!skipKeywordCheck && isExpenditure)
{ {
let nameContainsKeywords = checkNameForKeywords(isSaveAndContinue); let nameContainsKeywords = checkNameForKeywords(isSaveAndContinue);
if(nameContainsKeywords) if(nameContainsKeywords)
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<@header.buttonLink url='/settings' icon='rule_folder' localizationKey='transaction.warning.name.keyword.button.edit' color='background-blue' id='buttonChangeTransactionType' classes='text-white' target='_blank'/> <@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>
</div> </div>
<div class="modal-footer background-color"> <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-ignore' url='' icon='save' localizationKey='transaction.warning.name.keyword.button.ignore' color='red' classes='text-white' noUrl=true/>
<@header.buttonLink url='' icon='edit' localizationKey='transaction.warning.name.keyword.button.cancel' color='green' id='buttonChangeTransactionType' classes='modal-action modal-close 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> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment