changeset 3726:b11142bb2aa2 1.2.1

Password confirm field in user editing. Pre-1.2.1-release stuff too
author Richard Jones <richard@users.sourceforge.net>
date Sat, 07 Oct 2006 03:03:29 +0000
parents 65badf6ab7ad
children 04dee2ac29e2
files CHANGES.txt doc/announcement.txt setup.py templates/classic/html/page.html templates/classic/html/user.item.html templates/minimal/html/page.html templates/minimal/html/user.item.html
diffstat 7 files changed, 390 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Thu Oct 05 23:14:52 2006 +0000
+++ b/CHANGES.txt	Sat Oct 07 03:03:29 2006 +0000
@@ -4,6 +4,7 @@
 2006-??-?? 1.2.1
 Fixed:
 - E-mail subject line prefix delimiter configuration was being ignored.
+- Password confirm field in user editing.
 
 
 2006-10-04 1.2.0
--- a/doc/announcement.txt	Thu Oct 05 23:14:52 2006 +0000
+++ b/doc/announcement.txt	Sat Oct 07 03:03:29 2006 +0000
@@ -1,6 +1,11 @@
-I'm proud to release version 1.2.0 of Roundup.
+I'm proud to release version 1.2.1 of Roundup.
+
+Bugs fixed in 1.2.1:
 
-Feature:
+- E-mail subject line prefix delimiter configuration was being ignored.
+- Password confirm field in user editing.
+
+New Features in 1.2.x:
 
 - supports Python 2.5, including the sqlite3 module
 - full timezone support (sf patch 1465296)
--- a/setup.py	Thu Oct 05 23:14:52 2006 +0000
+++ b/setup.py	Sat Oct 07 03:03:29 2006 +0000
@@ -16,7 +16,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: setup.py,v 1.90 2006-10-04 01:14:37 richard Exp $
+# $Id: setup.py,v 1.91 2006-10-07 03:03:28 richard Exp $
 
 from distutils.core import setup, Extension
 from distutils.util import get_platform
@@ -351,7 +351,12 @@
 If you're upgrading from an older version of Roundup you *must* follow
 the "Software Upgrade" guidelines given in the maintenance documentation.
 
-New Features in this release:
+Bugs fixed in 1.2.1:
+
+- E-mail subject line prefix delimiter configuration was being ignored.
+- Password confirm field in user editing.
+
+New Features in 1.2.x:
 
 - supports Python 2.5, including the sqlite3 module
 - full timezone support (sf patch 1465296)
--- a/templates/classic/html/page.html	Thu Oct 05 23:14:52 2006 +0000
+++ b/templates/classic/html/page.html	Sat Oct 07 03:03:29 2006 +0000
@@ -327,4 +327,6 @@
 <!-- password: type; no initial value -->
     <input metal:define-macro="user_pw_input" type="password"
     tal:attributes="id name; name name; readonly not:edit_ok" value="">
+    <input metal:define-macro="user_confirm_input" type="password"
+    tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
 
--- a/templates/classic/html/user.item.html	Thu Oct 05 23:14:52 2006 +0000
+++ b/templates/classic/html/user.item.html	Sat Oct 07 03:03:29 2006 +0000
@@ -48,6 +48,7 @@
   src_input templates/page/macros/user_src_input;
   normal_input templates/page/macros/user_normal_input;
   pw_input templates/page/macros/user_pw_input;
+  confirm_input templates/page/macros/user_confirm_input;
   edit_ok context/is_edit_ok;
   ">
  <tr tal:define="name string:realname; label string:Name; value context/realname; edit_ok edit_ok">
@@ -59,13 +60,13 @@
    <td><input metal:use-macro="src_input"></td>
  </tr>
  <tal:if condition="edit_ok">
- <tr tal:define="name string:password; label string:Login Password; value string:context/password">
+ <tr tal:define="name string:password; label string:Login Password">
   <th metal:use-macro="th_label">Login Password</th>
   <td><input metal:use-macro="pw_input" type="password"></td>
  </tr>
