mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Show error message in case ant el is (too) negative
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
var lang_dxccsummary_for = "<?= __("DXCC Summary for "); ?>";
|
||||
var lang_lotw_upload_day_ago = "<?= __("LoTW User. Last upload was 1 day ago."); ?>";
|
||||
var lang_lotw_upload_days_ago = "<?= __("LoTW User. Last upload was %x days ago."); ?>"; // due to the way the string is built (PHP to JS), %x is replaced with the number of days
|
||||
var lang_invalid_ant_el = "<?= __("Invalid value for antenna elevation:"); ?>";
|
||||
var latlng=[<?php echo $lat.','.$lng;?>];
|
||||
</script>
|
||||
|
||||
@@ -604,7 +605,7 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="ant_el"><?= __("Antenna Elevation (°)"); ?></label>
|
||||
<input type="number" inputmode="decimal" step="0.1" min="-5" max="90" class="form-control" id="ant_el" name="ant_el" />
|
||||
<input type="number" inputmode="decimal" step="0.1" min="-5" max="90" class="form-control" id="ant_el" name="ant_el" onInvalid="invalidAntEl()" />
|
||||
<small id="elHelp" class="form-text text-muted"><?= __("Antenna elevation in decimal degrees."); ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -97,6 +97,15 @@ function set_timers() {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function invalidAntEl() {
|
||||
var saveQsoButtonText = $("#saveQso").html();
|
||||
$("#noticer").removeClass("");
|
||||
$("#noticer").addClass("alert alert-warning");
|
||||
$("#noticer").html(lang_invalid_ant_el+" "+parseFloat($("#ant_el").val()).toFixed(1));
|
||||
$("#noticer").show();
|
||||
$("#saveQso").html(saveQsoButtonText).prop("disabled", false);
|
||||
}
|
||||
|
||||
$("#qso_input").off('submit').on('submit', function (e) {
|
||||
var _submit = true;
|
||||
if ((typeof qso_manual !== "undefined") && (qso_manual == "1")) {
|
||||
|
||||
Reference in New Issue
Block a user