X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Fexpense_edit.tpl;fp=WEB-INF%2Ftemplates%2Fexpense_edit.tpl;h=9e447a30be5e9bc87792d02f776267cdf548ed1e;hb=722638fd8cc9400c5228106537effa1dcd0f7fa5;hp=953f78d5e210582b8ce5c76347c1f522c9959b45;hpb=9396e4eb81c51af990a074c0042980e938612b59;p=timetracker.git diff --git a/WEB-INF/templates/expense_edit.tpl b/WEB-INF/templates/expense_edit.tpl index 953f78d5..9e447a30 100644 --- a/WEB-INF/templates/expense_edit.tpl +++ b/WEB-INF/templates/expense_edit.tpl @@ -34,6 +34,18 @@ var defined_expenses = new Array(); idx++; {/foreach} +// TODO: improve on conditional confirmSave. +// Existing entry date for confirm save warnings. +var original_date = "{$entry_date}"; + +function confirmSave() { + var date_on_save = document.getElementById("date").value; + if (original_date != date_on_save) { + return confirm("{$i18n.warn.confirm_save}"); + } +} +// TODO: improve on conditional confirmSave above. + // The fillProjectDropdown function populates the project combo box with // projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) {