2 <!-- $Id: userprefs.tmpl,v 1.23 2002-08-23 18:29:34 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 $SelectThemes = ''; $SelectLanguages = '';
24 $SelectThemesDesc = ''; $SelectLanguagesDesc = '';
25 $SelectOptions = HTML();
26 if (!empty($available_themes) and is_array($available_themes)) {
27 foreach ($available_themes as $theme) {
28 if ($theme == $request->getPref('theme'))
29 $SelectOptions->pushContent(HTML::option(array('value' => $theme,'selected'=>"selected"),$theme));
31 $SelectOptions->pushContent(HTML::option(array('value' => $theme),$theme));
33 $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'),
35 $SelectThemesDesc = _("Select your theme");
38 $SelectOptions = HTML();
39 if (!empty($available_languages) and is_array($available_languages)) {
40 foreach ($available_languages as $lang) {
41 if ($theme == $request->getPref('lang'))
42 $SelectOptions->pushContent(HTML::option(array('value' => $lang,'selected'=>"selected"),$lang));
44 $SelectOptions->pushContent(HTML::option(array('value' => $lang),$lang));
46 $SelectLanguages = HTML::select(array('name' => "pref[lang]",'id' => 'lang'),
48 $SelectLanguagesDesc = _("Select your language");
50 if ($SelectThemes == '')
55 if (empty($errmsg)) $errmsg = false;
56 else $errmsg = HTML(HTML::h4(array('class' => 'errors'), $errmsg),HTML::hr());
59 <form action="<?=$request->getURLtoSelf()?>" method="post">
61 <?php if ($changePass) { ?>
62 <h2><?=_("Change Password")?></h2>
63 <input type="password" name="pref[passwd]" size="16" maxlength="16" class="text" value="" /> <?=_("New password")?>.<br />
64 <input type="password" name="pref[passwd2]" size="16" maxlength="16" class="text" value="" /> <?=_("Type it again")?>.
67 <?php if ($email or $notifyPages) { ?>
68 <h2><?=_("Email Notification")?></h2>
69 <p><?=_("Your E-Mail:")?>
70 <?php if ($email) { ?>
71 <input type="text" name="pref[email]" size="30" maxlength="60"
72 value="<?=$request->getPref('email')?>" />
73 <?php } else { ?><?=$request->getPref('email')?><?php } ?>
74 <?= _("Status") ?>:
75 <?php if ($request->getPref('emailVerified')) { ?>
76 <?= _("Email verified.") ?>
78 <?= _("Email not yet verified.") ?>
81 <p class="hint">(<?=_("Note, that user accounts with bouncing emails will be disabled.")?>)</p>
82 <?php if ($notifyPages) { ?>
83 <p><?=_("Get an email notification at changes of the following pages")?>:<br />
84 <textarea name="pref[notifyPages]" cols="50" rows="5"><?=$request->getPref('notifyPages')?></textarea>
85 <p class="hint">(<?=_("Enter pages seperated by space or comma. Wildcards (fileglobbing) allowed.")?>)</p>
90 <?php if ($appearance) { ?>
91 <h2><?=_("Appearance")?></h2>
93 <tr><td><?=$SelectThemesDesc?>:</td><td><?=$SelectLanguagesDesc?>:</td></tr>
94 <tr><td><?= $SelectThemes ?></td><td><?= $SelectLanguages ?></td></tr>
98 <?php if ($editAreaSize) { ?>
99 <h2><?=_("Edit Area Size")?></h2>
101 <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric"
102 value="<?=$request->getPref('editHeight')?>" />
104 <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric"
105 value="<?=$request->getPref('editWidth')?>" />
107 <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>
110 <?php if ($timeOffset) { ?>
111 <h2><?=_("Time Zone")?></h2>
113 <?=fmt("Add %s hours to the server's local time when reporting times.",
117 <?=fmt("The current time at the server is %s.",
118 HTML::strong($Theme->formatDateTime($serverTime)))?>
119 <?=fmt("With the current offset, this would be reported as %s.",
120 HTML::strong($Theme->formatDateTime($time)))?>
124 <?php if ($relativeDates) { ?>
125 <h2><?=_("Date Format")?></h2>
126 <p><?=$RelativeDatesCB?>
127 <?=_("Show relative dates using 'Today' and 'Yesterday'.")?>
130 <?php if ($request->isActionPage($request->getArg('pagename'))) { ?>
132 <p><?=Button("submit:", _("Update Preferences"), 'wikiadmin')?><?=Button("submit:cancel", _("Cancel"), 'button')?></p>
133 <input type="hidden" name="action" value="<?=$request->getArg('pagename')?>">
134 <?= HiddenGets(array('pref')) ?>