* [OQRS] config-switch to disable oqrs-feature

This commit is contained in:
Christoph Kottke
2024-06-07 14:27:32 +02:00
committed by Christoph Kottke
parent 200f6d965f
commit 71f6896b69
4 changed files with 10 additions and 0 deletions

View File

@@ -695,3 +695,6 @@ $config['disable_manual_qrz'] = false;
# Disables QSL-Image-Feature if true. if non-existant or false the QSL-Feature is enabled
$config['disable_qsl'] = false;
# Disables OQRS-Feature if true. if non-existant or false the OQRS-Feature is enabled
$config['disable_oqrs'] = false;

View File

@@ -17,6 +17,8 @@ class Oqrs extends CI_Controller {
}
public function index() {
if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->load->model('oqrs_model');
$data['stations'] = $this->oqrs_model->get_oqrs_stations();

View File

@@ -259,6 +259,7 @@
</div>
</div>
<?php if (!($this->config->item('disable_oqrs') ?? false)) { ?>
<div class="mb-3">
<label for="oqrs"><?php echo lang("station_location_oqrs_enabled"); ?></label>
<select class="form-select" id="oqrs" name="oqrs">
@@ -279,6 +280,7 @@
<input type="text" class="form-control" name="oqrstext" id="oqrstext" aria-describedby="oqrstextHelp">
<small id="oqrstextHelp" class="form-text text-muted"><?php echo lang("station_location_oqrs_text_hint"); ?></small>
</div>
<?php } ?>
<button type="submit" class="btn btn-primary"><i class="fas fa-plus-square"></i> <?php echo lang("admin_create"); ?> <?php echo lang("station_location"); ?></button>

View File

@@ -390,6 +390,8 @@
</div>
</div>
</div>
<?php if (!($this->config->item('disable_oqrs') ?? false)) { ?>
<div class="row">
<div class="col-md">
<div class="card">
@@ -420,6 +422,7 @@
</div>
</div>
</div>
<?php } ?>
<button type="submit" class="btn btn-primary" style="margin-bottom: 30px;"><i class="fas fa-plus-square"></i> <?php echo $form_action; ?> <?php echo lang("station_location"); ?></button>