2 <!-- $Id: userprefs.tmpl,v 1.22 2002-08-22 23:28:32 rurban Exp $ -->
6 $offset = $request->getPref('timeOffset') * 3600;
7 $serverTime = $time - $offset;
9 $timeOffsetInput = HTML::input(array('type' => "text",
12 'name' => "pref[timeOffset]",
14 'value' => $request->getPref('timeOffset')));
16 $RelativeDatesCB = HTML(HTML::input(array('type' => 'hidden',
17 'name' => 'pref[relativeDates][]',
19 HTML::input(array('type' => 'checkbox',
20 'name' => 'pref[relativeDates][]',
22 'checked' => (bool) $request->getPref('relativeDates'))));
23 $SelectOptions = HTML();
24 if (!empty($available_themes) and is_array($available_themes)) {
25 foreach ($available_themes as $theme) {
26 if ($theme == $request->getPref('theme'))
27 $SelectOptions->pushContent(HTML::option(array('value' => $theme,'selected'=>"selected"),$theme));
29 $SelectOptions->pushContent(HTML::option(array('value' => $theme),$theme));
31 $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'),
36 if (empty($errmsg)) $errmsg = false;
37 else $errmsg = HTML(HTML::h4(array('class' => 'errors'), $errmsg),HTML::hr());
40 <form action="<?=$request->getURLtoSelf()?>" method="post">
42 <?php if ($changePass) { ?>
43 <h2><?=_("Change Password")?></h2>
44 <input type="password" name="pref[passwd]" size="16" maxlength="16" class="text" value="" /> <?=_("New password")?>.<br />
45 <input type="password" name="pref[passwd2]" size="16" maxlength="16" class="text" value="" /> <?=_("Type it again")?>.
48 <?php if ($email or $notifyPages) { ?>
49 <h2><?=_("Email Notification")?></h2>
50 <p><?=_("Your E-Mail:")?>
51 <?php if ($email) { ?>
52 <input type="text" name="pref[email]" size="30" maxlength="60"
53 value="<?=$request->getPref('email')?>" />
54 <?php } else { ?><?=$request->getPref('email')?><?php } ?>
56 <p class="hint">(<?=_("Note, that user accounts with bouncing emails will be automatically disabled.")?>)</p>
57 <?php if ($notifyPages) { ?>
58 <p><?=_("Get an email notification at changes of the following pages")?>:<br />
59 <textarea name="pref[notifyPages]" cols="50" rows="5"><?=$request->getPref('notifyPages')?></textarea>
60 <p class="hint">(<?=_("Enter pages seperated by space or brackets. Wildcards allowed.")?>)</p>
65 <?php if ($changeTheme) { ?>
66 <h2><?=_("Change Theme")?></h2>
67 <p><?=_("Select your default theme")?>:<br />
71 <?php if ($editAreaSize) { ?>
72 <h2><?=_("Edit Area Size")?></h2>
74 <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric"
75 value="<?=$request->getPref('editHeight')?>" />
77 <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric"
78 value="<?=$request->getPref('editWidth')?>" />
80 <p class="hint"><?=_("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.")?></p>
83 <?php if ($timeOffset) { ?>
84 <h2><?=_("Time Zone")?></h2>
86 <?=fmt("Add %s hours to the server's local time when reporting times.",
90 <?=fmt("The current time at the server is %s.",
91 HTML::strong($Theme->formatDateTime($serverTime)))?>
92 <?=fmt("With the current offset, this would be reported as %s.",
93 HTML::strong($Theme->formatDateTime($time)))?>
97 <?php if ($relativeDates) { ?>
98 <h2><?=_("Date Format")?></h2>
99 <p><?=$RelativeDatesCB?>
100 <?=_("Show relative dates using 'Today' and 'Yesterday'.")?>
103 <?php if ($request->isActionPage($request->getArg('pagename'))) { ?>
105 <p><?=Button("submit:", _("Update Preferences"), 'wikiadmin')?><?=Button("submit:cancel", _("Cancel"), 'button')?></p>
106 <input type="hidden" name="action" value="<?=$request->getArg('pagename')?>">
107 <?= HiddenGets(array('pref')) ?>