diff --git a/application/controllers/Options.php b/application/controllers/Options.php index a01e14ab..d703256d 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -390,4 +390,40 @@ class Options extends CI_Controller { redirect('/options/email'); } + // function used to display the /version_dialog url + function version_dialog() { + + $data['page_title'] = $this->lang->line('options_cloudlog_options'); + $data['sub_heading'] = $this->lang->line('options_version_dialog_settings'); + + $this->load->view('interface_assets/header', $data); + $this->load->view('options/version_dialog'); + $this->load->view('interface_assets/footer'); + } + + function version_dialog_save() { + + // Get Language Options + + $data['page_title'] = $this->lang->line('options_cloudlog_options'); + $data['sub_heading'] = $this->lang->line('options_version_dialog_settings'); + + $this->load->helper(array('form', 'url')); + + + $version_dialog_mode = $this->optionslib->update('version_dialog', $this->input->post('version_dialog_mode'), 'yes'); + if($version_dialog_mode == TRUE) { + $this->session->set_flashdata('success', $this->lang->line('options_version_dialog_mode_changed_to')." "."'".$this->input->post('version_dialog_mode')."'"); + } + if ($this->input->post('version_dialog_mode') == "both" || $this->input->post('version_dialog_mode') == "custom_text" ) { + $version_dialog_custom_text = $this->optionslib->update('version_dialog_text', $this->input->post('version_dialog_custom_text'), 'yes'); + if($version_dialog_custom_text == TRUE) { + $this->session->set_flashdata('success2', $this->lang->line('options_version_dialog_custom_text_saved')); + } + } + + redirect('/options/version_dialog'); + + } + } diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 2496cc11..552176a2 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -45,6 +45,7 @@ + @@ -66,6 +67,16 @@ function load_was_map() { + +optionslib->get_option('version_dialog'); +if($versionDialog != "disabled") { + // Here will be the Version Dialog Part +} +?> + + + uri->segment(1) == "oqrs") { ?> diff --git a/application/views/options/sidebar.php b/application/views/options/sidebar.php index 7e21426d..902bd396 100644 --- a/application/views/options/sidebar.php +++ b/application/views/options/sidebar.php @@ -6,6 +6,7 @@