// define('READONLY_START_FINISH', false);
-// FUTURE_ENTRIES - defines whether users can create entries for future dates. Defaults to true.
-//
-// define('FUTURE_ENTRIES', false);
-
-
// WEEKEND_START_DAY
//
// This option defines which days are highlighted with weekend color.
var $task_required = 0; // Whether task selection is required on time entires.
var $record_type = 0; // Record type (duration vs start and finish, or both).
var $allow_overlap = 0; // Whether to allow overlapping time entries.
+ var $future_entries = 0; // Whether to allow creating future entries.
var $uncompleted_indicators = 0; // Uncompleted time entry indicators (show nowhere or on users page).
var $bcc_email = null; // Bcc email.
var $currency = null; // Currency.
// Set user config options.
$this->show_holidays = in_array('show_holidays', $config_array);
$this->allow_overlap = in_array('allow_overlap', $config_array);
+ $this->future_entries = in_array('future_entries', $config_array);
$this->uncompleted_indicators = in_array('uncompleted_indicators', $config_array);
// Set "on behalf" id and name.
$objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date);
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES) && $fields['browser_today']) {
+ if (!$user->future_entries && $fields['browser_today']) {
$objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']);
if ($objEntryDate->after($objBrowserToday)) {
$err->add($i18n->getKey('error.future_date'));
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'Varighed',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore',
'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'Dauer',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Erweiterungen',
'form.profile.type_start_finish' => 'start and finish',
'form.profile.type_duration' => 'duration',
'form.profile.allow_overlap' => 'Allow overlap',
+'form.profile.future_entries' => 'Future entries',
'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'مدت زمان',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'پلاگین ها',
'form.profile.type_duration' => 'kesto',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Lisäosat',
'form.profile.type_duration' => 'Durée',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'משך זמן',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'תוספים',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'durata',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
'form.profile.uncompleted_indicators' => 'Indicatori incompleti',
// TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps?
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'duur',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren',
'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'czas trwania',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Dodatkowe moduły',
'form.profile.type_duration' => 'duração',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_start_finish' => 'начало и конец',
'form.profile.type_duration' => 'длительность',
'form.profile.allow_overlap' => 'Возможное перекрывание',
+'form.profile.future_entries' => 'Будущие записи',
'form.profile.uncompleted_indicators' => 'Индикаторы незавершения',
'form.profile.plugins' => 'Плагины',
'form.profile.type_duration' => 'trvanie',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Doplnkové moduly',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
'form.profile.type_duration' => 'trajanje',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
'form.profile.plugins' => 'Dodaci',
'form.profile.type_duration' => 'Varaktighet',
// TODO: translate the following.
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering',
'form.profile.plugins' => 'Tillägg',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
// 'form.profile.type_start_finish' => 'start and finish',
// 'form.profile.type_duration' => 'duration',
// 'form.profile.allow_overlap' => 'Allow overlap',
+// 'form.profile.future_entries' => 'Future entries',
// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators',
// 'form.profile.plugins' => 'Plugins',
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.19.3991 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.20.3992 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<td align="right" nowrap>{$i18n.form.profile.allow_overlap}:</td>
<td>{$forms.profileForm.allow_overlap.control} <a href="https://www.anuko.com/lp/tt_16.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
</tr>
+ <tr>
+ <td align="right" nowrap>{$i18n.form.profile.future_entries}:</td>
+ <td>{$forms.profileForm.future_entries.control} <a href="https://www.anuko.com/lp/tt_17.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+ </tr>
<tr>
<td align="right" nowrap>{$i18n.form.profile.uncompleted_indicators}:</td>
<td>{$forms.profileForm.uncompleted_indicators.control} <a href="https://www.anuko.com/lp/tt_15.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
$new_date = new DateAndTime($user->date_format, $cl_date);
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($new_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
if (!ttValidFloat($cl_cost)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cost'));
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
$new_date = new DateAndTime($user->date_format, $cl_date);
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($new_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
if (!ttValidFloat($cl_cost)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cost'));
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
// Finished validating user input.
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
$new_date = new DateAndTime($user->date_format, $cl_date);
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($new_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
// Finished validating user input.
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
$cl_task_required = $request->getParameter('task_required');
$cl_record_type = $request->getParameter('record_type');
$cl_allow_overlap = $request->getParameter('allow_overlap');
+ $cl_future_entries = $request->getParameter('future_entries');
$cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators');
$cl_bcc_email = trim($request->getParameter('bcc_email'));
$cl_task_required = $user->task_required;
$cl_record_type = $user->record_type;
$cl_allow_overlap = $user->allow_overlap;
+ $cl_future_entries = $user->future_entries;
$cl_uncompleted_indicators = $user->uncompleted_indicators;
$cl_bcc_email = $user->bcc_email;
// Allow overlap checkbox.
$form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap));
+ // Future entries checkbox.
+ $form->addInput(array('type'=>'checkbox','name'=>'future_entries','value'=>$cl_future_entries));
+
// Uncompleted indicators checkbox.
$form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators));
$config .= ',show_holidays';
if ($cl_allow_overlap)
$config .= ',allow_overlap';
+ if ($cl_future_entries)
+ $config .= ',future_entries';
if ($cl_uncompleted_indicators)
$config .= ',uncompleted_indicators';
$config = trim($config, ',');
// Finished validating user input.
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));
$new_date = new DateAndTime($user->date_format, $cl_date);
// Prohibit creating entries in future.
- if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
+ if (!$user->future_entries) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($new_date->after($browser_today))
$err->add($i18n->getKey('error.future_date'));