- <tr tal:define="name string:confirm; label string:Confirm Password; value string:context/password">
+ <tr tal:define="name string:password; label string:Confirm Password">
   <th metal:use-macro="th_label">Confirm Password</th>
-  <td><input metal:use-macro="pw_input" type="password"></td>
+  <td><input metal:use-macro="confirm_input" type="password"></td>
  </tr>
  </tal:if>
  <tal:if condition="python:request.user.hasPermission('Web Roles')">
--- a/templates/minimal/html/page.html	Thu Oct 05 23:14:52 2006 +0000
+++ b/templates/minimal/html/page.html	Sat Oct 07 03:03:29 2006 +0000
@@ -1,6 +1,6 @@
-<tal:block metal:define-macro="icing">
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-                               "http://www.w3.org/TR/html4/strict.dtd">
+<!-- vim:sw=2 sts=2
+--><tal:block metal:define-macro="icing"
+><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <head>
 <title metal:define-slot="head_title">title goes here</title>
@@ -9,11 +9,21 @@
  tal:attributes="content string:text/html;; charset=${request/client/charset}" />
 <script tal:replace="structure request/base_javascript">
 </script>
+<metal:x define-slot="more-javascript" />
 
 </head>
 <body class="body">
 
-<table class="body">
+<table class="body"
+ tal:define="
+kw_edit python:request.user.hasPermission('Edit', 'keyword');
+kw_create python:request.user.hasPermission('Create', 'keyword');
+kw_edit_link python:kw_edit and db.keyword.list();
+columns string:id,activity,title,creator,status;
+columns_showall string:id,activity,title,creator,assignedto,status;
+status_notresolved string:-1,1,2,3,4,5,6,7;
+"
+>
 
 <tr>
  <td class="page-header-left">&nbsp;</td>
@@ -24,7 +34,8 @@
    <div id="searchbox">
      <form method="GET" action="issue">
        <input type="hidden" name="@columns"
-              value="id,activity,title,creator,assignedto,status"/>
+	      tal:attributes="value columns_showall"
+	      value="id,activity,title,creator,assignedto,status"/>
        <input type="hidden" name="@sort" value="activity"/>
        <input type="hidden" name="@group" value="priority"/>
        <input id="search-text" name="@search_text" size="10"/>
@@ -36,40 +47,110 @@
 
 <tr>
  <td rowspan="2" valign="top" class="sidebar">
