diff --git a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsBackup.ftl b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsBackup.ftl index 02992a4d6944d790f2ce623ff4c6bfb3a09f6154..71bce505ddbdd61f77950ba3bf7c74e84053f963 100644 --- a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsBackup.ftl +++ b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsBackup.ftl @@ -7,7 +7,7 @@ <#import "../settingsMacros.ftl" as settingsMacros> <#macro backupSettingsContainer importScripts settings> - <@settingsContainerMacros.settingsContainer 'BackupSettingsContainer' 'backupSettingsContainer' importScripts '/settings/save/backup' 'validateBackupForm()'> + <@settingsContainerMacros.settingsContainer 'BackupSettingsContainer' 'backupSettingsContainer' importScripts '/settings/save/backup'> <div class="row"> <div class="col s12"> <div class="table-container"> @@ -38,7 +38,7 @@ <div class="row"> <div class="col s12 center-align"> - <@header.buttonSubmit name='action' icon='save' localizationKey='save' color='background-green'/> + <@header.buttonSubmit name='action' icon='save' localizationKey='save' color='background-green' onclick='return validateBackupForm()'/> </div> </div> diff --git a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsContainer.ftl b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsContainer.ftl index a9f7cf5d93fdc20fd0925a68b9efe89d62d089df..9e5df4dee203aa52f1c4077936eb74afc7f18336 100644 --- a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsContainer.ftl +++ b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsContainer.ftl @@ -1,7 +1,7 @@ <#import "/spring.ftl" as s> -<#macro settingsContainer formName containerId importScripts actionUrl validateForm=''> - <form name="${formName}" method="post" <#if validateForm??>onsubmit="return ${validateForm}"</#if> action="<@s.url actionUrl/>"> +<#macro settingsContainer formName containerId importScripts actionUrl> + <form name="${formName}" method="post" action="<@s.url actionUrl/>"> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" id="token"/> <#nested> diff --git a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsTransactions.ftl b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsTransactions.ftl index a11f2e53fc72102d9f8014e96b46600bc18dfbb4..c5c9a173c5f32f12b8a683d6f340efbf3ef6f336 100644 --- a/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsTransactions.ftl +++ b/BudgetMasterServer/src/main/resources/templates/settings/containers/settingsTransactions.ftl @@ -7,7 +7,7 @@ <#import "../settingsMacros.ftl" as settingsMacros> <#macro transactionsSettingsContainer importScripts settings> - <@settingsContainerMacros.settingsContainer 'TransactionsSettingsContainer' 'transactionsSettingsContainer' importScripts '/settings/save/transactions' 'validateTransactionForm()'> + <@settingsContainerMacros.settingsContainer 'TransactionsSettingsContainer' 'transactionsSettingsContainer' importScripts '/settings/save/transactions'> <div class="row"> <div class="col s12"> <div class="table-container"> @@ -64,7 +64,7 @@ <div class="row"> <div class="col s12 center-align"> - <@header.buttonSubmit name='action' icon='save' localizationKey='save' color='background-green'/> + <@header.buttonSubmit name='action' icon='save' localizationKey='save' color='background-green' onclick='return validateTransactionForm()'/> </div> </div> @@ -95,7 +95,7 @@ parent.appendChild(input); } - return false; + return true; } $('input[name="restActivated"]').change(function()