From 3909814313f32c75e1957554678b1787e8674be9 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 9 Jun 2017 18:29:25 -0400 Subject: [PATCH] Remove checkbox to simplify task mail form --- app/Controller/TaskMailController.php | 12 +++++------- app/Locale/bs_BA/translations.php | 1 - app/Locale/ca_ES/translations.php | 1 - app/Locale/cs_CZ/translations.php | 1 - app/Locale/da_DK/translations.php | 1 - app/Locale/de_DE/translations.php | 1 - app/Locale/el_GR/translations.php | 1 - app/Locale/es_ES/translations.php | 1 - app/Locale/fi_FI/translations.php | 1 - app/Locale/fr_FR/translations.php | 1 - app/Locale/hr_HR/translations.php | 1 - app/Locale/hu_HU/translations.php | 1 - app/Locale/id_ID/translations.php | 1 - app/Locale/it_IT/translations.php | 1 - app/Locale/ja_JP/translations.php | 1 - app/Locale/ko_KR/translations.php | 1 - app/Locale/my_MY/translations.php | 1 - app/Locale/nb_NO/translations.php | 1 - app/Locale/nl_NL/translations.php | 1 - app/Locale/pl_PL/translations.php | 1 - app/Locale/pt_BR/translations.php | 1 - app/Locale/pt_PT/translations.php | 1 - app/Locale/ru_RU/translations.php | 1 - app/Locale/sr_Latn_RS/translations.php | 1 - app/Locale/sv_SE/translations.php | 1 - app/Locale/th_TH/translations.php | 1 - app/Locale/tr_TR/translations.php | 1 - app/Locale/zh_CN/translations.php | 1 - app/Template/task_mail/create.php | 2 -- 29 files changed, 5 insertions(+), 36 deletions(-) diff --git a/app/Controller/TaskMailController.php b/app/Controller/TaskMailController.php index 64b81f8fd..feb96a689 100644 --- a/app/Controller/TaskMailController.php +++ b/app/Controller/TaskMailController.php @@ -35,13 +35,11 @@ class TaskMailController extends BaseController $this->sendByEmail($values, $task); $this->flash->success(t('Task sent by email successfully.')); - if (isset($values['add_comment']) && $values['add_comment'] == 1) { - $this->commentModel->create(array( - 'comment' => t('This task was sent by email to "%s" with subject "%s".', $values['email'], $values['subject']), - 'user_id' => $this->userSession->getId(), - 'task_id' => $task['id'], - )); - } + $this->commentModel->create(array( + 'comment' => t('This task was sent by email to "%s" with subject "%s".', $values['email'], $values['subject']), + 'user_id' => $this->userSession->getId(), + 'task_id' => $task['id'], + )); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); } else { diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index 32d3d02ff..0955c908d 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index 0f5a21104..384216b57 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 75952c954..b61133403 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index d9a1541c8..f15abb7ff 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index ca25b828c..92774ffd9 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 560a823ee..e7b30f8d0 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index b43b1188d..b9750d3c7 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 07e7f674f..9a04178f0 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 66a399b9d..5e183eafd 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1336,7 +1336,6 @@ return array( 'Remove user from group' => 'Supprimer cet utilisateur du groupe', 'Assign the task to its creator' => 'Assigner une tâche à son créateur', 'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».', - 'Log this action in a comment' => 'Enregistrez cette action dans un commentaire', 'Predefined Email Subjects' => 'Sujets de courrier électronique prédéfinis', 'Write one subject by line.' => 'Écrivez un sujet par ligne.', ); diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index f676c31d8..18fec07a1 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 16dd9a949..db50d18b8 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1336,7 +1336,6 @@ return array( 'Remove user from group' => 'Felhasználó eltávolítása a csoportból', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index f857eec33..cebace767 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index ec7f00846..e5b48b6b6 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index f6749ba66..91d1199ca 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 6bc810ece..804e9c3d0 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index c78bc7379..2317755e1 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index b6042e99e..8a93f5d85 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 6b39c8939..41b20116c 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 7922bf4bd..aab6e6c91 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 7bbdb8dc8..82771ee43 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1336,7 +1336,6 @@ return array( 'Remove user from group' => 'Remover usuário do grupo', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 23c7d7f1c..a060b030a 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 34357e01f..f6bff006b 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 83d7c3da6..9c7c5b339 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index a04dfdcde..c2cbb99aa 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 4cb4b5e75..eeff82c99 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index d09e7bb02..63a9892d9 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 211756817..9b7e38dbe 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1336,7 +1336,6 @@ return array( // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', - // 'Log this action in a comment' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', ); diff --git a/app/Template/task_mail/create.php b/app/Template/task_mail/create.php index 4e843de9f..f369ef992 100644 --- a/app/Template/task_mail/create.php +++ b/app/Template/task_mail/create.php @@ -40,8 +40,6 @@ - form->checkbox('add_comment', t('Log this action in a comment'), 1) ?> - modal->submitButtons(array( 'submitLabel' => t('Send by email'), 'tabindex' => 3,