-  <p class="userblock" tal:condition="python:request.user.username=='anonymous'">
-   <form method="POST" action="">
+  <p class="classblock"
+     tal:condition="python:request.user.hasPermission('View', 'query')">
+   <span i18n:translate=""
+    ><b>Your Queries</b> (<a href="query?@template=edit">edit</a>)</span><br>
+   <tal:block tal:repeat="qs request/user/queries">
+    <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
+       tal:content="qs/name">link</a><br>
+   </tal:block>
+  </p>
+
+  <form method="POST" tal:attributes="action request/base">
+   <p class="classblock"
+       tal:condition="python:request.user.hasPermission('View', 'issue')">
+    <b i18n:translate="">Issues</b><br>
+    <span tal:condition="python:request.user.hasPermission('Create', 'issue')">
+      <a href="issue?@template=item" i18n:translate="">Create New</a><br>
+    </span>
+    <a href="#"
+       tal:attributes="href python:request.indexargs_url('issue', {
+      '@sort': '-activity',
+      '@group': 'priority',
+      '@filter': 'status,assignedto',
+      '@columns': columns,
+      'status': status_notresolved,
+      'assignedto': '-1',
+      '@dispname': i18n.gettext('Show Unassigned'),
+     })"
+       i18n:translate="">Show Unassigned</a><br>
+    <a href="#"
+       tal:attributes="href python:request.indexargs_url('issue', {
+      '@sort': '-activity',
+      '@group': 'priority',
+      '@filter': 'status',
+      '@columns': columns_showall,
+      'status': status_notresolved,
+      '@dispname': i18n.gettext('Show All'),
+     })"
+       i18n:translate="">Show All</a><br>
+    <a href="issue?@template=search" i18n:translate="">Search</a><br>
+    <input type="submit" class="form-small" value="Show issue:"
+     i18n:attributes="value"><input class="form-small" size="4"
+     type="text" name="@number">
+    <input type="hidden" name="@type" value="issue">
+    <input type="hidden" name="@action" value="show">
+   </p>
+  </form>
+
+  <p class="classblock"
+     tal:condition="python:kw_edit or kw_create">
+   <b i18n:translate="">Keywords</b><br>
+   <span tal:condition="python:request.user.hasPermission('Create', 'keyword')">
+    <a href="keyword?@template=item" i18n:translate="">Create New</a><br>
+   </span>
+   <span tal:condition="kw_edit_link">
+    <a href="keyword?@template=item" i18n:translate="">Edit Existing</a><br>
+   </span>
+  </p>
+
+  <p class="classblock"
+       tal:condition="python:request.user.hasPermission('View', 'user')">
+   <b i18n:translate="">Administration</b><br>
+   <span tal:condition="python:request.user.hasPermission('Edit', None)">
+    <a href="home?@template=classlist" i18n:translate="">Class List</a><br>
+   </span>
+   <span tal:condition="python:request.user.hasPermission('View', 'user')
+                            or request.user.hasPermission('Edit', 'user')">
+    <a href="user"  i18n:translate="">User List</a><br>
+   </span>
+   <a tal:condition="python:request.user.hasPermission('Create', 'user')"
+      href="user?@template=item" i18n:translate="">Add User</a>
+  </p>
+
+  <form method="POST" tal:condition="python:request.user.username=='anonymous'"
+        tal:attributes="action request/base">
+   <p class="userblock">
+    <b i18n:translate="">Login</b><br>
     <input size="10" name="__login_name"><br>
     <input size="10" type="password" name="__login_password"><br>
     <input type="hidden" name="@action" value="Login">
     <input type="checkbox" name="remember" id="remember">
     <label for="remember" i18n:translate="">Remember me?</label><br>
-    <input type="submit" value="Login" i18n:attributes="value">
+    <input type="submit" value="Login" i18n:attributes="value"><br>
     <input type="hidden" name="__came_from" tal:attributes="value string:${request/base}${request/env/PATH_INFO}">
     <span tal:replace="structure request/indexargs_form" />
-   </form>
-   <a tal:condition="python:request.user.hasPermission('Web Registration')"
-      href="user?@template=register" i18n:translate="">Register</a>
-  </p>
+    <a href="user?@template=register"
+       tal:condition="python:request.user.hasPermission('Create', 'user')"
+     i18n:translate="">Register</a><br>
+    <a href="user?@template=forgotten" i18n:translate="">Lost&nbsp;your&nbsp;login?</a><br>
+   </p>
+  </form>
 
   <p class="userblock" tal:condition="python:request.user.username != 'anonymous'">
-   <b i18n:translate="">Hello,<br><span i18n:name="user"
-    tal:content="request/user/username">username</span></b><br>
-   <a tal:attributes="href string:user${request/user/id}"
+   <b i18n:translate="">Hello, <span i18n:name="user"
+    tal:replace="request/user/username">username</span></b><br>
+   <a href="#" tal:attributes="href string:issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=${request/user/id}" i18n:translate="">Your Issues</a><br>
+   <a href="#" tal:attributes="href string:user${request/user/id}"
     i18n:translate="">Your Details</a><br>
-   <a tal:attributes="href python:request.indexargs_url('',
+   <a href="#" tal:attributes="href python:request.indexargs_url('',
        {'@action':'logout'})" i18n:translate="">Logout</a>
   </p>
