kopia lustrzana https://github.com/magicbug/Cloudlog
Update distance on editing QSO
rodzic
a77e73a569
commit
bc103249a8
|
@ -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,
|
||||
|
|
|
@ -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; ?>">
|
||||
|
|
|
@ -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,
|
||||
|
|
Ładowanie…
Reference in New Issue