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 $confirm_save = 0; // Whether to show warnings for save action when date changed.
var $bcc_email = null; // Bcc email.
var $allow_ip = null; // Specification from where user is allowed access.
var $password_complexity = null; // Password complexity example.
$this->custom_logo = $val['custom_logo'];
*/
$this->config = $val['config'];
- /*
$config = new ttConfigHelper($this->config);
// Set user config options.
$this->show_holidays = $config->getDefinedValue('show_holidays');
$this->allow_overlap = $config->getDefinedValue('allow_overlap');
$this->future_entries = $config->getDefinedValue('future_entries');
$this->uncompleted_indicators = $config->getDefinedValue('uncompleted_indicators');
+ $this->confirm_save = $config->getDefinedValue('confirm_save');
+ /*
if ($this->isPluginEnabled('wu')) {
$minutes_in_unit = $config->getIntValue('minutes_in_unit');
if ($minutes_in_unit) $this->minutes_in_unit = $minutes_in_unit;
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 $confirm_save = 1; // Work in progress. TODO: change default to 0 and get from group config upon init.
+ var $confirm_save = 0; // Whether to show warnings for save action when date changed.
var $bcc_email = null; // Bcc email.
var $allow_ip = null; // Specification from where user is allowed access.
var $password_complexity = null; // Password complexity example.
$this->allow_overlap = $config->getDefinedValue('allow_overlap');
$this->future_entries = $config->getDefinedValue('future_entries');
$this->uncompleted_indicators = $config->getDefinedValue('uncompleted_indicators');
+ $this->confirm_save = $config->getDefinedValue('confirm_save');
if ($this->isPluginEnabled('wu')) {
$minutes_in_unit = $config->getIntValue('minutes_in_unit');
if ($minutes_in_unit) $this->minutes_in_unit = $minutes_in_unit;
// getConfirmSave returns confirm_save option for user.
function getConfirmSave() {
- return true; // TODO: implement this properly.
- // return ($this->behalfGroup ? $this->behalfGroup->config : $this->config);
+ return ($this->behalfGroup ? $this->behalfGroup->confirm_save : $this->confirm_save);
}
// can - determines whether user has a right to do something.
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.future_entries' => 'Future entries',
'form.group_edit.uncompleted_indicators' => 'Uafsluttede indikatore',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
'form.group_edit.future_entries' => 'Einträge in der Zukunft',
'form.group_edit.uncompleted_indicators' => 'Zeige unfertige Einträge',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
'form.group_edit.allow_ip' => 'Erlaube IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
'form.group_edit.allow_overlap' => 'Allow overlap',
'form.group_edit.future_entries' => 'Future entries',
'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-'form.group_edit.copy_warning' => 'Warn on copy',
+'form.group_edit.confirm_save' => 'Confirm saving',
'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
'form.group_edit.future_entries' => 'Μελλοντικές καταχωρήσεις',
'form.group_edit.uncompleted_indicators' => 'Μη ολοκληρωμένες ενδείξεις',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.future_entries' => 'Future entries',
'form.group_edit.uncompleted_indicators' => 'Indicatori incompleti',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
'form.group_edit.future_entries' => 'Toevoegingen toestaan in de toekomst',
'form.group_edit.uncompleted_indicators' => 'Onvolledige indicatoren',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
'form.group_edit.allow_ip' => 'Toegestane IP adressen',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
'form.group_edit.allow_overlap' => 'Возможное перекрывание',
'form.group_edit.future_entries' => 'Будущие записи',
'form.group_edit.uncompleted_indicators' => 'Индикаторы незавершения',
-'form.group_edit.copy_warning' => 'Предупреждать при копировании',
+'form.group_edit.confirm_save' => 'Предупреждать при сохранении',
'form.group_edit.allow_ip' => 'Разрешить доступ с IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.future_entries' => 'Future entries',
'form.group_edit.uncompleted_indicators' => 'Indikatorer för oavslutad registrering',
// TODO: translate the following.
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
// 'form.group_edit.allow_overlap' => 'Allow overlap',
// 'form.group_edit.future_entries' => 'Future entries',
// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators',
-// 'form.group_edit.copy_warning' => 'Warn on copy',
+// 'form.group_edit.confirm_save' => 'Confirm saving',
// 'form.group_edit.allow_ip' => 'Allow IP',
// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.28.4552 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4553 | 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.group_edit.uncompleted_indicators}:</td>
<td>{$forms.groupForm.uncompleted_indicators.control} <a href="https://www.anuko.com/lp/tt_15.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
</tr>
+ <tr>
+ <td align="right" nowrap>{$i18n.form.group_edit.confirm_save}:</td>
+ <td>{$forms.groupForm.confirm_save.control} <a href="https://www.anuko.com/lp/tt_26.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+ </tr>
{if $user->can('manage_advanced_settings')}
<tr>
<td align="right" nowrap>{$i18n.label.bcc}:</td>
$cl_allow_overlap = $request->getParameter('allow_overlap');
$cl_future_entries = $request->getParameter('future_entries');
$cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators');
+ $cl_confirm_save = $request->getParameter('confirm_save');
$cl_bcc_email = trim($request->getParameter('bcc_email'));
$cl_allow_ip = trim($request->getParameter('allow_ip'));
} else {
$cl_allow_overlap = $config->getDefinedValue('allow_overlap');
$cl_future_entries = $config->getDefinedValue('future_entries');
$cl_uncompleted_indicators = $config->getDefinedValue('uncompleted_indicators');
+ $cl_confirm_save = $config->getDefinedValue('confirm_save');
$cl_bcc_email = $group['bcc_email'];
$cl_allow_ip = $group['allow_ip'];
}
// Uncompleted indicators checkbox.
$form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators));
+// Confirm save checkbox.
+$form->addInput(array('type'=>'checkbox','name'=>'confirm_save','value'=>$cl_confirm_save));
+
// Add bcc email control.
if ($advanced_settings) {
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'bcc_email','value'=>$cl_bcc_email));
$config->setDefinedValue('allow_overlap', $cl_allow_overlap);
$config->setDefinedValue('future_entries', $cl_future_entries);
$config->setDefinedValue('uncompleted_indicators', $cl_uncompleted_indicators);
+ $config->setDefinedValue('confirm_save', $cl_confirm_save);
if ($user->updateGroup(array(
'group_id' => $group_id,