mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Main menu] Added user option to hide notes in the main menu. Fixes #942.
This commit is contained in:
@@ -56,6 +56,7 @@ class User extends CI_Controller {
|
||||
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
|
||||
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
|
||||
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
|
||||
$data['user_show_notes'] = $this->input->post('user_show_notes');
|
||||
$this->load->view('user/add', $data);
|
||||
} else {
|
||||
$this->load->view('user/add', $data);
|
||||
@@ -64,7 +65,7 @@ class User extends CI_Controller {
|
||||
}
|
||||
else
|
||||
{
|
||||
switch($this->user_model->add($this->input->post('user_name'), $this->input->post('user_password'), $this->input->post('user_email'), $this->input->post('user_type'), $this->input->post('user_firstname'), $this->input->post('user_lastname'), $this->input->post('user_callsign'), $this->input->post('user_locator'), $this->input->post('user_timezone'), $this->input->post('user_measurement_base'), $this->input->post('user_date_format'), $this->input->post('user_stylesheet'), $this->input->post('user_sota_lookup'))) {
|
||||
switch($this->user_model->add($this->input->post('user_name'), $this->input->post('user_password'), $this->input->post('user_email'), $this->input->post('user_type'), $this->input->post('user_firstname'), $this->input->post('user_lastname'), $this->input->post('user_callsign'), $this->input->post('user_locator'), $this->input->post('user_timezone'), $this->input->post('user_measurement_base'), $this->input->post('user_date_format'), $this->input->post('user_stylesheet'), $this->input->post('user_sota_lookup'), $this->input->post('user_show_notes'))) {
|
||||
// Check for errors
|
||||
case EUSERNAMEEXISTS:
|
||||
$data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!';
|
||||
@@ -95,6 +96,7 @@ class User extends CI_Controller {
|
||||
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
|
||||
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
|
||||
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
|
||||
$data['user_show_notes'] = $this->input->post('user_show_notes');
|
||||
$this->load->view('user/add', $data);
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
@@ -257,6 +259,12 @@ class User extends CI_Controller {
|
||||
$data['user_sota_lookup'] = $q->user_sota_lookup;
|
||||
}
|
||||
|
||||
if($this->input->post('user_show_notes')) {
|
||||
$data['user_show_notes'] = $this->input->post('user_show_notes', true);
|
||||
} else {
|
||||
$data['user_show_notes'] = $q->user_show_notes;
|
||||
}
|
||||
|
||||
$this->load->view('user/edit', $data);
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
@@ -299,6 +307,7 @@ class User extends CI_Controller {
|
||||
$data['user_timezone'] = $this->input->post('user_timezone', true);
|
||||
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
|
||||
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
|
||||
$data['user_show_notes'] = $this->input->post('user_show_notes');
|
||||
$this->load->view('user/edit');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user