getArg('pagename');
if ($request->isActionPage($request->getArg('pagename')) and
$plugin != _("PreferencesInfo")) {
$isForm = true;
}
$time = time();
$offset = $request->getPref('timeOffset') * 3600;
$serverTime = $time - $offset;
if ( $isForm )
$timeOffsetInput = HTML::input(array('type' => "text",
'size' => 6,
'maxlength' => 6,
'name' => "pref[timeOffset]",
'class' => "numeric",
'value' => $request->getPref('timeOffset')));
else
$timeOffsetInput = $request->getPref('timeOffset');
$RelativeDatesCB = HTML(HTML::input(array('type' => 'hidden',
'name' => 'pref[relativeDates][]',
'value' => '0')),
HTML::input(array('type' => 'checkbox',
'name' => 'pref[relativeDates][]',
'value' => '1',
'checked' => (bool) $request->getPref('relativeDates'))));
function selectedOption ($value, $label = false) {
return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n");
}
function unselectedOption ($value, $label = false) {
return HTML::option(array('value' => $value), ($label ? $label : $value) . "\n");
}
$SelectThemes = ''; $SelectLanguages = '';
$SelectThemesDesc = ''; $SelectLanguagesDesc = '';
if ( $isForm ) {
$SelectOptions = HTML();
if (!empty($available_themes) and is_array($available_themes)) {
if (! $request->getPref('theme'))
$SelectOptions->pushContent(selectedOption('',_("
= _("Default system theme") ?>: | =_("Default system language")?>: |
= THEME ?> | = DEFAULT_LANGUAGE ?> |
= $SelectThemesDesc?>: | =$SelectLanguagesDesc?>: |
= $SelectThemes ?> | = $SelectLanguages ?> |
=_("Here you can override site-specific default values. Currently not recommended!")?>
=_("Height")?> =$request->getPref('editHeight')?> =_("Width")?> =$request->getPref('editWidth')?>
=_("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.")?>
=fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput)?>
=fmt("The current time at the server is %s.", HTML::strong($Theme->formatDateTime($serverTime)))?> =fmt("With the current offset, this would be reported as %s.", HTML::strong($Theme->formatDateTime($time)))?>
=$RelativeDatesCB?> =_("Show relative dates using 'Today' and 'Yesterday'.")?>
=Button("submit:", _("Update Preferences"), 'wikiadmin')?>=Button("submit:cancel", _("Cancel"), 'button')?>
= HiddenGets(array('pref')) ?>