mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/12858] Rename tz_ prefixed block variables to timezone_ prefix
PHPBB3-12858
This commit is contained in:
parent
ad596f4390
commit
9c310f789f
4 changed files with 35 additions and 35 deletions
|
@ -1,25 +1,25 @@
|
|||
<dl>
|
||||
<dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
|
||||
<!-- IF .tz_date -->
|
||||
<!-- IF .timezone_date -->
|
||||
<dd 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>
|
||||
<!-- BEGIN tz_date -->
|
||||
<option value="{tz_date.VALUE}"<!-- IF tz_date.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_date.TITLE}</option>
|
||||
<!-- END tz_date -->
|
||||
<!-- BEGIN timezone_date -->
|
||||
<option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
|
||||
<!-- END timezone_date -->
|
||||
</select>
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
<dd>
|
||||
<select name="tz" id="timezone" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_TIMEZONE}</option>
|
||||
<!-- BEGIN tz_select -->
|
||||
<optgroup label="{tz_select.LABEL}" data-tz-value="{tz_select.VALUE}">
|
||||
<!-- BEGIN tz_options -->
|
||||
<option title="{tz_select.tz_options.TITLE}" value="{tz_select.tz_options.VALUE}"<!-- IF tz_select.tz_options.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_select.tz_options.LABEL}</option>
|
||||
<!-- END tz_options -->
|
||||
<!-- BEGIN timezone_select -->
|
||||
<optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
|
||||
<!-- BEGIN timezone_options -->
|
||||
<option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
|
||||
<!-- END timezone_options -->
|
||||
</optgroup>
|
||||
<!-- END tz_select -->
|
||||
<!-- END timezone_select -->
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS timezone.js -->
|
||||
|
|
|
@ -1095,13 +1095,13 @@ function phpbb_timezone_select($template, $user, $default = '', $truncate = fals
|
|||
$tz_select .= ($opt_group) ? '</optgroup>' : '';
|
||||
$tz_select .= '<optgroup label="' . $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']) . '">';
|
||||
$opt_group = $timezone['offset'];
|
||||
$template->assign_block_vars('tz_select', array(
|
||||
$template->assign_block_vars('timezone_select', array(
|
||||
'LABEL' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
|
||||
'VALUE' => $key . ' - ' . $timezone['current'],
|
||||
));
|
||||
|
||||
$selected = (!empty($default_offset) && strpos($key, $default_offset) !== false) ? ' selected="selected"' : '';
|
||||
$template->assign_block_vars('tz_date', array(
|
||||
$template->assign_block_vars('timezone_date', array(
|
||||
'VALUE' => $key . ' - ' . $timezone['current'],
|
||||
'SELECTED' => !empty($selected),
|
||||
'TITLE' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
|
||||
|
@ -1113,17 +1113,17 @@ function phpbb_timezone_select($template, $user, $default = '', $truncate = fals
|
|||
{
|
||||
$label = $user->lang['timezones'][$label];
|
||||
}
|
||||
$title = $timezone['offset'] . ' - ' . $label;
|
||||
$title = $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $label);
|
||||
|
||||
if ($truncate)
|
||||
{
|
||||
$label = truncate_string($label, 50, 255, false, '...');
|
||||
}
|
||||
|
||||
// Also generate tz_select for backwards compatibility
|
||||
// Also generate timezone_select for backwards compatibility
|
||||
$selected = ($timezone['tz'] === $default) ? ' selected="selected"' : '';
|
||||
$tz_select .= '<option title="' . $title . '" value="' . $timezone['tz'] . '"' . $selected . '>' . $label . '</option>';
|
||||
$template->assign_block_vars('tz_select.tz_options', array(
|
||||
$template->assign_block_vars('timezone_select.timezone_options', array(
|
||||
'TITLE' => $title,
|
||||
'VALUE' => $timezone['tz'],
|
||||
'SELECTED' => !empty($selected),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<dl>
|
||||
<dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
|
||||
<!-- IF .tz_date -->
|
||||
<!-- IF .timezone_date -->
|
||||
<dd 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>
|
||||
<!-- BEGIN tz_date -->
|
||||
<option value="{tz_date.VALUE}"<!-- IF tz_date.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_date.TITLE}</option>
|
||||
<!-- END tz_date -->
|
||||
<!-- BEGIN timezone_date -->
|
||||
<option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
|
||||
<!-- END timezone_date -->
|
||||
</select>
|
||||
<input type="button" id="tz_select_date_suggest" class="button2" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
|
||||
</dd>
|
||||
|
@ -14,13 +14,13 @@
|
|||
<dd>
|
||||
<select name="tz" id="timezone" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_TIMEZONE}</option>
|
||||
<!-- BEGIN tz_select -->
|
||||
<optgroup label="{tz_select.LABEL}" data-tz-value="{tz_select.VALUE}">
|
||||
<!-- BEGIN tz_options -->
|
||||
<option title="{tz_select.tz_options.TITLE}" value="{tz_select.tz_options.VALUE}"<!-- IF tz_select.tz_options.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_select.tz_options.LABEL}</option>
|
||||
<!-- END tz_options -->
|
||||
<!-- BEGIN timezone_select -->
|
||||
<optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
|
||||
<!-- BEGIN timezone_options -->
|
||||
<option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
|
||||
<!-- END timezone_options -->
|
||||
</optgroup>
|
||||
<!-- END tz_select -->
|
||||
<!-- END timezone_select -->
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS timezone.js -->
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<tr>
|
||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}{L_COLON}</b></td>
|
||||
<td class="row2">
|
||||
<!-- IF .tz_date -->
|
||||
<!-- IF .timezone_date -->
|
||||
<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>
|
||||
<!-- BEGIN tz_date -->
|
||||
<option value="{tz_date.VALUE}"<!-- IF tz_date.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_date.TITLE}</option>
|
||||
<!-- END tz_date -->
|
||||
<!-- BEGIN timezone_date -->
|
||||
<option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
|
||||
<!-- END timezone_date -->
|
||||
</select><br />
|
||||
<input type="button" id="tz_select_date_suggest" class="btnlite" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->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>
|
||||
<!-- BEGIN tz_select -->
|
||||
<optgroup label="{tz_select.LABEL}" data-tz-value="{tz_select.VALUE}">
|
||||
<!-- BEGIN tz_options -->
|
||||
<option title="{tz_select.tz_options.TITLE}" value="{tz_select.tz_options.VALUE}"<!-- IF tz_select.tz_options.SELECTED --> selected="selected"<!-- ENDIF -->>{tz_select.tz_options.LABEL}</option>
|
||||
<!-- END tz_options -->
|
||||
<!-- BEGIN timezone_select -->
|
||||
<optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
|
||||
<!-- BEGIN timezone_options -->
|
||||
<option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
|
||||
<!-- END timezone_options -->
|
||||
</optgroup>
|
||||
<!-- END tz_select -->
|
||||
<!-- END timezone_select -->
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS timezone.js -->
|
||||
|
|
Loading…
Add table
Reference in a new issue