mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix first population of start_date
This commit is contained in:
@@ -30,6 +30,11 @@ class Contesting extends CI_Controller {
|
||||
} else {
|
||||
show_404();
|
||||
}
|
||||
if ($this->session->userdata('user_date_format')) {
|
||||
$data['date_format'] = $this->session->userdata('user_date_format');
|
||||
} else {
|
||||
$data['date_format'] = $this->config->item('qso_date_format');
|
||||
}
|
||||
|
||||
$data['my_gridsquare'] = $this->stations->find_gridsquare();
|
||||
$data['radios'] = $this->cat->radios();
|
||||
|
||||
@@ -3,15 +3,7 @@
|
||||
var lang_contest_reset_session = "<?= __("Are you really sure you want to start a new contest session?"); ?>";
|
||||
|
||||
// Get Date format
|
||||
var user_date_format = "<?php
|
||||
if($this->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
echo $this->session->userdata('user_date_format');
|
||||
} else {
|
||||
// Get Default date format from /config/wavelog.php
|
||||
echo $this->config->item('qso_date_format');
|
||||
}
|
||||
?>";
|
||||
var user_date_format = "<?php echo $date_format; ?>";
|
||||
</script>
|
||||
|
||||
<div class="container qso_panel contesting">
|
||||
@@ -108,7 +100,7 @@
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-2">
|
||||
<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 if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_mode == 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 && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date($date_format);}?>" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> >
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-1">
|
||||
@@ -118,7 +110,7 @@
|
||||
|
||||
<?php if ( $manual_mode == 0 ) { ?>
|
||||
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date($date_format); ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<div class="mb-3 col-md-2">
|
||||
|
||||
Reference in New Issue
Block a user