mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Blueprint for keeping values in case of form validation errors
This commit is contained in:
@@ -36,8 +36,9 @@ class Station extends CI_Controller
|
||||
|
||||
if ($this->form_validation->run() == FALSE) {
|
||||
$data['page_title'] = __("Create Station Location");
|
||||
$data['gridsquare'] = $this->input->post('gridsquare');
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('station_profile/create');
|
||||
$this->load->view('station_profile/create', $data);
|
||||
$this->load->view('interface_assets/footer');
|
||||
} else {
|
||||
$this->stations->add();
|
||||
|
||||
@@ -139,7 +139,7 @@ if ($dxcc_list->result() > 0) {
|
||||
<label for="stationGridsquareInput"><?= __("Station Gridsquare"); ?></label>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control uppercase" name="gridsquare" id="stationGridsquareInput" aria-describedby="stationGridInputHelp" required>
|
||||
<input type="text" class="form-control uppercase" name="gridsquare" id="stationGridsquareInput" aria-describedby="stationGridInputHelp" value="<?php if(isset($gridsquare)) { echo $gridsquare; } ?>" required>
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-outline-secondary" onclick="getLocation()"><i class="fas fa-compass"></i> <?= __("Get Gridsquare"); ?></button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user