Change contest batch edit to dropdown

This commit is contained in:
Lieven Hey
2024-07-06 01:58:49 +02:00
parent aa60360a61
commit c6101a6dee
3 changed files with 16 additions and 1 deletions

View File

@@ -540,11 +540,13 @@ class Logbookadvanced extends CI_Controller {
$this->load->model('bands');
$this->load->model('modes');
$this->load->model('logbookadvanced_model');
$this->load->model('contesting_model');
$data['stateDxcc'] = $this->logbookadvanced_model->getPrimarySubdivisonsDxccs();
$data['modes'] = $this->modes->active();
$data['bands'] = $this->bands->get_user_bands_for_qso_entry();
$data['contests'] = $this->contesting_model->getActivecontests();
$this->load->view('logbookadvanced/edit', $data);
}

View File

@@ -18,7 +18,7 @@
<option value="station"><?= __("Station Location"); ?></option>
<option value="wwff"><?= __("WWFF"); ?></option>
<option value="state"><?= __("State"); ?></option>
<option value="contest"><?= __("Contest"); ?></option>
<option value="contest"><?= __("Contest"); ?></option>
</select>
<div>&nbsp;</div>
@@ -118,4 +118,11 @@
<select style="display:none" class="form-select w-auto form-select-sm w-auto" id="editStationLocation" name="station_location">
</select>
<select style="display:none" class="form-select w-auto form-select-sm w-auto" id="editContest" name="contest">
<?php
foreach($contests as $contest){
echo '<option value="' . $contest['adifname'] . '">' . $contest["name"] . '</option>'."\n";
}
?>
</select>
</form>

View File

@@ -168,6 +168,9 @@ function saveBatchEditQsos(id_list) {
value = $("#editSatellite").val();
value2 = $("#editSatelliteMode").val();
}
if (column == 'contest') {
value = $("#editContest").val();
}
if (column == 'sota' || column == 'pota' || column == 'wwff' || column == 'gridsquare' || column == 'comment' || column == 'operator' || column == 'qslvia' || column == 'contest') {
value = $("#editTextInput").val();
}
@@ -212,6 +215,7 @@ function changeEditType(type) {
$('#editDxccState').hide();
$('#editDxccStateList').hide();
$('#editDxccStateListLabel').hide();
$('#editContest').hide();
editDxccStateListLabel
if (type == "dxcc") {
$('#editDxcc').show();
@@ -241,6 +245,8 @@ function changeEditType(type) {
$('#editSatellite').show();
$('#editSatelliteMode').show();
$('#editSatelliteModeLabel').show();
} else if (type == "contest") {
$('#editContest').show();
} else if (type == "gridsquare" || type == "sota" || type == "wwff" || type == "operator" || type == "pota" || type == "comment" || type == "qslvia" || type == "contest") {
$('#editTextInput').show();
}