From: Anže Videnič Date: Mon, 4 Jul 2016 09:28:13 +0000 (+0200) Subject: updated according to comments from anuko X-Git-Tag: timetracker_1.19-1~1702^2^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5804c13dc7c50b694c51dc443599c994f1d29b66;p=timetracker.git updated according to comments from anuko --- diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index b52e0d80..5afca00d 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -214,3 +214,7 @@ define('AUTH_MODULE', 'db'); // 'member_of' => array()); // List of groups, membership in which is required for user to be authenticated. // define('AUTH_DEBUG', false); // Note: enabling AUTH_DEBUG breaks redirects as debug output is printed before setting redirect header. Do not enable on production systems. + +// team manager can set monthly quota for years between these values: +define('MONTHLY_QUOTA_YEARS_START', 2010); // if nothing is specified, it falls back to 2010 +define('MONTHLY_QUOTA_YEARS_END', 2031); // if nothing is specified it falls back to 2030 diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index ed4c5195..186f7a1e 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -703,7 +703,7 @@ class ttTeamHelper { static function update($team_id, $fields) { // We'll require team name to be always set. - if (!isset($fields['name'])) return false; + if (!isset($fields['name']) || $fields['name'] == "") return false; $mdb2 = getConnection(); $name_part = 'name = '.$mdb2->quote($fields['name']); @@ -718,6 +718,7 @@ class ttTeamHelper { $record_type_part = ''; $plugins_part = ''; $lock_spec_part = ''; + $working_hours_part = ''; if (isset($fields['address'])) $addr_part = ', address = '.$mdb2->quote($fields['address']); if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); @@ -730,10 +731,11 @@ class ttTeamHelper { if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); + if (isset($fields['working_hours'])) $working_hours_part = ', daily_working_hours = '.$mdb2->quote($fields['working_hours']); $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part - $plugins_part $lock_spec_part where id = $team_id"; + $plugins_part $lock_spec_part $working_hours_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 24f18b6e..ae05e9f7 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -203,6 +203,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Anmelden', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index f540a932..f82e5432 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -199,6 +199,8 @@ $i18n_key_words = array( 'label.year' => 'Year', 'label.month' => 'Month', 'label.quota' => 'Quota', +'label.dailyWorkingHours' => 'Daily working hours', +'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index dfdaba37..3f1696e5 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -234,6 +234,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Sesión iniciada', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index d63ec4f9..acdb8f06 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -211,6 +211,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'ورود', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index d94c3c69..ee94cad0 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -197,6 +197,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Kirjautuminen', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index e9e71fd1..ee899fa2 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -216,6 +216,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Connexion', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index e3ef87ad..ce02dba8 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -216,6 +216,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'כניסה', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 167bb29a..b2ad9bf8 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -198,6 +198,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Aanmelden', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 59257b16..35a53557 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -203,6 +203,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Logowanie', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index f52a9df3..021c1386 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -197,6 +197,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 932f0a9a..0c99c071 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -199,6 +199,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Вход в систему', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 6ee28baa..c8479ad4 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -213,6 +213,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Prihlásenie', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index b24a57b9..546515b7 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -199,6 +199,8 @@ $i18n_key_words = array( // 'label.year' => 'Year', // 'label.month' => 'Month', // 'label.quota' => 'Quota', +// 'label.dailyWorkingHours' => 'Daily working hours', +// 'label.empty_values_explanation' => 'If values are empty, quotas are calculated automatically based on holidays in config', // Form titles. 'title.login' => 'Prijava', diff --git a/WEB-INF/templates/cf_monthly_quota.tpl b/WEB-INF/templates/cf_monthly_quota.tpl index 8243eb1d..6e3d9fee 100644 --- a/WEB-INF/templates/cf_monthly_quota.tpl +++ b/WEB-INF/templates/cf_monthly_quota.tpl @@ -1,7 +1,22 @@ {$forms.monthlyQuotaForm.open} +
+ + + + +
+ + + + + + +
{$i18n.label.dailyWorkingHours}{$forms.monthlyQuotaForm.dailyWorkingHours.control}
+
+
- + @@ -16,16 +31,17 @@ - {/foreach} + {/foreach}
{$i18n.label.year}{$i18n.label.year}: {$forms.monthlyQuotaForm.years.control}
{$month} {$forms.monthlyQuotaForm.$month.control}
- +
+
* - {$i18n.label.empty_values_explanation}
{$forms.monthlyQuotaForm.close}