From ad2d7e756c101a387b4449ee0fcbfcbaac286d28 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 27 Oct 2023 10:12:30 +0200 Subject: [PATCH] Add button to reset start time --- application/views/interface_assets/footer.php | 7 ++++++- application/views/qso/index.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 5cdc045c..c84900aa 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -995,6 +995,12 @@ $(document).on('keypress',function(e) { } ); }); + $('#reset_time').click(function() { + var now = new Date(); + var localTime = now.getTime(); + var utc = localTime + (now.getTimezoneOffset() * 60000); + $('#start_time').val(("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2)); + }); }); @@ -1124,7 +1130,6 @@ $(document).on('keypress',function(e) { $('#start_time').focusout(function() { if (manual && $('#start_time').val() != '') { $('#end_time').val($('#start_time').val()); - console.log("HERE!"); } }); diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 45f86acd..d2353ccd 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -58,7 +58,7 @@
- + required pattern="[0-2][0-9]:[0-5][0-9]">