home changes contents help options

Edit history

Edit: -1 of 1
Time: 2007-01-27 23:26:47
Note: /domains/culverden/wiki/UserOptions/edit

changed:
-
<dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=utf-8')">
<p>
  <dtml-translate domain="zwiki">Set your preferences for this wiki:</dtml-translate> 
</p>

<dtml-with "REQUEST # needed in cmf/plone for some reason I can't fathom">
<dtml-let 
 RESPONSE="REQUEST.RESPONSE"
 cookiepath="'/' #wikiUrl() # issue 928"
 cookieduration="(ZopeTime() + 365).rfc822() # 1 year"
 cookielist="[
   'zwiki_username',
   'email',
   'zwiki_height',
   'zwiki_timezone',
   'zwiki_displaymode',
   ]"
 oldcookies="[
   'zwiki_bookmarks',
   'zwiki_showquote',
   'zwiki_showlogo',
   'zwiki_showsearch',
   'zwiki_showpagemgmt',
   'zwiki_showhierarchy',
   'zwiki_width',
   ]"
 >
<dtml-if setcookies>
<dtml-in cookielist prefix=x>
<dtml-if "_.has_key(x_item)">
<dtml-call "RESPONSE.setCookie(x_item, REQUEST.get(x_item), 
                               path=cookiepath, expires=cookieduration)
            # set any cookies we have data for">
</dtml-if>
</dtml-in>
<dtml-in oldcookies prefix=x>
<dtml-call "RESPONSE.expireCookie(x_item,path=cookiepath)
            # and clean up any obsolete ones">
</dtml-in>
<dtml-call "RESPONSE.redirect(REQUEST.get('redirectURL',pageUrl()))">
<dtml-elif clearcookies>
<dtml-in "cookielist+oldcookies" prefix=x>
<dtml-call "RESPONSE.expireCookie(x_item,path=cookiepath)
            # clear all, old and new ">
</dtml-in>
<dtml-call "RESPONSE.redirect(REQUEST.get('redirectURL',pageUrl()))
            # reload so we are using the new ones">
</dtml-if>
</dtml-let>
<form action="&dtml-URL;" METHOD="POST" ENCTYPE="multipart/form-data" style="border:none;">

<p>
<dtml-translate domain="zwiki">User name:</dtml-translate>
<input type="text" name="zwiki_username" size="20" maxlength="20"
       value="<dtml-var zwiki_username missing>" />
<dtml-translate domain="zwiki">(identifies your edits)</dtml-translate>
</p>

<p>
<dtml-translate domain="zwiki">Email address:</dtml-translate> 
<input type="text" name="email" size="20" maxlength="40"
       value="<dtml-var email missing>"> 
<dtml-translate domain="zwiki">(allows mail subscription)</dtml-translate>
</p>

<p>
<dtml-translate domain="zwiki">Your time zone:</dtml-translate>
<dtml-let 
  now=ZopeTime
  timezones="[
  'GMT-1100', 'GMT-1000', 'GMT-0900', 'GMT-0800', 'GMT-0700', 'GMT-0600',
  'GMT-0500', 'GMT-0400', 'GMT-0300', 'GMT-0200', 'GMT-0100', 'GMT',
  'GMT+0100', 'GMT+0200', 'GMT+0300', 'GMT+0400', 'GMT+0500', 'GMT+0600',
  'GMT+0700', 'GMT+0800', 'GMT+0900', 'GMT+1000', 'GMT+1100', 'GMT+1200',
  'GMT+1300',
  ]
  # half-hour zones; mail zwiki@zwiki.org if you use these
  #'GMT-1100', 'GMT-1030', 'GMT-1000', 'GMT-0930', 'GMT-0900', 'GMT-0830',
  #'GMT-0800', 'GMT-0730', 'GMT-0700', 'GMT-0630', 'GMT-0600', 'GMT-0530',
  #'GMT-0500', 'GMT-0430', 'GMT-0400', 'GMT-0330', 'GMT-0300', 'GMT-0230',
  #'GMT-0200', 'GMT-0130', 'GMT-0100', 'GMT',      'GMT+0100', 'GMT+0130',
  #'GMT+0200', 'GMT+0230', 'GMT+0300', 'GMT+0330', 'GMT+0400', 'GMT+0430',
  #'GMT+0500', 'GMT+0530', 'GMT+0600', 'GMT+0630', 'GMT+0700', 'GMT+0730',
  #'GMT+0800', 'GMT+0830', 'GMT+0900', 'GMT+0930', 'GMT+1000', 'GMT+1030',
  #'GMT+1100', 'GMT+1130', 'GMT+1200', 'GMT+1230', 'GMT+1300',
  "
  userzone="REQUEST.get('zwiki_timezone',None)"
  userzone="((userzone in timezones) and userzone) or 'GMT'"
  >
  <select name="zwiki_timezone"
  <dtml-in timezones prefix=x>
    <option value="&dtml-x_item;"
    <dtml-if "userzone == x_item">selected</dtml-if>
    >
    &dtml-x_item; (current time: <dtml-var "now.toZone(x_item).AMPMMinutes()">)
    
  </dtml-in>
  </select>
  <dtml-translate domain="zwiki">(localizes most times)</dtml-translate>
</dtml-let>
</p>

<p>
  <dtml-translate domain="zwiki">Edit form height:</dtml-translate>
  <input type="text" name="zwiki_height" size="2" maxlength="2"
         value="<dtml-var zwiki_height missing=20>" />
  <dtml-translate domain="zwiki">(adjusts form size)</dtml-translate>
</p>

<div align="right"> 
<b><input type="submit" name="setcookies" 
value="<dtml-translate domain="zwiki">Save options</dtml-translate>" 
style="font-weight:bold"></b>
<input type="submit" name="clearcookies" 
value="<dtml-translate domain="zwiki">Forget options</dtml-translate>"
> 
</div>
<input type="hidden" name="zwiki_displaymode" 
value="<dtml-var "REQUEST.get('zwiki_displaymode',getattr(aq_parent,'default_displaymode','minimal'))">">

</form>
</dtml-with>