Ignore:
Timestamp:
27 Nov 2011, 07:48:48 (13 years ago)
Author:
Henrik Bettermann
Message:

Make email address required field of user accounts.

Use user's email adress in contactadminform.pt

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r7208 r7222  
    127127  >>> browser.getControl(name="password").value = 'secret'
    128128  >>> browser.getControl(name="control_password").value = 'secret'
     129  >>> browser.getControl(name="form.email").value = 'xx@yy.zz'
    129130  >>> browser.getControl("Add user").click()
    130131  >>> print browser.contents
     
    160161  >>> browser.getControl(name="password").value = 'secret'
    161162  >>> browser.getControl(name="control_password").value = 'secret'
     163  >>> browser.getControl(name="form.email").value = 'xx@yy.zz'
    162164  >>> browser.getControl("Add user").click()
    163165  >>> 'The userid chosen already exists' in browser.contents
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7221 r7222  
    477477
    478478    @property
     479    def get_user_account(self):
     480        return get_user_account(self.request)
     481
     482    @property
    479483    def namefield_label(self):
    480484        if self.request.principal.title == 'Applicant':
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/contactadminform.pt

    r6689 r7222  
    2323     <strong>Email: </strong>
    2424  </td>
    25   <td>
     25  <td tal:condition="not:view/get_user_account">
    2626     <input name="email" type="text" id="email" />
     27  </td>
     28  <td tal:condition="view/get_user_account">
     29    <span tal:content="view/get_user_account/email" />
     30    <input type="hidden" name="fullname" type="text" id="fullname"
     31       tal:attributes="value view/get_user_account/email"/>
    2732  </td>
    2833</tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py

    r7221 r7222  
    222222        title = u'Email',
    223223        default = None,
    224         required = False,
     224        required = True,
    225225        constraint=validate_email,
    226226        )
Note: See TracChangeset for help on using the changeset viewer.