diff --git a/application/controllers/Legal_settings.php b/application/controllers/Legal_settings.php index 0f8e88a9..ed2f2b6e 100644 --- a/application/controllers/Legal_settings.php +++ b/application/controllers/Legal_settings.php @@ -26,18 +26,9 @@ class Legal_settings extends EA_Controller { { parent::__construct(); - $this->load->model('appointments_model'); - $this->load->model('customers_model'); - $this->load->model('services_model'); - $this->load->model('providers_model'); - $this->load->model('roles_model'); $this->load->model('settings_model'); $this->load->library('accounts'); - $this->load->library('google_sync'); - $this->load->library('notifications'); - $this->load->library('synchronization'); - $this->load->library('timezones'); } /** @@ -54,21 +45,21 @@ class Legal_settings extends EA_Controller { $user_id = session('user_id'); - $role_slug = session('role_slug'); + script_vars([ + 'legal_settings' => $this->settings_model->get(), + ]); html_vars([ 'page_title' => lang('settings'), 'active_menu' => PRIV_SYSTEM_SETTINGS, 'user_display_name' => $this->accounts->get_user_display_name($user_id), - 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug), - 'system_settings' => $this->settings_model->get(), ]); $this->load->view('pages/legal_settings', html_vars()); } /** - * Save general settings. + * Save legal settings. */ public function save() { @@ -79,7 +70,7 @@ class Legal_settings extends EA_Controller { throw new Exception('You do not have the required permissions for this task.'); } - $settings = json_decode(request('settings', FALSE), TRUE); + $settings = request('legal_settings', []); foreach ($settings as $setting) { diff --git a/application/views/pages/legal_settings.php b/application/views/pages/legal_settings.php index 84c62b27..6b2e72b1 100755 --- a/application/views/pages/legal_settings.php +++ b/application/views/pages/legal_settings.php @@ -9,82 +9,79 @@ -