source: products/quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/report_abuse_form.cpt @ 1204

Last change on this file since 1204 was 1204, checked in by liebster, 15 years ago

Updated translations template and Ukrainian translation

File size: 13.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                        props_sheet here/portal_properties/qPloneComments;
20                        require_email python:props_sheet.getProperty('require_email')">
21
22            <tal:discussable define="template python:getattr(here, discussable.getLayout(), None);
23                                    macros template/macros | nothing;
24                                    main_macro macros/main | nothing;
25                                    showDiscussable python:main_macro;">
26
27                <div class="comment"
28                    tal:condition="showDiscussable"
29                    tal:define="here python:discussable">
30                    <div metal:use-macro="main_macro"/>
31                </div>
32            </tal:discussable>
33
34            <tal:thread tal:repeat="reply replies">
35                <tal:block tal:define="level repeat/reply/index">
36                    <div class="comment"
37                        tal:attributes="style python:'margin-left:'+str((int(level)+1)*2)+'em'">
38                    <h3>
39                        <tal:block replace="structure portal/discussionitem_icon.gif"/>
40                        <span tal:replace="reply/pretty_title_or_id">Comment title</span>
41                    </h3>
42                    <div class="documentByLine"
43                            tal:define="anonymous_creator python:reply.Creator()=='Anonymous User'">
44                        <span i18n:translate="label_comment_by">Posted by</span>
45                        <span tal:content="reply/Creator"
46                                tal:condition="not:anonymous_creator">Poster Name</span>
47                        <span i18n:translate="label_anonymous_user"
48                                tal:condition="anonymous_creator">Anonymous User</span>
49                        <span i18n:translate="label_commented_at">at</span>
50                        <span tal:replace="python:toLocalizedTime(reply.ModificationDate(),
51                                            long_format=1)">8/23/2001 12:40:44 PM</span>
52                    </div>
53                    <div class="commentBody"
54                            tal:content="structure reply/CookedBody">
55                            This is the body text of the comment.
56                    </div>
57                </div>
58
59                </tal:block>
60            </tal:thread>
61
62            <a name="discussion"></a>
63            <form name="edit_form"
64                class="enableAutoFocus"
65                method="post"
66                action="talkback"
67                tal:attributes="action string:$here_url/$template_id"
68                tal:define="isForAnonymous python:here.portal_properties.qPloneComments.getProperty('enable_anonymous_commenting', 0)">
69
70                <tal:set define="show_form python:True;
71                                comment_id context/id">
72                    <metal:macro define-macro="form"
73                            tal:define="isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled|python:portal.portal_properties.qPloneComments.enable_ajax_report_abuse;
74                                        visible show_form|request/show_form|nothing;
75                                        portal_url portal_url|view/portal_url;
76                                        tabindex tabindex|request/tabindex|view/tabindex;
77                                        member member|request/member|view/member;">
78
79                        <span tal:define="email_from_address portal/email_from_address|view/email_from_address;
80                                            comment_id comment_id|request/comment_id"
81                            tal:attributes="style python:not visible and 'display: none' or '';
82                                            id string:span-reply-form-${comment_id}">
83
84                            <tal:if_not condition="not:email_from_address">
85                                <p class="documentDescription"
86                                i18n:domain="quintagroup.plonecomments"
87                                i18n:translate="text_no_email_setup">
88                                    This site doesn't have a valid email setup, so you cannot use
89                                    the report abuse form.
90                                </p>
91                            </tal:if_not>
92                            <tal:if condition="email_from_address">
93                                <form name="feedback_form"
94                                    method="post"
95                                    class="enableAutoFocus"
96                                    tal:attributes="action string:${here/absolute_url}/${template/id}"
97                                    tal:define="errors errors|request/errors|python:{}" >
98
99                                    <input type="hidden" name="comment_id" tal:attributes="value comment_id" />
100
101                                    <fieldset>
102                                        <h1 i18n:domain="quintagroup.plonecomments" i18n:translate="heading_report_abuse_form">Report Abuse</h1>
103
104                                        <tal:feedbackForm condition="isAnon">
105                                            <input type="hidden" name="Creator" tal:condition="not:isAnon" tal:attributes="value member/getUserName" />
106
107                                            <div class="field"
108                                                tal:define="error errors/creator|nothing"
109                                                tal:attributes="class python:error and 'field error' or 'field'">
110                                                <label for="creator" i18n:translate="label_creator">
111                                                    Name
112                                                </label>
113                                                <span class="fieldRequired" title="Required"
114                                                        i18n:attributes="title title_required;"
115                                                        i18n:translate="label_required">(Required)</span>
116                                                <div class="formHelp" i18n:translate="help_creator">
117                                                    Please enter your full name
118                                                </div>
119                                                <div tal:content="error">Validation error output</div>
120                                                <input type="text"
121                                                        id="creator"
122                                                        name="creator"
123                                                        size="40"
124                                                        value=""
125                                                        tal:attributes="value request/creator|nothing"
126                                                        />
127                                            </div>
128                                            <div class="field"
129                                                tal:define="error errors/email|nothing"
130                                                tal:attributes="class python:error and 'field error' or 'field'">
131                                                <label for="email" i18n:translate="label_email">
132                                                    E-Mail
133                                                </label>
134                                                <span class="fieldRequired" title="Required"
135                                                        i18n:attributes="title title_required;"
136                                                        i18n:translate="label_required">(Required)</span>
137                                                <div class="formHelp" i18n:translate="help_email">
138                                                    Please enter your e-mail address
139                                                </div>
140                                                <div tal:content="error">Validation error output</div>
141                                                <input type="text"
142                                                        id="email"
143                                                        name="email"
144                                                        size="40"
145                                                        value=""
146                                                        tal:attributes="value request/email|nothing"
147                                                        />
148                                            </div>
149                                        </tal:feedbackForm>
150                                        <tal:feedbackForm condition="not:isAnon"
151                                                        define="fullname python:request.get('fullname', member.getProperty('fullname', ''));
152                                                                email python:request.get('email', member.getProperty('email',''));">
153                                            <input type="hidden" name="sender_fullname" value="fullname" tal:attributes="value fullname" />
154                                            <input type="hidden" name="email" value="email" tal:attributes="value email" />
155                                        </tal:feedbackForm>
156                                        <div class="field"
157                                            tal:define="error errors/message|nothing"
158                                            tal:attributes="class python:error and 'field error' or 'field'">
159                                            <label for="message" i18n:translate="label_message">
160                                                Description
161                                            </label>
162                                            <span class="fieldRequired" title="Required"
163                                                    i18n:attributes="title title_required;"
164                                                    i18n:translate="label_required">(Required)</span>
165
166                                            <div class="formHelp" i18n:domain="quintagroup.plonecomments" i18n:translate="help_message">
167                                                Please state your reasons why you would like to report this comment as abusive.
168                                                Our administrator will be notified with your message.
169                                            </div>
170                                            <div tal:content="error">Validation error output</div>
171                                            <textarea name="message" id="message" rows="5" cols="25" tal:content="request/message|nothing"> </textarea>
172                                        </div>
173                                        <metal:macro define-macro="captcha">
174                                            <div tal:define="comment_id comment_id|request/comment_id"
175                                                tal:attributes="id string:div-captcha-${comment_id}"
176                                                tal:condition="nocall:here/captcha_widget|nothing">
177                                                <div metal:use-macro="here/captcha_widget/macros/captcha" />
178                                            </div>
179                                        </metal:macro>
180
181                                        <div class="formControls">
182                                            <input type="hidden" name="form.submitted" value="1" />
183
184                                            <input type="hidden" name="require_email:boolean" value=""
185                                                tal:attributes="value python:isAnon" />
186
187                                            <input
188                                                value="Send"
189                                                type="submit"
190                                                tal:attributes="comment_id comment_id;
191                                                                class python:isAjaxReportAbuseEnabled  and 'context input-report-abuse-send' or 'context'"
192                                                i18n:attributes="value label_send;"
193                                                />
194
195                                            <input
196                                                id="input-report-abuse-cancel"
197                                                class="destructive"
198                                                value="Cancel"
199                                                type="button"
200                                                tal:condition="isAjaxReportAbuseEnabled"
201                                                tal:attributes="onclick string:javascript:remove_abuse_report_form(${comment_id})"
202                                                i18n:attributes="value label_cancel;"
203                                                />
204                                        </div>
205                                    </fieldset>
206                                </form>
207                            </tal:if>
208                        </span>
209                    </metal:macro>
210                </tal:set>
211
212            </form>
213        </div>
214    </body>
215</html>
Note: See TracBrowser for help on using the repository browser.