some minor fixes in language and html

This commit is contained in:
HB9HIL
2024-11-10 13:02:21 +01:00
parent adf4913da5
commit 41bd2dd2f6
4 changed files with 13 additions and 9 deletions

View File

@@ -103,7 +103,7 @@ class Radio extends CI_Controller {
echo '<td><button id="default_radio_btn_' . $row->id . '" class="btn btn-sm btn-primary ld-ext-right" onclick="release_default_radio(' . $row->id . ')">' . __("Default (click to release)") . '<div class="ld ld-ring ld-spin"></div></button</td>';
}
}
echo "<td><button id='".$row->id."' \" class=\"editCatSettings btn btn-sm btn-primary\"> " . __("Edit") . "</button></td>";
echo "<td><button id='edit_cat_settings_".$row->id."' \" class=\"editCatSettings btn btn-sm btn-primary\"> " . __("Edit") . "</button></td>";
echo "<td><a href=\"" . site_url('radio/delete') . "/" . $row->id . "\" class=\"btn btn-sm btn-danger\"> <i class=\"fas fa-trash-alt\"></i> " . __("Delete") . "</a></td>";
echo "</tr>";
}
@@ -116,16 +116,16 @@ class Radio extends CI_Controller {
}
public function saveCatUrl() {
$url = xss_clean($this->input->post('caturl', true));
$id = xss_clean($this->input->post('id', true));
$url = $this->input->post('caturl', true);
$id = $this->input->post('id', true);
$this->load->model('cat');
$this->cat->updateCatUrl($id,$url);
}
public function editCatUrl() {
$this->load->model('cat');
$data['container'] = $this->cat->radio_status(xss_clean($this->input->post('id', true)))->row();
$data['page_title'] = __("Edit container name");
$data['container'] = $this->cat->radio_status($this->input->post('id', true))->row();
$data['page_title'] = __("Edit CAT Settings");
$this->load->view('radio/edit', $data);
}

View File

@@ -17,7 +17,7 @@
<div class="mb-3">
<label for="CatUrlInput"><?= __("CAT URL"); ?></label>
<input type="text" class="form-control" name="CatUrlInput" id="CatUrlInput" aria-describedby="CatUrlHelp" placeholder="http://127.0.0.1:54321" required value="<?php echo $container->cat_url; ?>">
<small id="CatUrlHelp" class="form-text text-muted"><?= __("Called URL when a spot at DXCluster is clicked. Notice: The slash (/) and QRG is added automatically"); ?></small>
<small id="CatUrlHelp" class="form-text text-muted"><?= sprintf(__("Called URL when a spot at DXCluster is clicked. Notice: The trailing slash (/) and QRG is added automatically. Default is %s"), "http://127.0.0.1:54321"); ?></small>
</div>

View File

@@ -1,3 +1,7 @@
<script>
var lang_edit_cat_settings = "<?= __("Edit CAT Settings"); ?>";
</script>
<div class="container">
<br>

View File

@@ -23,11 +23,11 @@ function editCatUrlDialog(e) {
url: base_url + 'index.php/radio/editCatUrl',
type: 'post',
data: {
id: e.currentTarget.id,
id: e.currentTarget.id.replace('edit_cat_settings_', '')
},
success: function (data) {
BootstrapDialog.show({
title: 'Edit CAT Settings',
title: lang_edit_cat_settings,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'options',
id: "CatUrlModal",
@@ -36,7 +36,7 @@ function editCatUrlDialog(e) {
onshown: function(dialog) {
},
buttons: [{
label: 'Save',
label: lang_admin_save,
cssClass: 'btn-primary btn-sm saveContainerName',
action: function (dialogItself) {
saveCatUrl();