Changeset 1132

Show
Ignore:
Timestamp:
06/27/08 09:46:39
Author:
deo
Message:

Synced with 3.0.x/3.1.x version.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/branches/plone-3.0/skins/qplonecomments/discussion_reply_form.cpt

    r1130 r1132  
    1 <html xmlns:tal="http://xml.zope.org/namespaces/tal" 
     1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" 
     2      xmlns:tal="http://xml.zope.org/namespaces/tal" 
    23      xmlns:metal="http://xml.zope.org/namespaces/metal" 
     4      xmlns:i18n="http://xml.zope.org/namespaces/i18n" 
    35      metal:use-macro="here/main_template/macros/master" 
    46      i18n:domain="plone"> 
     
    1517                 discussable python:thread[0]; 
    1618                 replies python:thread[1:]; 
    17                  property_id string:require_email; 
    1819                 props_sheet here/portal_properties/qPloneComments; 
    19                  require_email python:props_sheet.getProperty(property_id)"> 
     20                 require_email python:props_sheet.getProperty('require_email')"> 
    2021 
    2122    <tal:discussable define="template python:getattr(here, discussable.getLayout(), None); 
    2223                             macros template/macros | nothing; 
    2324                             main_macro macros/main | nothing; 
    24                              showDiscussable python:main_macro" 
    25                      > 
    26  
    27         <div class="comment"  
     25                             showDiscussable python:main_macro;"> 
     26 
     27        <div class="comment" 
    2828             tal:condition="showDiscussable" 
    2929             tal:define="here python:discussable"> 
     
    4747                   <span i18n:translate="label_anonymous_user" 
    4848                         tal:condition="anonymous_creator">Anonymous User</span> 
    49                    <span i18n:translate="label_commented_at">at</span>  
     49                   <span i18n:translate="label_commented_at">at</span> 
    5050                   <span tal:replace="python:toLocalizedTime(reply.ModificationDate(), 
    5151                                      long_format=1)">8/23/2001 12:40:44 PM</span> 
     
    6060    </tal:thread> 
    6161 
    62     <a name="discussion" /> 
     62    <a name="discussion"></a> 
     63 
    6364    <form name="edit_form" 
     65          class="enableAutoFocus" 
    6466          method="post" 
    6567          action="talkback" 
     
    6870 
    6971        <fieldset> 
    70             <input type="hidden" name="require_email" value="" 
    71             tal:attributes="value python:bool(require_email and isAnon)"/> 
    7272 
    7373            <legend i18n:translate="legend_add_comment">Add comment</legend> 
     74 
    7475            <p i18n:translate="description_add_comment"> 
    75                 You can add a comment by filling out the form below. Plain text formatting. 
     76                You can add a comment by filling out the form below. Plain text 
     77                formatting. 
    7678            </p> 
    7779 
    7880            <input type="hidden" name="Creator" value="" 
    79                    tal:attributes="value member/getUserName"  
     81                   tal:attributes="value member/getUserName" 
    8082                   tal:condition="not:isForAnonymous"/> 
    8183 
    82             <div class="field" 
    83                  tal:condition="isForAnonymous" 
    84                  i18n:domain="plonecomments"> 
     84            <div tal:condition="isForAnonymous"> 
     85 
     86                <input type="hidden" 
     87                       name="Creator" 
     88                       tal:condition="not:isAnon" 
     89                       tal:attributes="value member/getUserName" /> 
    8590 
    8691                 <div class="field" 
    87                       tal:condition="isAnon" 
    88                       tal:define="error errors/captcha|nothing;" 
    89                       tal:attributes="class python:test(error, 'field error', 'field');"> 
    90  
    91                      <label for="captcha" i18n:translate="label_captcha">Enter the word below</label> 
    92  
    93                      <span class="fieldRequired" title="Required" 
    94                            i18n:attributes="title" 
    95                            i18n:translate="label_required">(Required)</span> 
    96  
    97                      <div class="formHelp" i18n:translate="help_captcha"> 
    98                      This check is used to prevent comments by spammers. 
    99                      </div> 
    100  
    101                      <div tal:content="error">Validation error output</div> 
    102  
    103                       
    104                  </div> 
    105  
    106                 <div class="field" 
     92                     tal:condition="isAnon" 
    10793                     tal:define="error errors/Creator|nothing;" 
    10894                     tal:attributes="class python:test(error, 'field error', 'field');"> 
     
    116102 
    117103                    <div class="formHelp" i18n:translate="help_name" 
    118                          tal:condition="isAnon"> 
    119                     Please tell us your name. 
     104                         i18n:domain="plonecomments"> 
     105                        Tell us your name. 
    120106                    </div> 
    121107 
     
    127113                               value="" alt="Submitter" title="Name" 
    128114                               size="40" 
    129                                tabindex="" 
    130115                               i18n:attributes="alt; title" 
    131                                tal:attributes="tabindex tabindex/next; 
    132                                                value python:test(isAnon, '', member.getUserName()); 
    133                                                disabled python:test(isAnon, None, 'true')" /> 
     116                               tal:attributes="value request/Creator | nothing" /> 
    134117                    </div> 
     118 
    135119                </div> 
    136120 
     
    140124                     tal:condition="python:require_email and isAnon"> 
    141125 
    142  
    143                     <label for="email" i18n:translate="label_anonymous_email">Please enter your email:</label> 
     126                    <label for="email" i18n:translate="label_email">E-Mail</label> 
     127 
    144128                    <span class="fieldRequired" title="Required" 
    145129                          i18n:attributes="title title_required;" 
    146130                          i18n:translate="label_required">(Required) 
    147131                    </span> 
     132 
     133                    <div class="formHelp" i18n:translate="help_email" 
     134                         i18n:domain="plonecomments"> 
     135                        Enter your e-mail address. 
     136                    </div> 
     137 
    148138                    <div tal:content="error">Validation error output</div> 
    149139 
    150                     <input name="email" 
    151                            value="" 
    152                            size="40" 
    153                            tabindex="" 
    154                            tal:attributes="tabindex tabindex/next;" /> 
    155                 </div> 
    156             </div> 
    157  
    158             <div class="portalMessage" 
    159                  tal:condition="python:(not isForAnonymous) and isAnon"> 
    160  
    161                 <tal:block replace="structure here/info.gif"/> 
    162  
    163                 <p i18n:translate="legend_note_reply_anonymous"> 
    164                     Note: you are not logged in.  You may optionally enter your username 
    165                     and password below.  If you don't enter your username and 
    166                     password below, this comment will be posted as the 'Anonymous User'. 
    167                 </p> 
     140                    <input name="email" value="" size="40" /> 
     141 
     142                </div> 
     143 
     144            </div> 
     145 
     146            <div tal:condition="python:(not isForAnonymous) and isAnon"> 
     147                <dl class="portalMessage warning"> 
     148                    <dt i18n:translate=""> 
     149                        Info 
     150                    </dt> 
     151                    <dd i18n:translate="legend_note_reply_anonymous"> 
     152                        You are not logged in. You may optionally enter your 
     153                        username and password below. If you don't enter anything, 
     154                        this comment will be posted as 'Anonymous User'. 
     155                    </dd> 
     156                </dl> 
    168157 
    169158                <div class="field"> 
     
    175164                           value="" alt="Username" title="Name" 
    176165                           size="40" 
    177                            tabindex="" 
    178                            i18n:attributes="title label_name; alt label_username;" 
    179                            tal:attributes="tabindex tabindex/next;" /> 
     166                           i18n:attributes="title label_name; alt label_username;" /> 
    180167 
    181168                </div> 
     
    188175                           id="password" 
    189176                           name="password" 
    190                            tabindex="" 
    191177                           value="" alt="Password" title="Password" 
    192178                           size="40" 
    193                            i18n:attributes="title label_password; alt label_password;" 
    194                            tal:attributes="tabindex tabindex/next;" /> 
    195  
    196                 </div> 
    197  
    198             </div> 
    199  
     179                           i18n:attributes="title label_password; alt label_password;" /> 
     180 
     181                </div> 
     182        </div> 
    200183 
    201184        <div class="field" 
     
    215198                       value="" 
    216199                       size="40" 
    217                        tabindex="" 
    218                        tal:attributes="value request/subject|request/title_override|nothing; 
    219                                        tabindex tabindex/next" /> 
     200                       tal:attributes="value request/subject|request/title_override|nothing;" /> 
    220201 
    221202            </div> 
     
    237218                          cols="40" 
    238219                          rows="8" 
    239                           tabindex="" 
    240220                          tal:content="request/body_text|request/text_override | nothing" 
    241                           tal:attributes="tabindex tabindex/next" 
    242221                        ></textarea> 
    243222 
     
    251230            <div class="formControls"> 
    252231 
     232                <input type="hidden" name="form.submitted" value="1" /> 
     233 
     234                <input type="hidden" name="require_email:boolean" value="" 
     235                       tal:attributes="value python:require_email and isAnon" /> 
     236 
    253237                <input class="context" 
    254                        tabindex="" 
    255238                       type="submit" 
    256239                       value="Save" 
    257240                       name="form.button.Save" 
    258241                       i18n:attributes="value label_save;" 
    259                        tal:attributes="tabindex tabindex/next; 
    260                                        name string:discussion_reply:method;" /> 
    261  
    262             </div> 
    263           <input type="hidden" name="form.submitted" value="1" /> 
     242                       tal:attributes="name string:discussion_reply:method;" /> 
     243 
     244            </div> 
    264245 
    265246        </fieldset>