Version fix in mysql.sql.
[timetracker.git] / WEB-INF / templates / time_edit.tpl
index 9a13d4c..66778e1 100644 (file)
@@ -1,5 +1,19 @@
 {include file="time_script.tpl"}
 
+{* Conditional include of confirmSave handler. *}
+{if $confirm_save}
+<script>
+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}");
+  }
+}
+</script>
+{/if}
+
 {$forms.timeRecordForm.open}
 <table cellspacing="4" cellpadding="7" border="0">
 <tr>
       <td><label>{$forms.timeRecordForm.billable.control}{$i18n.form.time.billable}</label></td>
     </tr>
 {/if}
+{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))}
+    <tr>
+      <td align="right">&nbsp;</td>
+      <td><label>{$forms.timeRecordForm.paid.control}{$i18n.label.paid}</label></td>
+    </tr>
+{/if}
 {if ($custom_fields && $custom_fields->fields[0])} 
     <tr>
       <td align="right">{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:</td><td>{$forms.timeRecordForm.cf_1.control}</td>
@@ -33,7 +53,7 @@
 {/if}
 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
     <tr>
-      <td align="right">{$i18n.label.task}:</td>
+      <td align="right">{$i18n.label.task}{if $user->task_required} (*){/if}:</td>
       <td>{$forms.timeRecordForm.task.control}</td>
     </tr>
 {/if}
       <td align="right">{$i18n.label.date}:</td>
       <td>{$forms.timeRecordForm.date.control}</td>
     </tr>
+{if $template_dropdown}
+    <tr>
+      <td align="right">{$i18n.label.template}:</td>
+      <td>{$forms.timeRecordForm.template.control}</td>
+    </tr>
+{/if}
     <tr>
       <td align="right">{$i18n.label.note}:</td>
       <td>{$forms.timeRecordForm.note.control}</td>