Saves date and time and keeps it when entering POST QSOs. Fixes #463.

pull/485/head
AndreasK79 2020-05-02 16:54:13 +02:00
rodzic 2129ed83be
commit ca3398e808
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -55,6 +55,8 @@ class QSO extends CI_Controller {
// $qso_data = [
// 18-Jan-2016 - make php v5.3 friendly!
$qso_data = array(
'start_date' => $this->input->post('start_date'),
'start_time' => $this->input->post('start_time'),
'band' => $this->input->post('band'),
'freq' => $this->input->post('freq_display'),
'freq_rx' => $this->input->post('freq_display_rx'),

Wyświetl plik

@ -1,3 +1,4 @@
<?php var_dump($this->session); ?>
<div class="container qso_panel">
<div class="row">
@ -38,12 +39,12 @@
<div class="form-row">
<div class="form-group col-md-6">
<label for="start_date">Date</label>
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php echo date('d-m-Y'); ?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if ($this->session->userdata('start_date') != NULL) {echo $this->session->userdata('start_date');} else {echo date('d-m-Y');} ?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
</div>
<div class="form-group col-md-6">
<label for="start_time">Time</label>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php echo date('H:i'); ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?>>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if ($this->session->userdata('start_time') != NULL) {echo $this->session->userdata('start_time');} else {echo date('H:i');} ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?>>
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>