From 8e3aa08845d170633db5fddbecd18e9493d050bc Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 8 Feb 2013 16:22:36 +0530 Subject: [PATCH 1/4] [ticket/11303] add S_TZ_PRESELECT template var add a new template variable to check if timezone has already been selected by the user while registeration. PHPBB3-11303 --- phpBB/includes/ucp/ucp_register.php | 1 + phpBB/styles/prosilver/template/timezone_option.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index c57aec00a0..9434667111 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -457,6 +457,7 @@ class ucp_register 'S_LANG_OPTIONS' => language_select($data['lang']), 'S_TZ_OPTIONS' => $timezone_selects['tz_select'], 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'], + 'S_TZ_PRESELECT' => (!$submit), 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false, 'S_REGISTRATION' => true, 'S_COPPA' => $coppa, diff --git a/phpBB/styles/prosilver/template/timezone_option.html b/phpBB/styles/prosilver/template/timezone_option.html index 320b9b7121..6f09f276ff 100644 --- a/phpBB/styles/prosilver/template/timezone_option.html +++ b/phpBB/styles/prosilver/template/timezone_option.html @@ -6,7 +6,7 @@ {S_TZ_DATE_OPTIONS} - +
From 1994fadb6fcdfd780fb14b9b458d0810541c8a69 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Tue, 12 Feb 2013 11:25:54 +0530 Subject: [PATCH 2/4] [ticket/11303] use S_TZ_PRESELECT in subsilver PHPBB3-11303 --- phpBB/styles/subsilver2/template/timezone_option.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/timezone_option.html b/phpBB/styles/subsilver2/template/timezone_option.html index 7fa310b1bc..71c5cf8a30 100644 --- a/phpBB/styles/subsilver2/template/timezone_option.html +++ b/phpBB/styles/subsilver2/template/timezone_option.html @@ -7,7 +7,7 @@ {S_TZ_DATE_OPTIONS}
- + - +
diff --git a/phpBB/styles/subsilver2/template/timezone.js b/phpBB/styles/subsilver2/template/timezone.js index af8206d12d..5e81a0bfdf 100644 --- a/phpBB/styles/subsilver2/template/timezone.js +++ b/phpBB/styles/subsilver2/template/timezone.js @@ -13,7 +13,7 @@ $(document).ready( ); $(document).ready( - phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('data-is-registration') == 'true') + phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('timezone-preselect') == 'true') ); })(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/styles/subsilver2/template/timezone_option.html b/phpBB/styles/subsilver2/template/timezone_option.html index 71c5cf8a30..26ba2388c9 100644 --- a/phpBB/styles/subsilver2/template/timezone_option.html +++ b/phpBB/styles/subsilver2/template/timezone_option.html @@ -7,7 +7,7 @@ {S_TZ_DATE_OPTIONS}
- +