diff --git a/src/main/resources/templates/accounts/accounts.ftl b/src/main/resources/templates/accounts/accounts.ftl index 604721dd34ce44c5df805a790a12cec903e4a351..449262113b6738dfc5ae2b0179091a4393860303 100644 --- a/src/main/resources/templates/accounts/accounts.ftl +++ b/src/main/resources/templates/accounts/accounts.ftl @@ -56,7 +56,7 @@ </main> <#if currentAccount??> - <@header.modalConfirmDelete title=locale.getString("info.title.account.delete") confirmUrl='/accounts' cancelUrlBase="/accounts" itemId=currentAccount.getID() confirmButtonText=locale.getString("info.button.account.delete")> + <@header.modalConfirmDelete title=locale.getString("info.title.account.delete") confirmUrl='/accounts' cancelUrlBase="/accounts" itemId=currentAccount.getID() confirmButtonTextKey="info.button.account.delete"> <p>${locale.getString("info.text.account.delete", currentAccount.getName(), currentAccount.getReferringTransactions()?size)}</p> </@header.modalConfirmDelete> </#if> @@ -69,7 +69,7 @@ <p>${locale.getString("warning.text.account.delete", currentAccount.getName())}</p> </div> <div class="modal-footer background-color"> - <a href="<@s.url '/accounts'/>" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${locale.getString("ok")}</a> + <@header.buttonLink url='/accounts' icon='done' localizationKey='ok' color='green' id='buttonCloseWhatsNew' classes='modal-action modal-close text-white'/> </div> </div> </#if> diff --git a/src/main/resources/templates/categories/categories.ftl b/src/main/resources/templates/categories/categories.ftl index 7e1ce1490af97fc2109dfaa85ba7e269efa34094..200d46b6b951602cba9f3054053fd762c651ebfd 100644 --- a/src/main/resources/templates/categories/categories.ftl +++ b/src/main/resources/templates/categories/categories.ftl @@ -74,8 +74,8 @@ </div> <div class="modal-footer background-color"> - <a href="<@s.url '/categories'/>" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> - <a id="buttonDeleteCategory" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${locale.getString("delete")}</a> + <@header.buttonLink url='/categories' icon='clear' localizationKey='cancel' color='red' classes='modal-action modal-close text-white'/> + <@header.buttonLink url='' icon='delete' localizationKey='delete' color='green' id='buttonDeleteCategory' classes='modal-action modal-close text-white' noUrl=true/> </div> </div> </#if> diff --git a/src/main/resources/templates/charts/manage.ftl b/src/main/resources/templates/charts/manage.ftl index 5538a64287e5b87e9dc2d8a246494fdbc536426e..9a3aa850113908d20d0cfcca4d64a231ed039cb3 100644 --- a/src/main/resources/templates/charts/manage.ftl +++ b/src/main/resources/templates/charts/manage.ftl @@ -57,7 +57,7 @@ </div> <#if currentChart??> - <@header.modalConfirmDelete title=locale.getString("info.title.chart.delete") confirmUrl='/charts/manage' cancelUrlBase='/charts' itemId=currentChart.getID() confirmButtonText=locale.getString("info.title.chart.delete")> + <@header.modalConfirmDelete title=locale.getString("info.title.chart.delete") confirmUrl='/charts/manage' cancelUrlBase='/charts' itemId=currentChart.getID() confirmButtonTextKey='info.title.chart.delete'> <p>${locale.getString("info.text.chart.delete", currentChart.getName())}</p> </@header.modalConfirmDelete> </#if> diff --git a/src/main/resources/templates/filter/filterMacros.ftl b/src/main/resources/templates/filter/filterMacros.ftl index 7404376988b38b0624de1645fbd06a25091c8d61..35f871588114d8c8299df0967bb8bc26d4f7200d 100644 --- a/src/main/resources/templates/filter/filterMacros.ftl +++ b/src/main/resources/templates/filter/filterMacros.ftl @@ -90,7 +90,7 @@ </form> </div> <div class="modal-footer background-color"> - <a href="" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> + <@header.buttonLink url='' icon='clear' localizationKey='cancel' color='red' classes='modal-action modal-close text-white'/> </div> </div> </#macro> @@ -103,7 +103,7 @@ <@buttonsCharts/> </div> <div class="modal-footer background-color"> - <a class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> + <@header.buttonLink url='' icon='clear' localizationKey='cancel' color='red' classes='modal-action modal-close text-white'/> </div> </div> </#macro> diff --git a/src/main/resources/templates/helpers/globalDatePicker.ftl b/src/main/resources/templates/helpers/globalDatePicker.ftl index a6f23cffa1ed0e57c9935fce2ccea6f5c0798d3a..38c9c8c5a1824b5f7748cf6ff523ae7e7ef85d3c 100644 --- a/src/main/resources/templates/helpers/globalDatePicker.ftl +++ b/src/main/resources/templates/helpers/globalDatePicker.ftl @@ -25,8 +25,8 @@ </div> </div> <div class="modal-footer background-color"> - <a href="#" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> - <a href="<@s.url '/setDate?target=${target}'/>" id="buttonChooseDate" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${locale.getString("ok")}</a> + <@header.buttonLink url='' icon='clear' localizationKey='cancel' color='red' classes='modal-action modal-close text-white'/> + <@header.buttonLink url='/setDate?target=' + target icon='done' localizationKey='ok' color='green' id='buttonChooseDate' classes='modal-action modal-close text-white' noUrl=true/> </div> </div> </#macro> diff --git a/src/main/resources/templates/helpers/header.ftl b/src/main/resources/templates/helpers/header.ftl index e16b6d2fb6c114253470314037d959b5bbe0109c..28b2859bdaae741ad3b4183579b756b0f8c2589b 100644 --- a/src/main/resources/templates/helpers/header.ftl +++ b/src/main/resources/templates/helpers/header.ftl @@ -40,7 +40,7 @@ </#if> </#macro> -<#macro modalConfirmDelete title confirmUrl cancelUrlBase itemId confirmButtonText id="modalConfirmDelete" classes=""> +<#macro modalConfirmDelete title confirmUrl cancelUrlBase itemId confirmButtonTextKey id="modalConfirmDelete" classes=""> <div id="${id}" class="modal background-color ${classes}"> <div class="modal-content"> <h4>${title}</h4> @@ -48,8 +48,8 @@ <#nested> </div> <div class="modal-footer background-color"> - <a href="<@s.url confirmUrl/>" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> - <a href="<@s.url cancelUrlBase + "/" + itemId?c + "/delete" />" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${confirmButtonText}</a> + <@buttonLink url=confirmUrl icon='clear' localizationKey='cancel' color='red' classes='modal-action modal-close text-white'/> + <@buttonLink url=cancelUrlBase + '/' + itemId?c + '/delete' icon='delete' localizationKey=confirmButtonTextKey color='green' classes='modal-action modal-close text-white'/> </div> </div> </#macro> diff --git a/src/main/resources/templates/helpers/navbar.ftl b/src/main/resources/templates/helpers/navbar.ftl index cea30f735404371a78aa0aa04b820345ae94b830..2fbbcf568a3a94a2bf44ca7c3dc4c366c388b0b9 100644 --- a/src/main/resources/templates/helpers/navbar.ftl +++ b/src/main/resources/templates/helpers/navbar.ftl @@ -148,8 +148,8 @@ <p>${locale.getString("info.text.backup.reminder")}</p> </div> <div class="modal-footer background-color"> - <a href="<@s.url '/backupReminder/cancel'/>" id="buttonCloseReminder" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a> - <a href="<@s.url '/backupReminder/settings'/>" class="modal-action modal-close waves-effect waves-light green btn-flat white-text">${locale.getString("info.button.backup.reminder")}</a> + <@header.buttonLink url='/backupReminder/cancel' icon='clear' localizationKey='cancel' color='red' id='buttonCloseReminder' classes='modal-action modal-close text-white'/> + <@header.buttonLink url='/backupReminder/settings' icon='cogs' localizationKey='cancel' color='green' id='buttonCloseReminder' classes='info.button.backup.reminder'/> </div> </div> </#if> diff --git a/src/main/resources/templates/templates/templates.ftl b/src/main/resources/templates/templates/templates.ftl index eadd163bca37de269cdd0aecd923aadf84549b17..7697670af0c7c7de10ddbf866725ade0a4299713 100644 --- a/src/main/resources/templates/templates/templates.ftl +++ b/src/main/resources/templates/templates/templates.ftl @@ -41,7 +41,7 @@ </div> <#if currentTemplate??> - <@header.modalConfirmDelete title=locale.getString("info.title.template.delete") confirmUrl='/templates' cancelUrlBase='/templates' itemId=currentTemplate.getID() confirmButtonText=locale.getString("info.title.template.delete")> + <@header.modalConfirmDelete title=locale.getString("info.title.template.delete") confirmUrl='/templates' cancelUrlBase='/templates' itemId=currentTemplate.getID() confirmButtonTextKey='info.title.template.delete'> <p>${locale.getString("info.text.template.delete", currentTemplate.getTemplateName())}</p> </@header.modalConfirmDelete> </#if> diff --git a/src/main/resources/templates/transactions/transactions.ftl b/src/main/resources/templates/transactions/transactions.ftl index 8b90c30ea94fc4cf599548a7b50a08840f2f9eff..5784e5a4f0a6b3ca0dec90023f76627e296bd439 100644 --- a/src/main/resources/templates/transactions/transactions.ftl +++ b/src/main/resources/templates/transactions/transactions.ftl @@ -88,7 +88,7 @@ </div> <#if currentTransaction??> - <@header.modalConfirmDelete title=locale.getString("info.title.transaction.delete") confirmUrl='/transactions' cancelUrlBase='/transactions' itemId=currentTransaction.getID() confirmButtonText=locale.getString("delete")> + <@header.modalConfirmDelete title=locale.getString("info.title.transaction.delete") confirmUrl='/transactions' cancelUrlBase='/transactions' itemId=currentTransaction.getID() confirmButtonTextKey='delete'> <#if currentTransaction.isRepeating()> <p>${locale.getString("info.text.transaction.repeating.delete", currentTransaction.name)}</p> <#else> diff --git a/src/main/resources/templates/whatsNewModal.ftl b/src/main/resources/templates/whatsNewModal.ftl index 93a3abdc81d8d5e3a048380626a04084b1c61d13..1619f3297320cb775d2cfe637942de60658661e8 100644 --- a/src/main/resources/templates/whatsNewModal.ftl +++ b/src/main/resources/templates/whatsNewModal.ftl @@ -35,7 +35,7 @@ </div> </div> <div class="modal-footer background-color"> - <@header.buttonLink url='/about/whatsNewModal/close' icon='done' localizationKey='ok' id='buttonCloseWhatsNew' classes='modal-action modal-close green text-white'/> + <@header.buttonLink url='/about/whatsNewModal/close' icon='done' localizationKey='ok' color='green' id='buttonCloseWhatsNew' classes='modal-action modal-close text-white'/> </div> </div>