source: products/quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_discussion/discussion_reply_form.cpt @ 1871

Last change on this file since 1871 was 1871, checked in by liebster, 14 years ago

Revert 2726 to 2589 commits for tagging plone-3 compatible version

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