-
-  <p class="classblock"
-       tal:condition="python:request.user.username != 'anonymous'">
-   <b i18n:translate="">Administration</b><br>
-   <a tal:condition="python:request.user.hasPermission('Edit', None)"
-      href="home?@template=classlist" i18n:translate="">Class List</a><br>
-   <a tal:condition="python:request.user.hasPermission('View', 'user')
-                            or request.user.hasPermission('Edit', 'user')"
-      href="user" i18n:translate="">User List</a><br>
-   <a tal:condition="python:request.user.hasPermission('Edit', 'user')"
-      href="user?@template=item" i18n:translate="">Add User</a>
+  <p class="userblock">
+   <b i18n:translate="">Help</b><br>
+   <a href="http://roundup.sourceforge.net/doc-1.0/"
+    i18n:translate="">Roundup docs</a>
   </p>
  </td>
  <td>
@@ -95,3 +176,157 @@
 </body>
 </html>
 </tal:block>
+
+<!--
+The following macros are intended to be used in search pages.
+
+The invoking context must define a "name" variable which names the
+property being searched.
+
+See issue.search.html in the classic template for examples.
+-->
+
+<!-- creates a th and a label: -->
+<th metal:define-macro="th_label"
+    tal:define="required required | python:[]"
+    tal:attributes="class python:(name in required) and 'required' or nothing">
+  <label tal:attributes="for name" tal:content="label" i18n:translate="">text</label>
+	<metal:x define-slot="behind_the_label" />
+</th>
+
+<td metal:define-macro="search_input">
+  <input tal:attributes="value python:request.form.getvalue(name) or nothing;
+                         name name;
+                         id name">
+</td>
+
+<td metal:define-macro="search_date">
+  <input tal:attributes="value python:request.form.getvalue(name) or nothing;
+                         name name;
+                         id name">
+  <a class="classhelp"
+	 tal:attributes="href python:'''javascript:help_window('issue?@template=calendar&property=%s&form=itemSynopsis', 300, 200)'''%name">(cal)</a>
+</td>
+
+<td metal:define-macro="search_popup">
+  <!--
+    context needs to specify the popup "columns" as a comma-separated
+    string (eg. "id,title" or "id,name,description") as well as name
+  -->
+  <input tal:attributes="value python:request.form.getvalue(name) or nothing;
+                         name name;
+                         id name">
+  <span tal:replace="structure python:db.issue.classhelp(columns,
+                                      property=name)" />
+</td>
+
+<td metal:define-macro="search_select">
+  <select tal:attributes="name name; id name"
+          tal:define="value python:request.form.getvalue(name)">
+    <option value="" i18n:translate="">don't care</option>
+    <metal:slot define-slot="extra_options" />
+    <option value="" i18n:translate="" disabled="disabled">------------</option>
+    <option tal:repeat="s python:db[db_klass].list()"
+            tal:attributes="value s/id; selected python:value == s.id"
+            tal:content="python:s[db_content]"></option>
+  </select>
+</td>
+
+<!-- like search_select, but translates the further values.
+Could extend it (METAL 1.1 attribute "extend-macro")
+-->
+<td metal:define-macro="search_select_translated">
+  <select tal:attributes="name name; id name"
+          tal:define="value python:request.form.getvalue(name)">
+    <option value="" i18n:translate="">don't care</option>
+    <metal:slot define-slot="extra_options" />
+    <option value="" i18n:translate="" disabled="disabled">------------</option>
+    <option tal:repeat="s python:db[db_klass].list()"
+            tal:attributes="value s/id; selected python:value == s.id"
+						tal:content="python:s[db_content]"
+						i18n:translate=""></option>
+  </select>
+</td>
+
+<!-- currently, there is no convenient API to get a list of all roles -->
+<td metal:define-macro="search_select_roles"
+	  tal:define="onchange onchange | nothing">
+  <select name=roles id=roles tal:attributes="onchange onchange">
+    <option value="" i18n:translate="">don't care</option>
+    <option value="" i18n:translate="" disabled="disabled">------------</option>
+    <option value="User">User</option>
+    <option value="Admin">Admin</option>
+    <option value="Anonymous">Anonymous</option>
+  </select>
+</td>
+
+<td metal:define-macro="search_multiselect">
+  <input tal:attributes="value python:request.form.getvalue(name) or nothing;
+                         name name;
+                         id name">
+  <span tal:replace="structure python:db[db_klass].classhelp(db_content,
+                                        property=name, width='600')" />
+</td>
+
+<td metal:define-macro="search_checkboxes">
+ <ul class="search-checkboxes"
+     tal:define="value python:request.form.getvalue(name);
+                 values python:value and value.split(',') or []">
+ <li tal:repeat="s python:db[db_klass].list()">
+  <input type="checkbox" tal:attributes="name name; id string:$name-${s/id};
+    value s/id; checked python:s.id in values" />
+  <label tal:attributes="for string:$name-${s/id}"
+         tal:content="python:s[db_content]" />
+ </li>
+ <li metal:define-slot="no_value_item">
+  <input type="checkbox" value="-1" tal:attributes="name name;
+     id string:$name--1; checked python:value == '-1'" />
+  <label tal:attributes="for string:$name--1" i18n:translate="">no value</label>
+ </li>
+ </ul>
+</td>
+
+<td metal:define-macro="column_input">
+  <input type="checkbox" name="@columns"
+         tal:attributes="value name;
+                         checked python:name in cols">
+</td>
+
+<td metal:define-macro="sort_input">
+  <input type="radio" name="@sort"
+         tal:attributes="value name;
+                         checked python:name == sort_on">
+</td>
+
+<td metal:define-macro="group_input">
+  <input type="radio" name="@group"
+         tal:attributes="value name;
+                         checked python:name == group_on">
+</td>
+
+<!--
+The following macros are intended for user editing.
+
+The invoking context must define a "name" variable which names the
+property being searched; the "edit_ok" variable tells whether the
+current user is allowed to edit.
+
+See user.item.html in the classic template for examples.
+-->
+<script metal:define-macro="user_utils" type="text/javascript" src="@@file/user_utils.js"></script>
+
+<!-- src: value will be re-used for other input fields -->
+<input metal:define-macro="user_src_input"
+    type="text" tal:attributes="onblur python:edit_ok and 'split_name(this)';
+    id name; name name; value value; readonly not:edit_ok"
+    value="heinz.kunz">
+<!-- normal: no re-using -->
+<input metal:define-macro="user_normal_input" type="text"
+    tal:attributes="id name; name name; value value; readonly not:edit_ok"
+    value="heinz">
+<!-- password: type; no initial value -->
+    <input metal:define-macro="user_pw_input" type="password"
+    tal:attributes="id name; name name; readonly not:edit_ok" value="">
+    <input metal:define-macro="user_confirm_input" type="password"
+    tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
+
--- a/templates/minimal/html/user.item.html	Thu Oct 05 23:14:52 2006 +0000
+++ b/templates/minimal/html/user.item.html	Sat Oct 07 03:03:29 2006 +0000
@@ -1,84 +1,145 @@
 <!-- dollarId: user.item,v 1.7 2002/08/16 04:29:04 richard Exp dollar-->
