diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 109e8e8e..3140ef01 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -252,4 +252,32 @@ class Options extends CI_Controller { } } + function oqrs() { + + $data['page_title'] = "Cloudlog Options"; + $data['sub_heading'] = "OQRS Global text"; + + $this->load->view('interface_assets/header', $data); + $this->load->view('options/oqrs'); + $this->load->view('interface_assets/footer'); + } + + function oqrs_save() { + + $data['page_title'] = "Cloudlog Options"; + $data['sub_heading'] = "OQRS Global text"; + + $this->load->helper(array('form', 'url')); + + $this->load->library('form_validation'); + + $global_oqrs_text = $this->optionslib->update('global_oqrs_text', $this->input->post('global_oqrs_text'), null); + + if($global_oqrs_text == TRUE) { + $this->session->set_flashdata('success', 'OQRS Global text has been saved.'); + } + + redirect('/options/oqrs'); + } + } diff --git a/application/controllers/Oqrs.php b/application/controllers/Oqrs.php index da0899da..dfc379f6 100644 --- a/application/controllers/Oqrs.php +++ b/application/controllers/Oqrs.php @@ -21,6 +21,8 @@ class Oqrs extends CI_Controller { $data['stations'] = $this->oqrs_model->get_oqrs_stations(); $data['page_title'] = "Log Search & OQRS"; + $data['global_oqrs_text'] = $this->optionslib->get_option('global_oqrs_text'); + $this->load->view('visitor/layout/header', $data); $this->load->view('oqrs/index'); diff --git a/application/views/options/oqrs.php b/application/views/options/oqrs.php new file mode 100644 index 00000000..56ea573b --- /dev/null +++ b/application/views/options/oqrs.php @@ -0,0 +1,51 @@ +
This text is an optional text that can be displayed on top of the OQRS page.
+ +