Merge pull request #1829 from int2001/trim_space

Trim Space for Call at QSO-form at JS and last-defense saving
This commit is contained in:
Joerg (DJ7NT)
2025-04-01 09:15:48 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ class Logbook_model extends CI_Model {
/* Add QSO to Logbook */
function create_qso() {
$callsign = str_replace('Ø', '0', $this->input->post('callsign'));
$callsign = trim(str_replace('Ø', '0', $this->input->post('callsign')));
// Join date+time
$datetime = date("Y-m-d", strtotime($this->input->post('start_date'))) . " " . $this->input->post('start_time');
if (($this->input->post('end_time') ?? '') != '') {

View File

@@ -69,6 +69,7 @@ $('#callsign').on('input', function () {
$(this).val($(this).val().replace(/\s/g, ''));
$(this).val($(this).val().replace(/0/g, 'Ø'));
$(this).val($(this).val().replace(/\./g, '/P'));
$(this).val($(this).val().replace(/\W/g, ''));
});
$('#locator').on('input', function () {