-<tal:block metal:use-macro="templates/page/macros/icing">
+<tal:doc metal:use-macro="templates/page/macros/icing"
+define="edit_ok context/is_edit_ok"
+>
 <title metal:fill-slot="head_title">
-<tal:block condition="context/id" i18n:translate=""
+<tal:if condition="context/id" i18n:translate=""
  >User <span tal:replace="context/id" i18n:name="id"
  />: <span tal:replace="context/username" i18n:name="title"
  /> - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
-/></tal:block>
-<tal:block condition="not:context/id" i18n:translate=""
+/></tal:if>
+<tal:if condition="not:context/id" i18n:translate=""
  >New User - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
-/></tal:block>
+/></tal:if>
 </title>
-<tal:block metal:fill-slot="body_title">
- <span tal:condition="python: not (context.id or context.is_edit_ok())"
+<metal:slot fill-slot="more-javascript">
+<script metal:use-macro="templates/page/macros/user_utils"></script>
+<script type="text/javascript" src="@@file/help_controls.js"></script>
+</metal:slot>
+<tal:block metal:fill-slot="body_title"
+  define="edit_ok context/is_edit_ok">
+ <span tal:condition="python: not (context.id or edit_ok)"
   tal:omit-tag="python:1" i18n:translate="">New User</span>
