diff --git a/application/config/migration.php b/application/config/migration.php index 7e5aa27d7..9ee21a4bd 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 147; +$config['migration_version'] = 148; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 5fa968f1d..f54c6d04e 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -68,6 +68,7 @@ class QSO extends CI_Controller { $qso_data = array( 'start_date' => $this->input->post('start_date'), 'start_time' => $this->input->post('start_time'), + 'end_time' => $this->input->post('end_time'), 'time_stamp' => time(), 'band' => $this->input->post('band'), 'band_rx' => $this->input->post('band_rx'), diff --git a/application/controllers/User.php b/application/controllers/User.php index 57b8e0ecb..8d6769a21 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -90,6 +90,7 @@ class User extends CI_Controller { $data['user_mastodon_url'] = $this->input->post('user_mastodon_url'); $data['user_default_band'] = $this->input->post('user_default_band'); $data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''); + $data['user_qso_end_times'] = $this->input->post('user_qso_end_times'); $data['language'] = $this->input->post('language'); $this->load->view('user/add', $data); } else { @@ -125,6 +126,7 @@ class User extends CI_Controller { $this->input->post('user_mastodon_url'), $this->input->post('user_default_band'), ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''), + $this->input->post('user_qso_end_times'), $this->input->post('language'), )) { // Check for errors @@ -172,6 +174,7 @@ class User extends CI_Controller { $data['user_mastodon_url'] = $this->input->post('user_mastodon_url'); $data['user_default_band'] = $this->input->post('user_default_band'); $data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''); + $data['user_qso_end_times'] = $this->input->post('user_qso_end_times'); $data['language'] = $this->input->post('language'); $this->load->view('user/add', $data); $this->load->view('interface_assets/footer'); @@ -389,6 +392,12 @@ class User extends CI_Controller { $data['user_show_notes'] = $q->user_show_notes; } + if($this->input->post('user_qso_end_times')) { + $data['user_qso_end_times'] = $this->input->post('user_qso_end_times', true); + } else { + $data['user_qso_end_times'] = $q->user_qso_end_times; + } + if($this->input->post('user_show_profile_image')) { $data['user_show_profile_image'] = $this->input->post('user_show_profile_image', false); } else { @@ -529,6 +538,7 @@ class User extends CI_Controller { $data['user_mastodon_url'] = $this->input->post('user_mastodon_url'); $data['user_default_band'] = $this->input->post('user_default_band'); $data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''); + $data['user_qso_end_times'] = $this->input->post('user_qso_end_times'); $data['language'] = $this->input->post('language'); $data['user_winkey'] = $this->input->post('user_winkey'); $this->load->view('user/edit'); diff --git a/application/language/bulgarian/account_lang.php b/application/language/bulgarian/account_lang.php index 6ced0516f..7a6b97e48 100644 --- a/application/language/bulgarian/account_lang.php +++ b/application/language/bulgarian/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/bulgarian/general_words_lang.php b/application/language/bulgarian/general_words_lang.php index 986f9322b..f065274aa 100644 --- a/application/language/bulgarian/general_words_lang.php +++ b/application/language/bulgarian/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Дата'; $lang['general_word_time'] = 'Час'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Дата/Час'; $lang['general_word_none'] = 'Нито едно'; $lang['general_word_name'] = 'Име'; diff --git a/application/language/chinese_simplified/account_lang.php b/application/language/chinese_simplified/account_lang.php index e59c5728c..3ca0c89c2 100644 --- a/application/language/chinese_simplified/account_lang.php +++ b/application/language/chinese_simplified/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = '梅登海德网格'; $lang['account_cloudlog_preferences'] = '偏好选项'; $lang['account_timezone'] = '时区'; $lang['account_date_format'] = '日期格式'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = '距离单位偏好'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '选择您登录账户时要显示的日期格式'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = '选择距离单位'; diff --git a/application/language/chinese_simplified/general_words_lang.php b/application/language/chinese_simplified/general_words_lang.php index 52fa450f4..76a808da3 100644 --- a/application/language/chinese_simplified/general_words_lang.php +++ b/application/language/chinese_simplified/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = '日期'; $lang['general_word_time'] = '时间'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = '日期/时间'; $lang['general_word_none'] = '无'; $lang['general_word_name'] = '名称'; diff --git a/application/language/czech/account_lang.php b/application/language/czech/account_lang.php index 2c92fe145..9992b46bf 100644 --- a/application/language/czech/account_lang.php +++ b/application/language/czech/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Locátor'; $lang['account_cloudlog_preferences'] = 'Nastavení Cloudlogu'; $lang['account_timezone'] = 'Časové pásmo'; $lang['account_date_format'] = 'Formát data'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Nastavení měření'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Vyberte, jak chcete, aby byla data zobrazena při přihlášení do vašeho účtu.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Vyberte, v jakých jednotkách se budou zobrazovat vzdálenosti.'; diff --git a/application/language/czech/general_words_lang.php b/application/language/czech/general_words_lang.php index 3541095c2..65d88d996 100644 --- a/application/language/czech/general_words_lang.php +++ b/application/language/czech/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Datum'; $lang['general_word_time'] = 'Čas'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Datum/čas'; $lang['general_word_none'] = 'Žádné'; $lang['general_word_name'] = 'Jméno'; diff --git a/application/language/dutch/account_lang.php b/application/language/dutch/account_lang.php index e82f3c209..8206f8348 100644 --- a/application/language/dutch/account_lang.php +++ b/application/language/dutch/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/dutch/general_words_lang.php b/application/language/dutch/general_words_lang.php index 5a7bf0956..1821868bd 100644 --- a/application/language/dutch/general_words_lang.php +++ b/application/language/dutch/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Datum'; $lang['general_word_time'] = 'Tijd'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Date/Time'; $lang['general_word_none'] = 'Geen'; $lang['general_word_name'] = 'Naam'; diff --git a/application/language/english/account_lang.php b/application/language/english/account_lang.php index 4fd8019cd..8f4f7be27 100644 --- a/application/language/english/account_lang.php +++ b/application/language/english/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index 4b600ed5e..4d303ba14 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Date'; $lang['general_word_time'] = 'Time'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Date/Time'; $lang['general_word_none'] = 'None'; $lang['general_word_name'] = 'Name'; diff --git a/application/language/finnish/account_lang.php b/application/language/finnish/account_lang.php index 273ce8b58..9337afa19 100644 --- a/application/language/finnish/account_lang.php +++ b/application/language/finnish/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Asetukset'; $lang['account_timezone'] = 'Aikavyöhyke'; $lang['account_date_format'] = 'Päivämäärämuoto'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Mittayksikkömuoto'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Valitse, miten haluat päivämäärät näkyvän, kun olet kirjautunut tilillesi.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Valitse, mitä mittayksikkömuotoa käytetään'; diff --git a/application/language/finnish/general_words_lang.php b/application/language/finnish/general_words_lang.php index dc0e27a26..ba0ccfb2d 100644 --- a/application/language/finnish/general_words_lang.php +++ b/application/language/finnish/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Päivä'; $lang['general_word_time'] = 'Aika'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Päivä/Aika'; $lang['general_word_none'] = 'None'; $lang['general_word_name'] = 'Nimi'; diff --git a/application/language/french/account_lang.php b/application/language/french/account_lang.php index 7f68aa8cc..e5819c114 100644 --- a/application/language/french/account_lang.php +++ b/application/language/french/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Locator'; $lang['account_cloudlog_preferences'] = 'Préférences Cloudlog'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Format de la date'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Unité de mesure'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '(Sélectionnez le format de date à afficher)'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = '(Choisiez l\'unité de mesure à afficher)'; diff --git a/application/language/french/general_words_lang.php b/application/language/french/general_words_lang.php index e55234364..1dadf7a3b 100644 --- a/application/language/french/general_words_lang.php +++ b/application/language/french/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Date'; $lang['general_word_time'] = 'Heure'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Date/Heure'; $lang['general_word_none'] = 'Aucun'; $lang['general_word_name'] = 'Nom'; diff --git a/application/language/german/account_lang.php b/application/language/german/account_lang.php index ac2448fbd..b7cc58f00 100644 --- a/application/language/german/account_lang.php +++ b/application/language/german/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Planquadrat'; $lang['account_cloudlog_preferences'] = 'Cloudlog Einstellungen'; $lang['account_timezone'] = 'Zeitzone'; $lang['account_date_format'] = 'Datumsformat'; +$lang['account_log_end_time'] = 'Logge Endzeiten für QSOs separat'; +$lang['account_log_end_time_hint'] = 'Wenn aktiviert, werden QSO Endzeiten separat erfasst. Falls nicht, ist die QSO Endzeit gleich der Startzeit.'; $lang['account_measurement_preferences'] = 'Entfernungsformat'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Wähle, wie Datumsfelder angezeigt werden sollen, wenn du eingeloggt bist.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Wähle, in welcher Einheit Entfernungen angezeigt werden sollen.'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index ec4d5e0d8..099119849 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Importieren"; $lang['general_word_date'] = 'Datum'; $lang['general_word_time'] = 'Zeit'; +$lang['general_word_time_on'] = 'Startzeit'; +$lang['general_word_time_off'] = 'Endzeit'; $lang['general_word_datetime'] = 'Datum/Uhrzeit'; $lang['general_word_none'] = 'Nichts/Keine'; $lang['general_word_name'] = 'Name'; diff --git a/application/language/greek/account_lang.php b/application/language/greek/account_lang.php index 8b7a73a16..a030ad781 100644 --- a/application/language/greek/account_lang.php +++ b/application/language/greek/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/greek/general_words_lang.php b/application/language/greek/general_words_lang.php index b0cffe91b..30bea22fc 100644 --- a/application/language/greek/general_words_lang.php +++ b/application/language/greek/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Ημερομηνία'; $lang['general_word_time'] = 'Ωρα'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Ημερομηνία/Ωρα'; $lang['general_word_none'] = 'None'; $lang['general_word_name'] = 'όνομα'; diff --git a/application/language/italian/account_lang.php b/application/language/italian/account_lang.php index bb5f1ec0f..70930ce13 100644 --- a/application/language/italian/account_lang.php +++ b/application/language/italian/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/italian/general_words_lang.php b/application/language/italian/general_words_lang.php index f3afc2677..65284c355 100644 --- a/application/language/italian/general_words_lang.php +++ b/application/language/italian/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Data'; $lang['general_word_time'] = 'Orario'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Data/Orario'; $lang['general_word_none'] = 'Nessuno'; $lang['general_word_name'] = 'Nome'; diff --git a/application/language/polish/account_lang.php b/application/language/polish/account_lang.php index 366f0520d..e5b6a2b55 100644 --- a/application/language/polish/account_lang.php +++ b/application/language/polish/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/polish/general_words_lang.php b/application/language/polish/general_words_lang.php index f5a4aa8ca..57ebacbce 100644 --- a/application/language/polish/general_words_lang.php +++ b/application/language/polish/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Data'; $lang['general_word_time'] = 'Godzina'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Data/Godzina'; $lang['general_word_none'] = 'Nic'; $lang['general_word_name'] = 'Imie'; diff --git a/application/language/russian/account_lang.php b/application/language/russian/account_lang.php index b26cfbab6..73c6140c7 100644 --- a/application/language/russian/account_lang.php +++ b/application/language/russian/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'QTH локатор'; $lang['account_cloudlog_preferences'] = 'Настройки Cloudlog'; $lang['account_timezone'] = 'Часовой пояс'; $lang['account_date_format'] = 'Формат даты'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Единицы измерения'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Выберите представление даты для отображения в вашем аккаунте.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Выберите единицы измерения расстояния'; diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index 4a3d743c0..b9024fbc4 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Дата'; $lang['general_word_time'] = 'Время'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Дата/Время'; $lang['general_word_none'] = '-'; $lang['general_word_name'] = 'Имя'; diff --git a/application/language/spanish/account_lang.php b/application/language/spanish/account_lang.php index 28e0d77e7..2187231a2 100644 --- a/application/language/spanish/account_lang.php +++ b/application/language/spanish/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/spanish/general_words_lang.php b/application/language/spanish/general_words_lang.php index 89001beb4..a69014b15 100644 --- a/application/language/spanish/general_words_lang.php +++ b/application/language/spanish/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Fecha'; $lang['general_word_time'] = 'Hora'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Fecha/Hora'; $lang['general_word_none'] = 'Ninguno'; $lang['general_word_name'] = 'Nombre'; diff --git a/application/language/swedish/account_lang.php b/application/language/swedish/account_lang.php index 0c61964ef..344de1cd3 100644 --- a/application/language/swedish/account_lang.php +++ b/application/language/swedish/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Tidszon'; $lang['account_date_format'] = 'Datumformat'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Välj hur du vill att datum ska visas när du är inloggad på ditt konto.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Välj i vilken enhetsavstånd som ska visas'; diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index 68529c76f..b2d906455 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -1,3 +1,4 @@ +<<<<<<< HEAD here to do it!'; $lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; \ No newline at end of file +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; diff --git a/application/language/turkish/account_lang.php b/application/language/turkish/account_lang.php index 3c6fb8cf3..6a66ff6ec 100644 --- a/application/language/turkish/account_lang.php +++ b/application/language/turkish/account_lang.php @@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare'; $lang['account_cloudlog_preferences'] = 'Cloudlog Preferences'; $lang['account_timezone'] = 'Timezone'; $lang['account_date_format'] = 'Date Format'; +$lang['account_log_end_time'] = 'Log End Times for QSOs Separately'; +$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.'; $lang['account_measurement_preferences'] = 'Measurement preference'; $lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.'; $lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in'; diff --git a/application/language/turkish/general_words_lang.php b/application/language/turkish/general_words_lang.php index 5cf75e639..b56e749e7 100644 --- a/application/language/turkish/general_words_lang.php +++ b/application/language/turkish/general_words_lang.php @@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import"; $lang['general_word_date'] = 'Tarih'; $lang['general_word_time'] = 'Saat'; +$lang['general_word_time_on'] = 'Time on'; +$lang['general_word_time_off'] = 'Time off'; $lang['general_word_datetime'] = 'Tarih/Saat'; $lang['general_word_none'] = 'Hiçbiri'; $lang['general_word_name'] = 'İsim'; diff --git a/application/migrations/148_qso_end_times.php b/application/migrations/148_qso_end_times.php new file mode 100644 index 000000000..11c71fd5c --- /dev/null +++ b/application/migrations/148_qso_end_times.php @@ -0,0 +1,29 @@ +db->field_exists('user_qso_end_times', 'users')) { + $fields = array( + 'user_qso_end_times integer DEFAULT 0 AFTER user_default_confirmation', + ); + + $this->dbforge->add_column('users', $fields); + } + } + + public function down() + { + if ($this->db->field_exists('user_qso_end_times', 'users')) { + $this->dbforge->drop_column('users', 'user_qso_end_times'); + } + } +} diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 98cabe72a..bd54ec0ac 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -8,6 +8,11 @@ class Logbook_model extends CI_Model { $callsign = 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') != null) { + $datetime_off = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('end_time'); + } else { + $datetime_off = $datetime; + } if ($this->input->post('prop_mode') != null) { $prop_mode = $this->input->post('prop_mode'); } else { @@ -174,7 +179,7 @@ class Logbook_model extends CI_Model { // Create array with QSO Data $data = array( 'COL_TIME_ON' => $datetime, - 'COL_TIME_OFF' => $datetime, + 'COL_TIME_OFF' => $datetime_off, 'COL_CALL' => strtoupper(trim($callsign)), 'COL_BAND' => $this->input->post('band'), 'COL_BAND_RX' => $this->input->post('band_rx'), diff --git a/application/models/User_model.php b/application/models/User_model.php index 4b34c6647..46eb03da2 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -124,7 +124,7 @@ class User_Model extends CI_Model { $measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup, $user_pota_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5, $user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url, - $user_default_band, $user_default_confirmation, $language) { + $user_default_band, $user_default_confirmation, $user_qso_end_times, $language) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -156,6 +156,7 @@ class User_Model extends CI_Model { 'user_mastodon_url' => xss_clean($user_mastodon_url), 'user_default_band' => xss_clean($user_default_band), 'user_default_confirmation' => xss_clean($user_default_confirmation), + 'user_qso_end_times' => xss_clean($user_qso_end_times), 'language' => xss_clean($language), ); @@ -217,6 +218,7 @@ class User_Model extends CI_Model { 'user_mastodon_url' => xss_clean($fields['user_mastodon_url']), 'user_default_band' => xss_clean($fields['user_default_band']), 'user_default_confirmation' => (isset($fields['user_default_confirmation_qsl']) ? 'Q' : '').(isset($fields['user_default_confirmation_lotw']) ? 'L' : '').(isset($fields['user_default_confirmation_eqsl']) ? 'E' : ''), + 'user_qso_end_times' => xss_clean($fields['user_qso_end_times']), 'language' => xss_clean($fields['language']), 'winkey' => xss_clean($fields['user_winkey']), ); @@ -343,6 +345,7 @@ class User_Model extends CI_Model { 'user_mastodon_url' => $u->row()->user_mastodon_url, 'user_default_band' => $u->row()->user_default_band, 'user_default_confirmation' => $u->row()->user_default_confirmation, + 'user_qso_end_times' => isset($u->row()->user_qso_end_times) ? $u->row()->user_qso_end_times : 1, 'active_station_logbook' => $u->row()->active_station_logbook, 'language' => isset($u->row()->language) ? $u->row()->language: 'english', 'isWinkeyEnabled' => $u->row()->winkey, diff --git a/application/views/contesting/index.php b/application/views/contesting/index.php index 4a6026af1..7a00967a5 100644 --- a/application/views/contesting/index.php +++ b/application/views/contesting/index.php @@ -45,7 +45,7 @@
- > + >
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 2652fa9d1..c71433447 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -32,7 +32,6 @@ - @@ -1000,6 +999,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)); + }); }); @@ -1110,24 +1115,24 @@ $(document).on('keypress',function(e) { if ( ! manual ) { $(function($) { - var options = { - utc: true, - format: '%H:%M:%S' - } - $('.input_time').jclock(options); - }); - - $(function($) { - var options = { - utc: true, - format: '%d-%m-%Y' - } - $('.input_date').jclock(options); + resetTimers(); }); } }); - +session->userdata('user_qso_end_times') == 1) { ?> + $('#callsign').focusout(function() { + if (! manual && $('#callsign').val() != '') { + clearInterval(handleStart); + clearInterval(handleDate); + } + }); + $('#start_time').focusout(function() { + if (manual && $('#start_time').val() != '') { + $('#end_time').val($('#start_time').val()); + } + }); + jQuery(function($) { var input = $('#callsign'); @@ -1146,6 +1151,9 @@ $(document).on('keypress',function(e) { } if (e.key === "Escape") { // escape key maps to keycode `27` reset_fields(); + if ( ! manual ) { + resetTimers() + } $('#callsign').val(""); $("#callsign").focus(); } @@ -1320,6 +1328,21 @@ $(document).on('keypress',function(e) { $('#rst_rcvd').val('59'); } } + + function getUTCTimeStamp(el) { + var now = new Date(); + var localTime = now.getTime(); + var utc = localTime + (now.getTimezoneOffset() * 60000); + $(el).attr('value', ("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2)); + } + + function getUTCDateStamp(el) { + var now = new Date(); + var localTime = now.getTime(); + var utc = localTime + (now.getTimezoneOffset() * 60000); + $(el).attr('value', ("0" + now.getUTCDate()).slice(-2)+'-'+("0" + (now.getUTCMonth()+1)).slice(-2)+'-'+now.getUTCFullYear()); + } +