X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Fexpense_edit.tpl;h=d3a27375ccd574c5557f10a4e4fe2abc0cba7ac6;hb=e63eef54095a467d0dfd64646c6ef574bab09e89;hp=bcd393a5a7b0672da17c7c7087e6fd7195f9477d;hpb=f270b1e143509303e32f65c3dda3fbecaee56c6b;p=timetracker.git diff --git a/WEB-INF/templates/expense_edit.tpl b/WEB-INF/templates/expense_edit.tpl index bcd393a5..d3a27375 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} +{* 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) { @@ -150,6 +162,12 @@ function recalculateCost() { {$i18n.label.cost}: {$forms.expenseItemForm.cost.control} {$user->currency|escape} +{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))} + +   + + +{/if} {$i18n.label.date}: {$forms.expenseItemForm.date.control}