- <span tal:condition="python: not context.id and context.is_edit_ok()"
+ <span tal:condition="python: not context.id and edit_ok"
   tal:omit-tag="python:1" i18n:translate="">New User Editing</span>
- <span tal:condition="python: context.id and not context.is_edit_ok()"
+ <span tal:condition="python: context.id and not edit_ok"
   tal:omit-tag="python:1" i18n:translate="">User<tal:x
   replace="context/id" i18n:name="id" /></span>
- <span tal:condition="python: context.id and context.is_edit_ok()"
+ <span tal:condition="python: context.id and edit_ok"
   tal:omit-tag="python:1" i18n:translate="">User<tal:x
   replace="context/id" i18n:name="id" /> Editing</span>
 </tal:block>
 
 <td class="content" metal:fill-slot="content">
 
-<p tal:condition="not:context/is_view_ok" i18n:translate="">
-    You are not allowed to view this page.
-</p>
+<p tal:condition="not:context/is_view_ok" i18n:translate="">You are not
+    allowed to view this page.</p>
 
 <div tal:condition="context/is_view_ok">
 
-<form method="POST" onSubmit="return submit_once()"
+<form method="POST"
+      tal:define="required python:'username address'.split()"
       enctype="multipart/form-data"
-      tal:attributes="action context/designator">
-
-<table class="form">
- <tr>
-  <th class="required" i18n:translate="">Login Name</th>
-  <td tal:content="structure context/username/field">username</td>
+      tal:attributes="action context/designator;
+      onSubmit python:'return checkRequiredFields(\'%s\')'%'\', \''.join(required);
+      ">
+<table class="form" tal:define="
+  th_label templates/page/macros/th_label;
+  src_input templates/page/macros/user_src_input;
+  normal_input templates/page/macros/user_normal_input;
+  pw_input templates/page/macros/user_pw_input;
+  confirm_input templates/page/macros/user_confirm_input;
+  edit_ok context/is_edit_ok;
+  ">
+ <tr tal:define="name string:realname; label string:Name; value context/realname; edit_ok edit_ok">
+  <th metal:use-macro="th_label">Name</th>
+  <td><input name="realname" metal:use-macro="src_input"></td>
  </tr>
- <tr tal:condition="context/is_edit_ok">
-  <th i18n:translate="">Login Password</th>
-  <td tal:content="structure context/password/field">password</td>
+ <tr tal:define="name string:username; label string:Login Name; value context/username">
+   <th metal:use-macro="th_label">Login Name</th>
+   <td><input metal:use-macro="src_input"></td>
  </tr>
- <tr tal:condition="context/is_edit_ok">
-  <th i18n:translate="">Confirm Password</th>
-  <td tal:content="structure context/password/confirm">password</td>
+ <tal:if condition="edit_ok">
+ <tr tal:define="name string:password; label string:Login Password">
+  <th metal:use-macro="th_label">Login Password</th>
+  <td><input metal:use-macro="pw_input" type="password"></td>
  </tr>
- <tr tal:condition="python:request.user.hasPermission('Web Roles')">
-  <th i18n:translate="">Roles</th>
-  <td>
-   <input tal:condition="context/id"
-          tal:replace="structure context/roles/field">
-   <input name="roles" tal:condition="not:context/id"
-          tal:attributes="value db/config/NEW_WEB_USER_ROLES">
+ <tr tal:define="name string:password; label string:Confirm Password">
+  <th metal:use-macro="th_label">Confirm Password</th>
+  <td><input metal:use-macro="confirm_input" type="password"></td>
+ </tr>
+ </tal:if>
+ <tal:if condition="python:request.user.hasPermission('Web Roles')">
+ <tr tal:define="name string:roles; label string:Roles;">
+  <th><label for="roles" i18n:translate="">Roles</label></th>
+  <td tal:define="gips context/id">
+    <tal:subif condition=gips define="value context/roles">
+      <input metal:use-macro="normal_input">
+    </tal:subif>
+    <tal:subif condition="not:gips" define="value db/config/NEW_WEB_USER_ROLES">
+      <input metal:use-macro="normal_input">
+    </tal:subif>
    <tal:block i18n:translate="">(to give the user more than one role,
     enter a comma,separated,list)</tal:block>
   </td>
  </tr>
