some adjustments

This commit is contained in:
HB9HIL
2024-05-29 23:37:46 +02:00
parent 6e6a74b967
commit 4a4537a74d
3 changed files with 11 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ class SimpleFLE extends CI_Controller {
public function displayOptions() {
$data['callbook_lookup'] = $this->user_options_model->get_options('SimpleFLE',array('option_name'=>'callbook_lookup','option_key'=>'boolean'))->row()->option_value;
$data['callbook_lookup'] = $this->user_options_model->get_options('SimpleFLE',array('option_name'=>'callbook_lookup','option_key'=>'boolean'))->row()->option_value ?? 'true';
$this->load->view('simplefle/options', $data);
@@ -48,7 +48,11 @@ class SimpleFLE extends CI_Controller {
public function saveOptions() {
$this->user_options_model->set_option('SimpleFLE', 'callbook_lookup', array('boolean' => xss_clean($this->input->post('callbook_lookup'))));
if($this->input->post('callbook_lookup')) {
$this->user_options_model->set_option('SimpleFLE', 'callbook_lookup', array('boolean' => xss_clean($this->input->post('callbook_lookup'))));
} else {
log_message('debug', 'SimpleFLE, saveOptions(); No Options to save. No Post Data');
}
}

View File

@@ -156,7 +156,7 @@
<button class="btn btn-warning js-save-to-log"><?php echo lang('qso_simplefle_save'); ?></button>
<button class="btn btn-danger js-empty-qso"><?php echo lang('qso_simplefle_clear'); ?></button>
<button class="btn btn-success" id="js-syntax"><?php echo lang('qso_simplefle_syntax_help_button'); ?></button>
<!-- <button class="btn btn-secondary" id="js-options"><?php echo lang('admin_options'); ?></button> -->
<button class="btn btn-secondary" id="js-options"><?php echo lang('admin_options'); ?></button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<table style="width:100%" class="table-sm table table-hover table-striped table-condensed text-start" id="useroptions">
<!-- <table style="width:100%" class="table-sm table table-hover table-striped table-condensed text-start" id="useroptions">
<thead>
<tr>
<th class="text-start">Option</th>
@@ -15,4 +15,6 @@
</td>
</tr>
</tbody>
</table>
</table> -->
<p> No Options yet </p>