From b63fed88e6d545857f7978fbf9ebca350cb2d106 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 30 Apr 2024 12:13:13 +0530 Subject: [PATCH] Updated: the saving process for the fields in the AdminCustomerThreads --- .../admin/AdminCustomerThreadsController.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index c7a52fc5e..64f02915f 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -165,7 +165,10 @@ class AdminCustomerThreadsControllerCore extends AdminController 'lang' => true ) ), - 'submit' => array('title' => $this->l('Save')) + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitOptionsCustomerService' + ) ), 'general' => array( 'title' => $this->l('Customer service options'), @@ -232,7 +235,10 @@ class AdminCustomerThreadsControllerCore extends AdminController 'hint' => $this->l('Do not use start-TLS to encrypt the session, even with servers that support it.'), ), ), - 'submit' => array('title' => $this->l('Save')), + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitOptionsIMAPConfig' + ), ), ); @@ -312,6 +318,17 @@ class AdminCustomerThreadsControllerCore extends AdminController public function postProcess() { + // using this to separate the saving process for the both option fields + $fields = $this->fields_options; + if (Tools::isSubmit('submitOptionsCustomerService')) { + unset($this->fields_options['general']); + $this->processUpdateOptions(); + } else if (Tools::isSubmit('submitOptionsIMAPConfig')) { + unset($this->fields_options['contact']); + $this->processUpdateOptions(); + } + + $this->fields_options = $fields; if ($id_customer_thread = (int)Tools::getValue('id_customer_thread')) { if (($id_contact = (int)Tools::getValue('id_contact'))) { Db::getInstance()->execute('