- <tr>
-  <th class="required" i18n:translate="">E-mail address</th>
-  <td tal:define="mailto context/address/field">
-   <a tal:condition="not:context/is_edit_ok"
-    tal:attributes="href string:mailto:${mailto}" tal:content="mailto"
-   /><span tal:condition="context/is_edit_ok" tal:replace="structure mailto" />
+ </tal:if>
+
+ <tr tal:define="name string:phone; label string:Phone; value context/phone">
+  <th metal:use-macro="th_label">Phone</th>
+  <td><input name="phone" metal:use-macro="normal_input"></td>
+ </tr>
+
+ <tr tal:define="name string:organisation; label string:Organisation; value context/organisation">
+  <th metal:use-macro="th_label">Organisation</th>
+  <td><input name="organisation" metal:use-macro="normal_input"></td>
+ </tr>
+
+ <tr tal:condition="python:edit_ok or context.timezone"
+     tal:define="name string:timezone; label string:Timezone; value context/timezone">
+  <th metal:use-macro="th_label">Timezone</th>
+  <td><input name="timezone" metal:use-macro="normal_input">
+   <tal:block tal:condition="edit_ok" i18n:translate="">(this is a numeric hour offset, the default is
+    <span tal:replace="db/config/DEFAULT_TIMEZONE" i18n:name="zone"
+    />)</tal:block>
   </td>
  </tr>
- <tr>
-  <th i18n:translate="">Alternate E-mail addresses<br>One address per line</th>
-  <td tal:content="structure context/alternate_addresses/multiline">alternate_addresses</td>
+
+ <tr tal:define="name string:address; label string:E-mail address; value context/address">
+  <th metal:use-macro="th_label">E-mail address</th>
+  <td tal:define="mailto python:context.address.field(id='address');
+	  mklink python:mailto and not edit_ok">
+      <a href="mailto:calvin@the-z.org"
+		  tal:attributes="href string:mailto:$value"
+		  tal:content="value"
+          tal:condition="python:mklink">calvin@the-z.org</a>
+      <tal:if condition=edit_ok>
+      <input metal:use-macro="src_input" value="calvin@the-z.org">
+      </tal:if>
+      &nbsp;
+  </td>
  </tr>
 
- <tr tal:condition="context/is_edit_ok">
+ <tr>
+  <th><label for="alternate_addresses" i18n:translate="">Alternate E-mail addresses<br>One address per line</label></th>
+  <td>
+    <textarea rows=5 cols=40 tal:replace="structure context/alternate_addresses/multiline">nobody@nowhere.org
+anybody@everywhere.net
+(alternate_addresses)
+    </textarea>
+  </td>
+ </tr>
+
+ <tr tal:condition="edit_ok">
   <td>
    &nbsp;
    <input type="hidden" name="@template" value="item">
-   <input type="hidden" name="@required" value="username,address">
+   <input type="hidden" name="@required" value="username,address"
+          tal:attributes="value python:','.join(required)">
   </td>
-  <td tal:content="structure context/submit">submit button here</td>
+  <td><input type="submit" value="save" tal:replace="structure context/submit"><!--submit button here-->
+    <input type=reset>
+  </td>
  </tr>
 </table>
 </form>
@@ -99,4 +160,4 @@
 
 </td>
 
-</tal:block>
+</tal:doc>

Roundup Issue Tracker: http://roundup-tracker.org/