From a8d2a373388113fc60233feda3b971c4d67e6211 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Nov 2018 23:28:06 +0000 Subject: [PATCH] Implemented configurable confirm save option. --- WEB-INF/lib/ttGroup.class.php | 4 +++- WEB-INF/lib/ttUser.class.php | 6 +++--- WEB-INF/resources/ca.lang.php | 2 +- WEB-INF/resources/cs.lang.php | 2 +- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 2 +- WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/gr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 +- WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 +- WEB-INF/resources/sv.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 2 +- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/group_edit.tpl | 4 ++++ group_edit.php | 6 ++++++ 35 files changed, 47 insertions(+), 35 deletions(-) diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index e232a0e1..86536349 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -50,6 +50,7 @@ class ttGroup { 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. @@ -104,7 +105,6 @@ class ttGroup { $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'); @@ -112,6 +112,8 @@ class ttGroup { $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; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 692d80ef..7a102a27 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -60,7 +60,7 @@ class ttUser { 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. @@ -144,6 +144,7 @@ class ttUser { $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; @@ -204,8 +205,7 @@ class ttUser { // 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. diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 2b0b17bd..68c6e6a9 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -532,7 +532,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7150a6fb..bcda7401 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -546,7 +546,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index bad0297c..45cf377e 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -496,7 +496,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index cc280065..80c78537 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -468,7 +468,7 @@ $i18n_key_words = array( '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 diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1d27ce90..fee9fdbf 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -465,7 +465,7 @@ $i18n_key_words = array( '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 diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c82df5b5..aa642554 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -546,7 +546,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e6d2dbe8..a61a1305 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -543,7 +543,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 412345f1..86f3930d 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -518,7 +518,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 1dcc1708..4687e6f5 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -503,7 +503,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 6900fa7b..ad77095c 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -492,7 +492,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index ce382635..f4859df7 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -477,7 +477,7 @@ $i18n_key_words = array( '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 diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index d955c857..d7abe002 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -527,7 +527,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 884db355..0e0e4522 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -537,7 +537,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 8c9a07da..ce1ab88c 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -492,7 +492,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 5211d068..431915fd 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -540,7 +540,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 2344ac14..7ac2dd4e 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -538,7 +538,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 2e357f9c..3cad307b 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -469,7 +469,7 @@ $i18n_key_words = array( '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 diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8b7762e2..d7847c15 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -536,7 +536,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 7a7852a7..a36b06c1 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -505,7 +505,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index df2ccc0e..7bfb9552 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -500,7 +500,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d963d1ea..bdb1c375 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -520,7 +520,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index e8f84cbc..e1c24e2d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -541,7 +541,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index dede24ed..5710cbb3 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -462,7 +462,7 @@ $i18n_key_words = array( '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 diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d3e4f4d4..0097e09b 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -518,7 +518,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index c9a4a1b7..dfc9fd32 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -516,7 +516,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 6e5dbbbd..1c59de37 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -503,7 +503,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index e23ea1a7..a20aed92 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -500,7 +500,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b2f705a4..771ccb90 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -554,7 +554,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 5470ffec..190cf5a4 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -523,7 +523,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index a8f7224a..7b1bcdba 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -532,7 +532,7 @@ $i18n_key_words = array( // '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 diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9d88e933..d942b96c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + {if $user->can('manage_advanced_settings')} diff --git a/group_edit.php b/group_edit.php index 6a16dc1f..44c5d7f9 100644 --- a/group_edit.php +++ b/group_edit.php @@ -77,6 +77,7 @@ if ($request->isPost()) { $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 { @@ -97,6 +98,7 @@ if ($request->isPost()) { $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']; } @@ -191,6 +193,9 @@ $form->addInput(array('type'=>'checkbox','name'=>'future_entries','value'=>$cl_f // 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)); @@ -234,6 +239,7 @@ if ($request->isPost()) { $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, -- 2.20.1
 Anuko Time Tracker 1.18.28.4552 | Copyright © Anuko | +  Anuko Time Tracker 1.18.29.4553 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index 8f683de4..f839d7e9 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -100,6 +100,10 @@ function handleTaskRequiredCheckbox() { {$i18n.form.group_edit.uncompleted_indicators}: {$forms.groupForm.uncompleted_indicators.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.confirm_save}:{$forms.groupForm.confirm_save.control} {$i18n.label.what_is_it}
{$i18n.label.bcc}: