]> wagnertech.de Git - timetracker.git/commitdiff
Implemented group delete feature.
authorNik Okuntseff <support@anuko.com>
Wed, 11 Apr 2018 17:29:09 +0000 (17:29 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 11 Apr 2018 17:29:09 +0000 (17:29 +0000)
35 files changed:
WEB-INF/resources/ca.lang.php
WEB-INF/resources/cs.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/et.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/gr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/hu.lang.php
WEB-INF/resources/it.lang.php
WEB-INF/resources/ja.lang.php
WEB-INF/resources/ko.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/no.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt-br.lang.php
WEB-INF/resources/pt.lang.php
WEB-INF/resources/ro.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sl.lang.php
WEB-INF/resources/sr.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/resources/tr.lang.php
WEB-INF/resources/zh-cn.lang.php
WEB-INF/resources/zh-tw.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/group_delete.tpl
WEB-INF/templates/group_edit.tpl
group_delete.php
group_edit.php

index af4bc1d2ccf01d4db2c2ff9ab2846473c8e44c02..8b280c8043c661f238ad055cdedd33f605e9163c 100644 (file)
@@ -513,6 +513,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De',
 'form.mail.to' => 'Per a',
index d907c6e95df69d6ad46a3217f65be08562e7df9c..f167910ccc68ae9cdd1cf8f6cf353c14ae94466e 100644 (file)
@@ -527,6 +527,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Od',
 'form.mail.to' => 'Komu',
index 4d94cccff764c7be52296ef6bbbe4df6b74d8c74..4d28aa36ad48b4a9d8f00a2df316a21ab7562c9f 100644 (file)
@@ -474,6 +474,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Fra',
 'form.mail.to' => 'Til',
index eb5a648313be9fa12c89226703e156a0285fab73..1f1b4f13725447071009ce4d3b6e5a0265dc2e35 100644 (file)
@@ -471,6 +471,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Erweiterungen',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Von',
 'form.mail.to' => 'An',
index 298a575f33b1a171dd467b1bc7f03f611bc656dd..85430647b94c652cb715fcba1b2a2be7c6680837 100644 (file)
@@ -449,6 +449,9 @@ $i18n_key_words = array(
 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'From',
 'form.mail.to' => 'To',
index e79f3d4ad392f3146bc70292aad72d802884804e..faf8d4a5187b692ab540af9290f90e16228dc0cc 100644 (file)
@@ -528,6 +528,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De',
 'form.mail.to' => 'Para',
index 1187ed7226ffedcdb117885fd7283843488d6d97..85a1f07ba546bee85ed759ebdba14cceacc9350d 100644 (file)
@@ -523,6 +523,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Kellelt',
 'form.mail.to' => 'Kellele',
index 3539f357b03fce6b5f20fcaa58c8e79f24883c6d..47f3f56e8b9b1f167d32abf035889ba17ee65484 100644 (file)
@@ -500,6 +500,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'پلاگین ها',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'از',
 'form.mail.to' => 'به',
index 7ff1bc1e857ab4bf68960be29325b83cd3f20ed0..20d882e4b8764a88d03c72f8e2cbf9f4d6cb10dc 100644 (file)
@@ -481,6 +481,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Lisäosat',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Lähettäjä',
 'form.mail.to' => 'Vastaanottaja',
index 1456edc603e4ad1f343cdc8947e7afda5c90f7fe..249acbd2476fc9b34f710fa0d32af5ad48aaf731 100644 (file)
@@ -470,6 +470,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De',
 'form.mail.to' => 'À',
index 2d2d0d5e42fc5a64f60fa2034137fcc5a02c3573..1b78e55e1822122598f29132796f885fbd751c23 100644 (file)
@@ -452,6 +452,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Πρόσθετα',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Από',
 'form.mail.to' => 'Προς',
index 6cfccd8e7d4f10c933d6a067db92bb2ef94554e3..92450b5d9e8f09821287ad86fb771b18fb49971e 100644 (file)
@@ -507,6 +507,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'תוספים',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'מאת',
 'form.mail.to' => 'אל',
index f897844cd6071d30c29ef2fd24cbf41fc21fa799..7510442f808c2435d0ac94cb138dc120664d869e 100644 (file)
@@ -516,6 +516,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Feladó',
 'form.mail.to' => 'Címzett',
index 8a62db50fb111c96361b47e017cb4008ee039a6f..7d4c79ab67b64a8705f5740024ed1d9aafcbee5d 100644 (file)
@@ -468,6 +468,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Plugin',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Da',
 'form.mail.to' => 'A',
index aad7afe62b03517bb47bc8ed006140480fb5b586..636f2dd7d5a93e2ffc24f93fff9e782a6e2c550d 100644 (file)
@@ -519,6 +519,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'から',
 'form.mail.to' => 'まで',
index ca50b7e1b7801814c0f49ecbb805d46762683a61..5e621fe54195d5a6aedba092849136f660eb9b29 100644 (file)
@@ -517,6 +517,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => '부터',
 'form.mail.to' => '까지', // TODO: is this correct? The meaning is that we send an email TO this person.
index 9841116fe8cffe51bea97fb2e4cdacfd9e5900f9..7fdae205b8d7587a3e0955084f7601c543c6256c 100644 (file)
@@ -448,6 +448,10 @@ $i18n_key_words = array(
 'form.profile.allow_ip' => 'Toegestane IP adressen',
 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Van',
 'form.mail.to' => 'Aan',
index d6c6fbb1e81740a84a5ef72f8708f1bea0820e28..2cfb3ad32dc991c462e512f0799e7ad53088fe31 100644 (file)
@@ -516,6 +516,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Fra',
 'form.mail.to' => 'Til',
index 2c1210eac2b673da191ddc625cd92c8108d628b6..7fc6fdc622bec35dc07c7e94b0d1d4a23f471a18 100644 (file)
@@ -483,6 +483,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Dodatkowe moduły',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Od',
 'form.mail.to' => 'Do',
index ad7d5d13a4a71edde45589b194bfce39e5591b60..bdc77215053a5ed8e417bfc02eaded1b1f4993d8 100644 (file)
@@ -478,6 +478,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De',
 'form.mail.to' => 'Para',
index a5139b78fb5f694572ca03fafacb3c3c14a92734..5b9c4db25253c1f743c787b141c3a62a082d0544 100644 (file)
@@ -500,6 +500,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De',
 'form.mail.to' => 'Para',
index 9b068a7e033e5ec289f5aee2e6a8a12cd2a73b49..93f00f703f7118fb76a84ce602843e32baabc091 100644 (file)
@@ -522,6 +522,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'De la',
 'form.mail.to' => 'Catre',
index 1399049a76ed902df1bd654228dfe4e4a89c0386..ad714129cacb949717eabae2dde8be1a8b1adcad 100644 (file)
@@ -446,6 +446,9 @@ $i18n_key_words = array(
 'form.profile.allow_ip' => 'Разрешить доступ с IP',
 'form.profile.plugins' => 'Плагины',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+'form.group_delete.hint' => 'Вы уверены, что хотите удалить всю группу?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'От',
 'form.mail.to' => 'Кому',
index 8fed200f934ff92d1ea5b4c23ed0454d957b6125..0414d2249add6c495b85fd75137c095092b3fad6 100644 (file)
@@ -498,6 +498,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Doplnkové moduly',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Od',
 'form.mail.to' => 'Komu',
index 8c006293a0763f62a6094dcc7e6c34b1bc626c0d..f1731ab92921a429065ea17d72650cdf537a8725 100644 (file)
@@ -496,6 +496,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Od',
 'form.mail.to' => 'Za',
index 6aede0a0c9b6b2ac3fe41762b205eeeccbf700cf..1c98dc959d1162e102d8706da98f37bae16ef64e 100644 (file)
@@ -482,6 +482,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Dodaci',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Forma mejla. Pogledajte primer na https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Od',
 'form.mail.to' => 'Za',
index ad943a302039ab87c839e3abd451b161e0cf2a86..6348480a0865bed4997164679e4403467ad1f99b 100644 (file)
@@ -477,6 +477,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 'form.profile.plugins' => 'Tillägg',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Från',
 'form.mail.to' => 'Till',
index fcbd981abe16b8934b91e8b461db10b0077501e6..06d21c218f23b01eccf6f1c918f055ad7166c1b4 100644 (file)
@@ -535,6 +535,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => 'Kimden',
 'form.mail.to' => 'Kime',
index b1a1bdaa14875fee636f9bc250a63d2c3da1841f..d299b8e3499afa4bc30a4f945249cf6d006a7402 100644 (file)
@@ -503,6 +503,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => '从',
 'form.mail.to' => '到',
index a070b1a28285d3d2a3496ebfa365afd575f33484..c28dd02548712064025e245bafd1a5317047aa76 100644 (file)
@@ -511,6 +511,10 @@ $i18n_key_words = array(
 // 'form.profile.allow_ip' => 'Allow IP',
 // 'form.profile.plugins' => 'Plugins',
 
+// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php
+// TODO: translate the following.
+// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?',
+
 // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report.
 'form.mail.from' => '從',
 'form.mail.to' => '到',
index 6ba9e4fc3634d75fcbac7c8c1a7a699efccb3637..e4b699185452a083c4ea3cc552c017f6c6e82438 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.87.4252 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.88.4253 | Copyright &copy; <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>
index 57164d4a88404da7ba9f30aa30022c20a7d65a30..a14373f55ddf920dfb31a469804926a79a58eddd 100644 (file)
@@ -3,6 +3,8 @@
   <tr>
     <td>
       <table cellspacing="0" cellpadding="0" border="0">
+        <tr><td colspan="2">{$i18n.form.group_delete.hint}</td></tr>
+        <tr><td>&nbsp;</td></tr>
         <tr>
           <td colspan="2" align="center"><b>{$group_to_delete|escape}</b></td>
         </tr>
index 7cb8d2e69004d2a6d8f6f53b8e43e05c27d0b258..aba5ea61fd602ce55e82a9e69ab625041f3e0e5e 100644 (file)
@@ -1,4 +1,6 @@
 <script>
+function chLocation(newLocation) { document.location = newLocation; }
+
 // handleTaskRequiredCheckbox - controls visibility of the Task Required checkbox.
 function handleTaskRequiredCheckbox() {
   var taskRequiredCheckbox = document.getElementById("task_required");
@@ -243,7 +245,7 @@ function handlePluginCheckboxes() {
             <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
-            <td colspan="2" height="50" align="center">{$forms.groupForm.btn_save.control}</td>
+            <td colspan="2" height="50" align="center">{$forms.groupForm.btn_save.control} {$forms.groupForm.btn_delete.control}</td>
           </tr>
         </table>
       </td>
index 65875fad1f0726306ac711ca5fcac062beb3df15..6aa0d11d1e8d3ddf226d2fe081c795e99db29e7a 100644 (file)
 
 require_once('initialize.php');
 import('form.Form');
+import('ttAdmin');
 
 // Access checks.
 if (!ttAccessAllowed('delete_group')) {
   header('Location: access_denied.php');
   exit();
 }
-// End of access checks.
-
-// TODO: refactor this... and the template.
 $group_id = (int)$request->getParameter('id');
+if ($user->group_id != $group_id) {
+  header('Location: access_denied.php');
+  exit();
+}
+// End of access checks.
 
+// Note: reuse ttAdmin class here, simply because deleting a group
+// is a complicated task.
 $admin = new ttAdmin();
 $group_details = $admin->getGroupDetails($group_id);
 $group_name = $group_details['group_name'];
@@ -50,16 +55,17 @@ $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get(
 
 if ($request->isPost()) {
   if ($request->getParameter('btn_delete')) {
-    $result = $admin->markGroupDeleted($group_id);
-    if ($result) {
-      header('Location: admin_groups.php');
+    if ($admin->markGroupDeleted($group_id)) {
+      $auth->doLogout();
+      session_unset();
+      header('Location: login.php');
       exit();
     } else
       $err->add($i18n->get('error.db'));
   }
 
   if ($request->getParameter('btn_cancel')) {
-    header('Location: admin_groups.php');
+    header('Location: group_edit.php');
     exit();
   }
 } // isPost
@@ -67,5 +73,5 @@ if ($request->isPost()) {
 $smarty->assign('group_to_delete', $group_name);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('title', $i18n->get('title.delete_group'));
-$smarty->assign('content_page_name', 'admin_group_delete.tpl');
+$smarty->assign('content_page_name', 'group_delete.tpl');
 $smarty->display('index.tpl');
index 2b876493378c7d153a54deebf4d5a9c8fd381239..91b2b68cb618960f44623a5838c4a9cc4cda871c 100644 (file)
@@ -208,8 +208,16 @@ $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,
 $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
 $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()'));
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save')));
+if ($user->can('delete_group')) $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('button.delete')));
 
 if ($request->isPost()) {
+
+  if ($request->getParameter('btn_delete')) {
+    // Delete button pressed, redirect.
+    header('Location: group_delete.php?id='.$user->group_id);
+    exit();
+  }
+
   // Validate user input.
   if (!ttValidString($cl_group, true)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name'));
   if (!ttValidString($cl_currency, true)) $err->add($i18n->get('error.field'), $i18n->get('label.currency'));