X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Fmobile%2Fexpense_edit.tpl;h=97140507930e344559fbafb212fb66ac43a2a169;hb=aeb30899d6ec142220d83b34fd8f6c68c05e8e90;hp=ea29723810366b6d1e9297f71a84d1cee3d77122;hpb=ad98b13400fdc2fa2299a22c9bd54c4cd27960c3;p=timetracker.git diff --git a/WEB-INF/templates/mobile/expense_edit.tpl b/WEB-INF/templates/mobile/expense_edit.tpl index ea297238..97140507 100644 --- a/WEB-INF/templates/mobile/expense_edit.tpl +++ b/WEB-INF/templates/mobile/expense_edit.tpl @@ -34,6 +34,18 @@ var defined_expenses = new Array(); idx++; {/foreach} +{* Conditional include of confirmSave handler. *} +{if $confirm_save} +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}"); + } +} +{/if} + // 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) {