1 {include file="time_script.tpl"}
 
   3 {* Conditional include of confirmSave handler. *}
 
   6 var original_date = "{$entry_date}";
 
   8 function confirmSave() {
 
   9   var date_on_save = document.getElementById("date").value;
 
  10   if (original_date != date_on_save) {
 
  11     return confirm("{$i18n.warn.confirm_save}");
 
  17 {$forms.timeRecordForm.open}
 
  18 <table cellspacing="4" cellpadding="7" border="0">
 
  21   <table width = "100%">
 
  25 {if $user->isPluginEnabled('cl')}
 
  27       <td align="right">{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:</td>
 
  28       <td>{$forms.timeRecordForm.client.control}</td>
 
  31 {if $user->isPluginEnabled('iv')}
 
  33       <td align="right"> </td>
 
  34       <td><label>{$forms.timeRecordForm.billable.control}{$i18n.form.time.billable}</label></td>
 
  37 {if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))}
 
  39       <td align="right"> </td>
 
  40       <td><label>{$forms.timeRecordForm.paid.control}{$i18n.label.paid}</label></td>
 
  43 {if ($custom_fields && $custom_fields->fields[0])} 
 
  45       <td align="right">{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:</td><td>{$forms.timeRecordForm.cf_1.control}</td>
 
  48 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
 
  50       <td align="right">{$i18n.label.project} (*):</td>
 
  51       <td>{$forms.timeRecordForm.project.control}</td>
 
  54 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
 
  56       <td align="right">{$i18n.label.task}{if $user->task_required} (*){/if}:</td>
 
  57       <td>{$forms.timeRecordForm.task.control}</td>
 
  60 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
 
  62       <td align="right">{$i18n.label.start}:</td>
 
  63       <td>{$forms.timeRecordForm.start.control} <input onclick="setNow('start');" type="button" tabindex="-1" value="{$i18n.button.now}"></td>
 
  66       <td align="right">{$i18n.label.finish}:</td>
 
  67       <td>{$forms.timeRecordForm.finish.control} <input onclick="setNow('finish');" type="button" tabindex="-1" value="{$i18n.button.now}"></td>
 
  70 {if (($smarty.const.TYPE_DURATION == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
 
  72       <td align="right">{$i18n.label.duration}:</td>
 
  73       <td>{$forms.timeRecordForm.duration.control} {if $user->decimal_mark == ','}{str_replace('.', ',', $i18n.form.time.duration_format)}{else}{$i18n.form.time.duration_format}{/if}</td>
 
  77       <td align="right">{$i18n.label.date}:</td>
 
  78       <td>{$forms.timeRecordForm.date.control}</td>
 
  80 {if $template_dropdown}
 
  82       <td align="right">{$i18n.label.template}:</td>
 
  83       <td>{$forms.timeRecordForm.template.control}</td>
 
  87       <td align="right">{$i18n.label.note}:</td>
 
  88       <td>{$forms.timeRecordForm.note.control}</td>
 
  91       <td colspan="2"> </td>
 
  95       <td align="left">{$forms.timeRecordForm.btn_save.control} {$forms.timeRecordForm.btn_copy.control} {$forms.timeRecordForm.btn_delete.control}</td>
 
 104 {$forms.timeRecordForm.close}