diff options
author | Nils Adermann <naderman@naderman.de> | 2012-07-19 08:46:25 -0700 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2012-07-19 08:46:25 -0700 |
commit | 737828f00911ba145697ef4060401e50e5b711af (patch) | |
tree | 4ec7097ac7c5ffeb3b00c62d09ce9d5955a5c5d8 /phpBB/styles/subsilver2/template | |
parent | c896cd06dd8fba023e2ab6f9cd3f8293d382fb70 (diff) | |
parent | 7df1c84447903ecc97a8418339ec6933bdfc9035 (diff) | |
download | forums-737828f00911ba145697ef4060401e50e5b711af.tar forums-737828f00911ba145697ef4060401e50e5b711af.tar.gz forums-737828f00911ba145697ef4060401e50e5b711af.tar.bz2 forums-737828f00911ba145697ef4060401e50e5b711af.tar.xz forums-737828f00911ba145697ef4060401e50e5b711af.zip |
Merge pull request #843 from nickvergessen/feature/new-tz-handling
Feature/new tz handling
Diffstat (limited to 'phpBB/styles/subsilver2/template')
4 files changed, 43 insertions, 14 deletions
diff --git a/phpBB/styles/subsilver2/template/timezone.js b/phpBB/styles/subsilver2/template/timezone.js new file mode 100644 index 0000000000..da0a2b0bfd --- /dev/null +++ b/phpBB/styles/subsilver2/template/timezone.js @@ -0,0 +1,19 @@ +(function($) { // Avoid conflicts with other libraries + +$('#tz_date').change(function() { + phpbb.timezone_switch_date(false); +}); + +$('#tz_select_date_suggest').click(function(){ + phpbb.timezone_preselect_select(true); +}); + +$(document).ready( + phpbb.timezone_enable_date_selection +); + +$(document).ready( + phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == '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 new file mode 100644 index 0000000000..3f1e14b33d --- /dev/null +++ b/phpBB/styles/subsilver2/template/timezone_option.html @@ -0,0 +1,20 @@ +<tr> + <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td> + <td class="row2"> + <!-- IF S_TZ_DATE_OPTIONS --> + <div id="tz_select_date" style="display: none;"> + <select name="tz_date" id="tz_date" class="autowidth tz_select"> + <option value="">{L_SELECT_CURRENT_TIME}</option> + {S_TZ_DATE_OPTIONS} + </select><br /> + <input id="tz_select_date_suggest" class="btnlite" style="display: none;" data-is-registration="<!-- IF S_REGISTRATION -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" /> + </div> + <!-- ENDIF --> + <select name="tz" id="timezone" class="autowidth tz_select"> + <option value="">{L_SELECT_TIMEZONE}</option> + {S_TZ_OPTIONS} + </select> + + <!-- INCLUDEJS template/timezone.js --> + </td> +</tr> diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index 8e4b04fc10..bf0e67d68b 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -71,16 +71,7 @@ <td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td> </tr> <!-- ENDIF --> -<tr> - <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td> - <td class="row2"> - <select id="tz" name="tz">{S_TZ_OPTIONS}</select> - </td> -</tr> -<tr> - <td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td> - <td class="row2"><input type="radio" class="radio" name="dst" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_YES}</span> <input type="radio" class="radio" name="dst" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_NO}</span></td> -</tr> +<!-- INCLUDE timezone_option.html --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td> <td class="row2"> diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html index 0c3533292d..095c97ed49 100644 --- a/phpBB/styles/subsilver2/template/ucp_register.html +++ b/phpBB/styles/subsilver2/template/ucp_register.html @@ -53,10 +53,9 @@ <td class="row1"><b class="genmed">{L_LANGUAGE}: </b></td> <td class="row2"><select name="lang" onchange="change_language(this.value); return false;">{S_LANG_OPTIONS}</select></td> </tr> -<tr> - <td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td> - <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td> -</tr> + +<!-- INCLUDE timezone_option.html --> + <!-- IF .profile_fields --> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td> |