source: products/qPloneCaptchas/trunk/skins/captchas_discussion/2.5/discussion_reply_form.cpt @ 1

Last change on this file since 1 was 1, checked in by myroslav, 19 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 6.9 KB
Line 
1<html xmlns:tal="http://xml.zope.org/namespaces/tal"
2      xmlns:metal="http://xml.zope.org/namespaces/metal"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="plone">
5<body>
6
7<metal:block fill-slot="top_slot"
8             tal:define="dummy python:request.set('disable_border',1)" />
9
10<metal:block fill-slot="sub" />
11
12<div metal:fill-slot="main"
13     tal:define="errors options/state/getErrors;
14                 thread python:putils.getDiscussionThread(here);
15                 discussable python:thread[0];
16                 replies python:thread[1:]">
17
18    <tal:discussable define="template python:getattr(here, discussable.getLayout(), None);
19                             macros template/macros | nothing;
20                             main_macro macros/main | nothing;
21                             showDiscussable python:main_macro;
22                             template template_id"
23                     >
24
25        <div class="comment"
26             tal:condition="showDiscussable"
27             tal:define="here python:discussable">
28            <div metal:use-macro="main_macro"/>
29        </div>
30    </tal:discussable>
31
32    <tal:thread tal:repeat="reply replies">
33        <tal:block tal:define="level repeat/reply/index">
34            <div class="comment"
35                 tal:attributes="style python:'margin-left:'+str((int(level)+1)*2)+'em'">
36               <h3>
37                   <tal:block replace="structure portal/discussionitem_icon.gif"/>
38                   <span tal:replace="reply/pretty_title_or_id">Comment title</span>
39               </h3>
40               <div class="documentByLine"
41                    tal:define="anonymous_creator python:reply.Creator()=='Anonymous User'">
42                   <span i18n:translate="label_comment_by">Posted by</span>
43                   <span tal:content="reply/Creator"
44                         tal:condition="not:anonymous_creator">Poster Name</span>
45                   <span i18n:translate="label_anonymous_user"
46                         tal:condition="anonymous_creator">Anonymous User</span>
47                   <span i18n:translate="label_commented_at">at</span>
48                   <span tal:replace="python:toLocalizedTime(reply.ModificationDate(),
49                                      long_format=1)">8/23/2001 12:40:44 PM</span>
50               </div>
51               <div class="commentBody"
52                    tal:content="structure reply/CookedBody">
53                    This is the body text of the comment.
54               </div>
55           </div>   
56                 
57        </tal:block>
58    </tal:thread>
59
60    <form name="edit_form"
61          method="post"
62          action="talkback"
63          tal:attributes="action string:$here_url/$template_id">
64
65        <fieldset>
66
67            <legend i18n:translate="legend_add_comment">Add comment</legend>
68            <p i18n:translate="description_add_comment">
69                You can add a comment by filling out the form below. Plain text formatting.
70            </p>
71
72            <input type="hidden" name="Creator" value=""
73                   tal:attributes="value member/getUserName" />
74
75            <div class="portalMessage"
76                 tal:condition="isAnon">
77
78                <tal:block replace="structure here/info.gif"/>
79
80                <p i18n:translate="legend_note_reply_anonymous">
81                    Note: you are not logged in.  You may optionally enter your username
82                    and password below.  If you don't enter your username and
83                    password below, this comment will be posted as the 'Anonymous User'.
84                </p>
85
86                <div class="field">
87
88                    <label for="username" i18n:translate="label_name">Name</label>
89
90                    <input name="username"
91                           id="username"
92                           value="" alt="Username" title="Name"
93                           size="40"
94                           tabindex=""
95                           i18n:attributes="title label_name; alt label_username;"
96                           tal:attributes="tabindex tabindex/next;" />
97
98                </div>
99
100                <div class="field">
101
102                    <label for="password" i18n:translate="label_password">Password</label>
103
104                    <input type="password"
105                           id="password"
106                           name="password"
107                           tabindex=""
108                           value="" alt="Password" title="Password"
109                           size="40"
110                           i18n:attributes="title label_password; alt label_password;"
111                           tal:attributes="tabindex tabindex/next;" />
112
113                </div>
114
115            </div>
116
117
118        <div class="field"
119        tal:define="error errors/subject|nothing;"
120        tal:attributes="class python:test(error, 'field error', 'field')">
121
122                <label for="subject" i18n:translate="label_subject">Subject</label>
123
124        <span class="fieldRequired" title="Required"
125              i18n:attributes="title title_required;"
126              i18n:translate="label_required">(Required)</span>
127
128            <div tal:content="error">Validation error output</div>
129
130                <input name="subject"
131                       id="subject"
132                       value=""
133                       size="40"
134                       tabindex=""
135                       tal:attributes="value request/subject|request/title_override|nothing;
136                                       tabindex tabindex/next" />
137
138            </div>
139
140        <div class="field"
141        tal:define="error errors/body_text|nothing;"
142        tal:attributes="class python:test(error, 'field error', 'field')">
143
144          <label for="body_text" i18n:translate="label_comment">Comment</label>
145
146        <span class="fieldRequired" title="Required"
147              i18n:attributes="title title_required;"
148              i18n:translate="label_required">(Required)</span>
149
150            <div tal:content="error">Validation error output</div>
151
152                <textarea name="body_text"
153                          id="body_text"
154                          cols="40"
155                          rows="8"
156                          tabindex=""
157                          tal:content="request/body_text|request/text_override | nothing"
158                          tal:attributes="tabindex tabindex/next"
159                        ></textarea>
160
161            </div>
162            <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
163            <div class="formControls">
164
165                <input class="context"
166                       tabindex=""
167                       type="submit"
168                       value="Save"
169                       name="form.button.Save"
170                       i18n:attributes="value label_save;"
171                       tal:attributes="tabindex tabindex/next;
172                                       name string:discussion_reply:method;" />
173
174            </div>
175          <input type="hidden" name="form.submitted" value="1" />
176
177        </fieldset>
178
179    </form>
180
181</div>
182
183</body>
184</html>
Note: See TracBrowser for help on using the repository browser.