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

Last change on this file since 797 was 797, checked in by chervol, 17 years ago

initial import

File size: 6.6 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            <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          class="enableAutoFocus"
62          method="post"
63          action="talkback"
64          tal:attributes="action string:$here_url/$template_id">
65
66        <fieldset>
67
68            <legend i18n:translate="legend_add_comment">Add comment</legend>
69            <p i18n:translate="description_add_comment">
70                You can add a comment by filling out the form below. Plain text
71                formatting.
72            </p>
73
74            <input type="hidden" name="Creator" value=""
75                   tal:attributes="value member/getUserName" />
76
77            <div tal:condition="isAnon">
78                <dl class="portalMessage warning">
79                    <dt i18n:translate="">
80                        Info
81                    </dt>
82                    <dd i18n:translate="legend_note_reply_anonymous">
83                        You are not logged in. You may optionally enter your
84                        username and password below. If you don't enter anything,
85                        this comment will be posted as 'Anonymous User'.
86                    </dd>
87                </dl>
88
89                <div class="field">
90
91                    <label for="username" i18n:translate="label_name">Name</label>
92
93                    <input name="username"
94                           id="username"
95                           value="" alt="Username" title="Name"
96                           size="40"
97                           i18n:attributes="title label_name; alt label_username;" />
98
99                </div>
100
101                <div class="field">
102
103                    <label for="password" i18n:translate="label_password">Password</label>
104
105                    <input type="password"
106                           id="password"
107                           name="password"
108                           value="" alt="Password" title="Password"
109                           size="40"
110                           i18n:attributes="title label_password; alt label_password;" />
111
112                </div>
113
114            </div>
115
116
117        <div class="field"
118        tal:define="error errors/subject|nothing;"
119        tal:attributes="class python:test(error, 'field error', 'field')">
120
121                <label for="subject" i18n:translate="label_subject">Subject</label>
122
123        <span class="fieldRequired" title="Required"
124              i18n:attributes="title title_required;"
125              i18n:translate="label_required">(Required)</span>
126
127            <div tal:content="error">Validation error output</div>
128
129                <input name="subject"
130                       id="subject"
131                       value=""
132                       size="40"
133                       tal:attributes="value request/subject|request/title_override|nothing;" />
134
135            </div>
136
137        <div class="field"
138        tal:define="error errors/body_text|nothing;"
139        tal:attributes="class python:test(error, 'field error', 'field')">
140
141          <label for="body_text" i18n:translate="label_comment">Comment</label>
142
143        <span class="fieldRequired" title="Required"
144              i18n:attributes="title title_required;"
145              i18n:translate="label_required">(Required)</span>
146
147            <div tal:content="error">Validation error output</div>
148
149                <textarea name="body_text"
150                          id="body_text"
151                          cols="40"
152                          rows="8"
153                          tal:content="request/body_text|request/text_override | nothing"
154                        ></textarea>
155
156            </div>
157            <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
158            <div class="formControls">
159
160                <input class="context"
161                       type="submit"
162                       value="Save"
163                       name="form.button.Save"
164                       i18n:attributes="value label_save;"
165                       tal:attributes="name string:discussion_reply:method;" />
166
167            </div>
168          <input type="hidden" name="form.submitted" value="1" />
169
170        </fieldset>
171
172    </form>
173
174</div>
175
176</body>
177</html>
Note: See TracBrowser for help on using the repository browser.