Changeset 1132
- Timestamp:
- 06/27/08 09:46:39
- 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" 2 3 xmlns:metal="http://xml.zope.org/namespaces/metal" 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n" 3 5 metal:use-macro="here/main_template/macros/master" 4 6 i18n:domain="plone"> … … 15 17 discussable python:thread[0]; 16 18 replies python:thread[1:]; 17 property_id string:require_email;18 19 props_sheet here/portal_properties/qPloneComments; 19 require_email python:props_sheet.getProperty( property_id)">20 require_email python:props_sheet.getProperty('require_email')"> 20 21 21 22 <tal:discussable define="template python:getattr(here, discussable.getLayout(), None); 22 23 macros template/macros | nothing; 23 24 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" 28 28 tal:condition="showDiscussable" 29 29 tal:define="here python:discussable"> … … 47 47 <span i18n:translate="label_anonymous_user" 48 48 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> 50 50 <span tal:replace="python:toLocalizedTime(reply.ModificationDate(), 51 51 long_format=1)">8/23/2001 12:40:44 PM</span> … … 60 60 </tal:thread> 61 61 62 <a name="discussion" /> 62 <a name="discussion"></a> 63 63 64 <form name="edit_form" 65 class="enableAutoFocus" 64 66 method="post" 65 67 action="talkback" … … 68 70 69 71 <fieldset> 70 <input type="hidden" name="require_email" value=""71 tal:attributes="value python:bool(require_email and isAnon)"/>72 72 73 73 <legend i18n:translate="legend_add_comment">Add comment</legend> 74 74 75 <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. 76 78 </p> 77 79 78 80 <input type="hidden" name="Creator" value="" 79 tal:attributes="value member/getUserName" 81 tal:attributes="value member/getUserName" 80 82 tal:condition="not:isForAnonymous"/> 81 83 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" /> 85 90 86 91 <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" 107 93 tal:define="error errors/Creator|nothing;" 108 94 tal:attributes="class python:test(error, 'field error', 'field');"> … … 116 102 117 103 <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. 120 106 </div> 121 107 … … 127 113 value="" alt="Submitter" title="Name" 128 114 size="40" 129 tabindex=""130 115 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" /> 134 117 </div> 118 135 119 </div> 136 120 … … 140 124 tal:condition="python:require_email and isAnon"> 141 125 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 144 128 <span class="fieldRequired" title="Required" 145 129 i18n:attributes="title title_required;" 146 130 i18n:translate="label_required">(Required) 147 131 </span> 132 133 <div class="formHelp" i18n:translate="help_email" 134 i18n:domain="plonecomments"> 135 Enter your e-mail address. 136 </div> 137 148 138 <div tal:content="error">Validation error output</div> 149 139 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> 168 157 169 158 <div class="field"> … … 175 164 value="" alt="Username" title="Name" 176 165 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;" /> 180 167 181 168 </div> … … 188 175 id="password" 189 176 name="password" 190 tabindex=""191 177 value="" alt="Password" title="Password" 192 178 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> 200 183 201 184 <div class="field" … … 215 198 value="" 216 199 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;" /> 220 201 221 202 </div> … … 237 218 cols="40" 238 219 rows="8" 239 tabindex=""240 220 tal:content="request/body_text|request/text_override | nothing" 241 tal:attributes="tabindex tabindex/next"242 221 ></textarea> 243 222 … … 251 230 <div class="formControls"> 252 231 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 253 237 <input class="context" 254 tabindex=""255 238 type="submit" 256 239 value="Save" 257 240 name="form.button.Save" 258 241 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> 264 245 265 246 </fieldset>
