}
$admin->row_list(T('The authentication class to use to validate cookie data and longins. You may need to edit the actual file for certain authentication systems.'), 'setting[authmethod]');
- // defaulttimezone
- $admin->row_span(T('Default Time Zone'), 'thead');
- $admin->row_text(T('This controls the time zone that all unregistered users view the tracker with.'), construct_option_select('setting[defaulttimezone]', $bugsys->datef->fetch_timezone_list(), $bugsys->options['defaulttimezone']), $bugsys->options['defaulttimezone']);
-
// defaultlanguage
$admin->row_span(T('Default Language'), 'thead');
$admin->row_text(T('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', Bugdar::$datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']);
public function Invoke(http\Request $request, http\Response $response)
{
+ // TODO(port): global.
+ global $bugsys;
+
$response->data['title'] = T('Settings');
$response->context['template'] = 'admin_settings';
+ $response->data['timezone_list'] = $bugsys->datef->fetch_timezone_list();
+
// Save settings on POST.
if ($request->http_method == 'POST') {
$query_bits = array();
title="{%=T('Date Format')%}"
description="{%=T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.')%}"
value="{%= Bugdar::$options['dateformat'] %}">
- <!-- defaulttimezone -->
+ <tr>
+ <th>
+ <label for="setting-defaulttimezone">{%=T('Default Time Zone')%}</label>
+ <dfn>{%=T('This controls the time zone that all unregistered users view the tracker with.')%}</dfn>
+ </th>
+ <td>
+ <select id="setting-defaulttimezone" name="settings[defaulttimezone]">
+ {% foreach ($timezone_list as $offset => $name): %}
+ <option value="{%= $offset %}" {%= ($offset == Bugdar::$options['defaulttimezone']) ? 'selected' : '' %}>{%= $name %}</option>
+ {% endforeach %}
+ </select>
+ </td>
+ </tr>
<!-- defaultlanguage -->
<tr setting-type="text"
name="syndicateditems"