From 904202488d8891ebc8abf6583e15fa7d4ccb9a41 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Mon, 19 Feb 2018 12:40:12 -0500 Subject: [PATCH] Add an 'emails to receive' option for email custom fields --- admin/custom_fields.php | 40 ++++++++++++++++++++++++++++++++++++++-- language/en/text.php | 3 +++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/admin/custom_fields.php b/admin/custom_fields.php index 04917840..979f4114 100755 --- a/admin/custom_fields.php +++ b/admin/custom_fields.php @@ -519,7 +519,9 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
- +
+
+
+ +
+ +
+ +
+
+ +
+
+
@@ -1250,7 +1285,8 @@ function cf_validate() case 'email': $cf['email_multi'] = hesk_POST('email_multi') ? 1 : 0; $cf['email_type'] = hesk_POST('email_type', 'none'); - $cf['value'] = array('multiple' => $cf['email_multi'], 'email_type' => $cf['email_type']); + $cf['emails_to_receive'] = $cf['email_type'] === 'none' ? array() : hesk_POST_array('emails_to_receive', array()); + $cf['value'] = array('multiple' => $cf['email_multi'], 'email_type' => $cf['email_type'], 'emails_to_receive' => $cf['emails_to_receive']); break; case 'hidden': diff --git a/language/en/text.php b/language/en/text.php index a994fc6c..23fdbd79 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -2239,6 +2239,9 @@ $hesklang['highlight_ticket_rows_based_on_priority'] = 'Highlight ticket rows ba $hesklang['highlight_ticket_rows_based_on_priority_help'] = 'If enabled, each ticket on the tickets page will be highlighted based on priority. If disabled, only * Critical * and High priority tickets will be highlighted.'; $hesklang['highlight_ticket_rows_based_on_priority_descr'] = 'Highlight all ticket rows based on priority'; $hesklang['protected_group'] = 'This is a protected group; you cannot change accessible categories / features.'; +$hesklang['emails_to_receive'] = 'Emails to receive'; +$hesklang['emails_sent_to_staff'] = 'Emails sent to staff'; +$hesklang['emails_sent_to_customer'] = 'Emails sent to customer'; // DO NOT CHANGE BELOW if (!defined('IN_SCRIPT')) die('PHP syntax OK!');