Add input/edit boxes and corresponding functions

This commit is contained in:
phl0
2024-09-02 12:27:57 +02:00
parent 29bf505b4c
commit f2039965a2
3 changed files with 22 additions and 8 deletions

View File

@@ -267,7 +267,7 @@ class QSO extends CI_Controller {
$this->load->model('user_model');
$this->load->model('modes');
$this->load->model('bands');
$this->load->model('contesting_model');
$this->load->model('contesting_model');
$this->load->library('form_validation');

View File

@@ -284,8 +284,8 @@ class Logbook_model extends CI_Model {
'COL_IOTA' => $this->input->post('iota_ref') == null ? '' : trim($this->input->post('iota_ref')),
'COL_DISTANCE' => $this->input->post('distance'),
'COL_FREQ_RX' => $this->parse_frequency($this->input->post('freq_display_rx')),
'COL_ANT_AZ' => null,
'COL_ANT_EL' => null,
'COL_ANT_AZ' => $this->input->post('ant_az') == null ? '' : $this->input->post('ant_az'),
'COL_ANT_EL' => $this->input->post('ant_el') == null ? '' : $this->input->post('ant_el'),
'COL_A_INDEX' => null,
'COL_AGE' => $qso_age,
'COL_TEN_TEN' => null,
@@ -1357,6 +1357,8 @@ class Logbook_model extends CI_Model {
'COL_SRX' => $srx_string,
'COL_CONTEST_ID' => $this->input->post('contest_name'),
'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'),
'COL_ANT_AZ' => $this->input->post('ant_az') != '' ? $this->input->post('ant_az') : null,
'COL_ANT_EL' => $this->input->post('ant_el') != '' ? $this->input->post('ant_el') : null,
'station_id' => $stationId,
'COL_STATION_CALLSIGN' => $stationCallsign,
'COL_OPERATOR' => $this->input->post('operator_callsign'),

View File

@@ -36,7 +36,7 @@
<a class="nav-item nav-link" id="nav-qso-notes-tab" data-bs-toggle="tab" href="#nav-qso-notes" role="tab" aria-controls="nav-qso-notes" aria-selected="false"><?= __("Notes"); ?></a>
<a class="nav-item nav-link" id="nav-qsl-tab" data-bs-toggle="tab" href="#nav-qsl" role="tab" aria-controls="nav-qsl" aria-selected="false"><?= __("QSL"); ?></a>
<a class="nav-item nav-link" id="nav-station-tab" data-bs-toggle="tab" href="#nav-station" role="tab" aria-controls="nav-station" aria-selected="false"><?= __("Station"); ?></a>
<a class="nav-item nav-link" id="nav-contest-tab" data-bs-toggle="tab" href="#nav-contest" role="tab" aria-controls="nav-contest" aria-selected="false"><?= __("Contest"); ?></a>
<a class="nav-item nav-link" id="nav-contest-tab" data-bs-toggle="tab" href="#nav-contest" role="tab" aria-controls="nav-contest" aria-selected="false"><?= __("Contest"); ?></a>
</div>
</nav>
@@ -131,10 +131,10 @@
</select>
</div>
<div class="mb-3 col-sm6">
<label for="transmit_power"><?= __("Transmit Power (W)"); ?></label>
<input type="number" step="0.001" class="form-control" id="transmit_power" name="transmit_power" value="<?php echo $qso->COL_TX_PWR; ?>" />
<small id="powerHelp" class="form-text text-muted"><?= __("Give power value in Watts. Include only numbers in the input."); ?></small>
</div>
<label for="transmit_power"><?= __("Transmit Power (W)"); ?></label>
<input type="number" step="0.001" class="form-control" id="transmit_power" name="transmit_power" value="<?php echo $qso->COL_TX_PWR; ?>" />
<small id="powerHelp" class="form-text text-muted"><?= __("Give power value in Watts. Include only numbers in the input."); ?></small>
</div>
</div>
<div class="row">
@@ -263,6 +263,18 @@
<label for="sat_mode"><?= __("Sat Mode"); ?></label>
<input type="text" class="form-control form-control-sm" name="sat_mode" id="sat_mode" value="<?php echo $qso->COL_SAT_MODE; ?>">
</div>
<div class="mb-3">
<label for="ant_az"><?= __("Antenna Azimuth (°)"); ?></label>
<input type="number" step="0.1" min="0" max="360" class="form-control" id="ant_az" name="ant_az" value="<?php echo $qso->COL_ANT_AZ; ?>" />
<small id="azHelp" class="form-text text-muted"><?= __("Antenna azimuth in decimal degrees."); ?></small>
</div>
<div class="mb-3">
<label for="ant_el"><?= __("Antenna Elevation (°)"); ?></label>
<input type="number" step="0.1" min="0" max="90" class="form-control" id="ant_el" name="ant_el" value="<?php echo $qso->COL_ANT_EL; ?>" />
<small id="elHelp" class="form-text text-muted"><?= __("Antenna elevation in decimal degrees."); ?></small>
</div>
</div>
<!-- Awards Panel Contents -->