Removed group selector from clients.php as design approach changed.
[timetracker.git] / WEB-INF / templates / expense_edit.tpl
index bcd393a..d3a2737 100644 (file)
@@ -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() {
       <td align="right">{$i18n.label.cost}:</td>
       <td>{$forms.expenseItemForm.cost.control} {$user->currency|escape}</td>
     </tr>
+{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))}
+    <tr>
+      <td align="right">&nbsp;</td>
+      <td><label>{$forms.expenseItemForm.paid.control}{$i18n.label.paid}</label></td>
+    </tr>
+{/if}
     <tr>
       <td align="right">{$i18n.label.date}:</td>
       <td>{$forms.expenseItemForm.date.control}</td>