From e339b90efdf724febc00cfb3c434162b4841fbf6 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 1 Jan 2015 16:08:59 -0500 Subject: [PATCH] #30 Let the page actually save the setting --- admin/admin_settings.php | 33 ++++++++++++++++++++++++++++++++- admin/admin_settings_save.php | 13 ++++++++++++- js/modsForHesk-javascript.js | 9 ++++++++- language/en/text.php | 8 ++++++++ verifyemail.php | 2 +- 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/admin/admin_settings.php b/admin/admin_settings.php index 0bf829e4..f9ebd8b2 100644 --- a/admin/admin_settings.php +++ b/admin/admin_settings.php @@ -1674,7 +1674,24 @@ if ( defined('HESK_DEMO') )
- + + + + + +
@@ -1835,6 +1852,20 @@ if ( defined('HESK_DEMO') ) +
+ +
+
+ +
+
+
diff --git a/admin/admin_settings_save.php b/admin/admin_settings_save.php index 857397e2..def711ce 100644 --- a/admin/admin_settings_save.php +++ b/admin/admin_settings_save.php @@ -539,6 +539,14 @@ $set['rtl'] = empty($_POST['rtl']) ? 0 : 1; $set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1; $set['maintenance-mode'] = empty($_POST['maintenance-mode']) ? 0 : 1; $set['custom-field-setting'] = empty($_POST['custom-field-setting']) ? 0 : 1; +$set['customer-email-verification-required'] = empty($_POST['email-verification']) ? 0 : 1; + +if ($set['customer-email-verification-required']) +{ + //-- Don't allow multiple emails if verification is required + $set['multi_eml'] = 0; +} + $set['navbarBackgroundColor'] = hesk_input(hesk_POST('navbarBackgroundColor')); $set['navbarBrandColor'] = hesk_input(hesk_POST('navbarBrandColor')); $set['navbarBrandHoverColor'] = hesk_input(hesk_POST('navbarBrandHoverColor')); @@ -575,7 +583,10 @@ $modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].'; $modsForHesk_settings[\'maintenance_mode\'] = '.$set['maintenance-mode'].'; //-- Set this to 1 to enable custom field names as keys -$modsForHesk_settings[\'custom_field_setting\'] = '.$set['custom-field-setting'].';'; +$modsForHesk_settings[\'custom_field_setting\'] = '.$set['custom-field-setting'].'; + +//-- Set this to 1 to enable email verification for new customers +$modsForHesk_settings[\'customer_email_verification_required\'] = '.$set['customer-email-verification-required'].';'; // Write the file if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) ) diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index 370ec620..dadbed8a 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -4,12 +4,19 @@ var loadJquery = function() //-- Activate tooltips $('[data-toggle="tooltip"]').tooltip(); - //-- Active popovers + //-- Activate popovers $('[data-toggle="popover"]').popover({ trigger: 'hover', container: 'body' }); + //-- Activate HTML popovers + $('[data-toggle="htmlpopover"]').popover({ + trigger: 'hover', + container: 'body', + html: 'true' + }); + //-- Activate jQuery's date picker $(function() { $('.datepicker').datepicker({ diff --git a/language/en/text.php b/language/en/text.php index ae9bb659..59d42b19 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -38,6 +38,14 @@ $hesklang['email_verified'] = 'The email address %s has been verified. Ad $hesklang['verify_no_records'] = 'No records were found for this activation key. Has this activation key already been used?'; $hesklang['activation_key'] = 'Activation Key'; $hesklang['no_tickets_created'] = 'No tickets created'; +$hesklang['customer_email_verification'] = 'Customer Email Verifications'; +$hesklang['customer_email_verification_help'] = 'Require customers to verify their email address via email. Once their + address has been verified, it does not need to be re-verified in the future.

NOTE: Enabling this will disable the + ability for the customer to provide multiple emails, as HESK will be unable to determine which email needs to be verified.'; +$hesklang['require_customer_validate_email'] = 'Require customers to verify email'; +$hesklang['multi_eml_disabled'] = 'This feature has been disabled because this help desk has been configured to require + customers to verify their email address'; +$hesklang['feature_disabled'] = 'Feature Disabled'; // ADDED OR MODIFIED IN Mods For HESK 1.6.0 $hesklang['ticket_closed'] = '[#%%TRACK_ID%%] Ticket closed/resolved'; diff --git a/verifyemail.php b/verifyemail.php index 33e4d56a..01e2164b 100644 --- a/verifyemail.php +++ b/verifyemail.php @@ -57,7 +57,7 @@ require_once(HESK_PATH . 'inc/header.inc.php'); { hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' "); } - + array_push($submittedTickets, $innerResult['trackid']); hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` WHERE `id` = ".$innerResult['id']);