js snippet of dxcc warning in footer

pull/2571/head
HB9HIL 2023-10-14 21:05:33 +02:00
rodzic 262c0ea888
commit 4b0f32fd6a
3 zmienionych plików z 25 dodań i 38 usunięć

Wyświetl plik

@ -541,6 +541,21 @@ $(document).ready(function() {
});
</script>
<script>
document.getElementById('dxcc_select').addEventListener('change', function() {
var selectedOption = this.options[this.selectedIndex];
var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>");
if (isDeleted) {
this.style.border = '2px solid red';
warningMessage.innerText = lang_station_location_dxcc_warning;
} else {
this.style.border = '';
warningMessage.innerText = "";
}
});
</script>
<script>
var $= jQuery.noConflict();
$('[data-fancybox]').fancybox({

Wyświetl plik

@ -45,7 +45,11 @@
<input type="number" class="form-control" name="station_power" id="stationPowerInput" step="1" aria-describedby="stationPowerInputHelp" placeholder="10">
<small id="stationPowerInputHelp" class="form-text text-muted"><?php echo lang("station_location_power_hint"); ?></small>
</div>
<!-- Loading Warning Text for Deleted DXCC -->
<script>
var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>';
var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>");
</script>
<div class="form-group">
<label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
<?php if ($dxcc_list->num_rows() > 0) { ?>
@ -60,24 +64,6 @@
<small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
<div id="warningMessage" style="color: red;"></div>
</div>
<!-- DXCC Deleted Warning -->
<script>
var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>';
</script>
<script>
document.getElementById('dxcc_select').addEventListener('change', function() {
var selectedOption = this.options[this.selectedIndex];
var isDeleted = selectedOption.textContent.includes('<?php echo lang('gen_hamradio_deleted_dxcc'); ?>');
if (isDeleted) {
this.style.border = '2px solid red';
warningMessage.innerText = lang_station_location_dxcc_warning;
} else {
this.style.border = '';
warningMessage.innerText = "";
}
});
</script>
<div class="form-group">
<label for="stationCityInput"><?php echo lang("station_location_city"); ?></label>

Wyświetl plik

@ -64,7 +64,11 @@
<div class="card">
<div class="card-header"><?php echo lang("general_word_location"); ?></div>
<div class="card-body">
<!-- Loading Warning Text for Deleted DXCC -->
<script>
var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>';
var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>");
</script>
<!-- DXCC -->
<div class="form-group">
<label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
@ -86,24 +90,6 @@
<small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
<div id="warningMessage" style="color: red;"></div>
</div>
<!-- DXCC Deleted Warning -->
<script>
var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>';
</script>
<script>
document.getElementById('dxcc_select').addEventListener('change', function() {
var selectedOption = this.options[this.selectedIndex];
var isDeleted = selectedOption.textContent.includes('<?php echo lang('gen_hamradio_deleted_dxcc'); ?>');
if (isDeleted) {
this.style.border = '2px solid red';
warningMessage.innerText = lang_station_location_dxcc_warning;
} else {
this.style.border = '';
warningMessage.innerText = "";
}
});
</script>
<!-- City -->
<div class="form-group">