Update distance on editing QSO

pull/2215/head
phl0 2023-06-16 12:17:56 +02:00
rodzic a77e73a569
commit bc103249a8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
3 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -890,6 +890,7 @@ class Logbook_model extends CI_Model {
'COL_RST_SENT' => $this->input->post('rst_sent'),
'COL_GRIDSQUARE' => strtoupper(trim($this->input->post('locator'))),
'COL_VUCC_GRIDS' => strtoupper(trim($this->input->post('vucc_grids'))),
'COL_DISTANCE' => $this->input->post('distance'),
'COL_COMMENT' => $this->input->post('comment'),
'COL_NAME' => $this->input->post('name'),
'COL_COUNTRY' => $country,

Wyświetl plik

@ -161,8 +161,11 @@
<div class="form-group col-sm-6">
<label for="locator">Gridsquare</label>
<input type="text" class="form-control" id="locator" name="locator" value="<?php echo $qso->COL_GRIDSQUARE; ?>">
<small id="locator_info" class="form-text text-muted"></small>
</div>
<input type="hidden" name="distance" id="distance" value="<?php echo $qso->COL_DISTANCE; ?>">
<div class="form-group col-sm-6">
<label for="vucc_grids">VUCC Gridsquare</label>
<input type="text" class="form-control" id="vucc_grids" name="vucc_grids" value="<?php echo $qso->COL_VUCC_GRIDS; ?>">

Wyświetl plik

@ -138,6 +138,13 @@ function qso_edit(id) {
}
});
$('#locator').change(function(){
$('#locator_info').load("logbook/searchbearing/" + $(this).val() + "/" + $('#stationProfile').val()).fadeIn("slow");
$.get('logbook/searchdistance/' + $(this).val() + "/" + $('#stationProfile').val(), function(result) {
document.getElementById("distance").value = result;
});
});
$('#sota_ref_edit').selectize({
maxItems: 1,
closeAfterSelect: true,