Changeset 628

Show
Ignore:
Timestamp:
11/16/06 09:06:10
Author:
crchemist
Message:

Improved validator.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/trunk/skins/qplonecomments/2.5/discussion_reply_form.cpt

    r627 r628  
    6969        <fieldset> 
    7070            <input type="hidden" name="require_email" value="" 
    71             tal:attributes="value require_email"/> 
     71            tal:attributes="value python:bool(require_email and isAnon)"/> 
    7272 
    7373            <legend i18n:translate="legend_add_comment">Add comment</legend> 
     
    112112                                               value python:test(isAnon, '', member.getUserName()); 
    113113                                               disabled python:test(isAnon, None, 'true')" /> 
    114  
    115114                    </div> 
    116115                </div> 
  • qPloneComments/trunk/skins/qplonecomments/2.5/validate_talkback.vpy

    r627 r628  
    2525    state.setError('body_text', 'Please submit a body.', 'body_required') 
    2626 
    27 if require_email
     27if require_email != 'False'
    2828    if not (email and context.portal_registration.isValidEmail(email)): 
    2929        state.setError('email', 'Please submit email.', 'email_required')