source: products/qPloneComments/trunk/skins/qplonecomments/report_abuse_form.cpt @ 1221

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

Merged revisions 1946-1951,1957-1962,1964-1965,1967-1970,1972-1986,1990-1993,2199-2200 via svnmerge from
http://svn.quintagroup.com/products/qPloneComments/branches/jcbrand-abuseFeature

........

r1946 | jcbrand | 2009-04-01 16:52:52 +0300 (Срд, 01 Апр 2009) | 3 lines


Add enable_report_abuse property to propertiestool.xml
Add checkbox for this property on the prefs_comments_setup_form.cpt

........

r1947 | jcbrand | 2009-04-01 17:29:20 +0300 (Срд, 01 Апр 2009) | 2 lines


Add report_abuse.pt containing the report_abuse form.

........

r1948 | jcbrand | 2009-04-01 17:30:35 +0300 (Срд, 01 Апр 2009) | 2 lines


Add utility method necesary for the report abuse form.

........

r1949 | jcbrand | 2009-04-01 17:31:05 +0300 (Срд, 01 Апр 2009) | 2 lines


Add the report abuse button and form (hidden).

........

r1950 | jcbrand | 2009-04-01 17:43:31 +0300 (Срд, 01 Апр 2009) | 1 line


Add qcomments.kss and register

........

r1951 | jcbrand | 2009-04-01 17:43:54 +0300 (Срд, 01 Апр 2009) | 1 line


Add qcomments.js and register

........

r1957 | jcbrand | 2009-04-02 12:52:54 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add new mail action for the enable_report_abuse state.

........

r1958 | jcbrand | 2009-04-02 12:54:05 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add a form and new hidden input containing 'comment_id'

........

r1959 | jcbrand | 2009-04-02 12:59:12 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add CommentsKSS kss class and submit_abuse_report method.

........

r1960 | jcbrand | 2009-04-02 13:00:14 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfix, preventDefault for all the forms.

........

r1961 | jcbrand | 2009-04-02 13:00:30 +0300 (Чтв, 02 Апр 2009) | 2 lines


remove comment_id passing.

........

r1962 | jcbrand | 2009-04-02 13:00:53 +0300 (Чтв, 02 Апр 2009) | 2 lines


get values from request if able.

........

r1964 | jcbrand | 2009-04-02 13:01:18 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add comments.CommentsKSS

........

r1965 | jcbrand | 2009-04-02 13:01:39 +0300 (Чтв, 02 Апр 2009) | 2 lines


Include browser.

........

r1967 | jcbrand | 2009-04-02 14:26:07 +0300 (Чтв, 02 Апр 2009) | 1 line


Add email template for the report_abuse function

........

r1968 | jcbrand | 2009-04-02 14:26:41 +0300 (Чтв, 02 Апр 2009) | 2 lines


Use the new email template.

........

r1969 | jcbrand | 2009-04-02 14:29:41 +0300 (Чтв, 02 Апр 2009) | 3 lines


Register remove_abuse_report_form as a kss command.
Add new code to it that adds an optional html. (Used for status message)

........

r1970 | jcbrand | 2009-04-02 15:18:24 +0300 (Чтв, 02 Апр 2009) | 3 lines


Add form action.
Add place holder for abuse count info.

........

r1972 | jcbrand | 2009-04-02 16:08:42 +0300 (Чтв, 02 Апр 2009) | 2 lines


Add new portal_properties settings.

........

r1973 | jcbrand | 2009-04-02 19:39:27 +0300 (Чтв, 02 Апр 2009) | 1 line


Add controller python script for abuse reports

........

r1974 | jcbrand | 2009-04-02 19:39:55 +0300 (Чтв, 02 Апр 2009) | 1 line


Add validation script for abuse reporting

........

r1975 | jcbrand | 2009-04-02 19:40:43 +0300 (Чтв, 02 Апр 2009) | 1 line


Add template and metadata for rendering the report abuse form. Moved the macro form report_abuse.pt to this template

........

r1976 | jcbrand | 2009-04-02 19:41:22 +0300 (Чтв, 02 Апр 2009) | 1 line


remove old template

........

r1977 | jcbrand | 2009-04-02 19:41:52 +0300 (Чтв, 02 Апр 2009) | 3 lines


Fix form action.
Fix bug with form nesting.

........

r1978 | jcbrand | 2009-04-02 19:42:46 +0300 (Чтв, 02 Апр 2009) | 1 line


Add new utility methods. Use newly registered kss command

........

r1979 | jcbrand | 2009-04-02 19:43:20 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfixes after the introduction of new portal_properties props.

........

r1980 | jcbrand | 2009-04-02 19:44:14 +0300 (Чтв, 02 Апр 2009) | 2 lines


Bugfixes

........

r1981 | jcbrand | 2009-04-02 19:44:31 +0300 (Чтв, 02 Апр 2009) | 2 lines


Register the remove_abuse_report_form kss action.

........

r1982 | jcbrand | 2009-04-03 11:41:32 +0300 (Птн, 03 Апр 2009) | 2 lines


Fix bug whereby emails were sent twice

........

r1983 | jcbrand | 2009-04-03 11:42:08 +0300 (Птн, 03 Апр 2009) | 1 line


Bugfixes related to anonymous comment adding

........

r1984 | jcbrand | 2009-04-03 11:59:44 +0300 (Птн, 03 Апр 2009) | 2 lines


Add macro for the captcha widget.

........

r1985 | jcbrand | 2009-04-03 12:00:22 +0300 (Птн, 03 Апр 2009) | 2 lines


Render a new captcha after hiding form.

........

r1986 | jcbrand | 2009-04-03 12:00:32 +0300 (Птн, 03 Апр 2009) | 2 lines


Change fade out time.

........

r1990 | jcbrand | 2009-04-03 13:37:13 +0300 (Птн, 03 Апр 2009) | 1 line


Add test suite

........

r1991 | jcbrand | 2009-04-03 13:37:38 +0300 (Птн, 03 Апр 2009) | 1 line


remove redundant line

........

r1992 | jcbrand | 2009-04-03 13:48:21 +0300 (Птн, 03 Апр 2009) | 1 line


bugfix

........

r1993 | jcbrand | 2009-04-03 13:56:51 +0300 (Птн, 03 Апр 2009) | 1 line


remove explicit microseconds

........

r2199 | jcbrand | 2009-07-25 02:07:58 +0300 (Сбт, 25 Июл 2009) | 1 line


Fixed a bug with syntax recognition of an older version of jquery

........

r2200 | jcbrand | 2009-07-25 02:08:58 +0300 (Сбт, 25 Июл 2009) | 1 line


Log email errors, so that the report abuse form still closes

........

File size: 10.2 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:translate="text_no_email_setup">
87                    This site doesn't have a valid email setup, so you cannot use
88                    the report abuse form.
89                </p>
90            </tal:if_not>
91            <tal:if condition="email_from_address">
92                <form name="feedback_form"
93                    method="post"
94                    class="enableAutoFocus"
95                    tal:attributes="action string:${here/absolute_url}/${template/id}"
96                    tal:define="errors errors|request/errors|python:{}" >
97
98                <input type="hidden" name="comment_id" tal:attributes="value comment_id" />
99
100                <fieldset>
101                <h1 i18n:translate="heading_report_abuse_form">Report Abuse</h1>
102
103                <tal:feedbackForm condition="isAnon">
104                <input type="hidden" name="Creator" tal:condition="not:isAnon" tal:attributes="value member/getUserName" />
105
106                <div class="field"
107                    tal:define="error errors/creator|nothing"
108                    tal:attributes="class python:error and 'field error' or 'field'">
109                <label for="creator" i18n:translate="label_creator">
110                    Name
111                </label>
112                <span class="fieldRequired" title="Required"
113                        i18n:attributes="title title_required;"
114                        i18n:translate="label_required">(Required)</span>
115                <div class="formHelp" i18n:translate="help_creator">
116                    Please enter your full name
117                </div>
118                <div tal:content="error">Validation error output</div>           
119                <input type="text"
120                        id="creator"
121                        name="creator"
122                        size="40"
123                        value=""
124                        tal:attributes="value request/creator|nothing"
125                        />
126                </div>
127                <div class="field"
128                    tal:define="error errors/email|nothing"
129                    tal:attributes="class python:error and 'field error' or 'field'">
130                <label for="email" i18n:translate="label_email">
131                    E-Mail
132                </label>
133                <span class="fieldRequired" title="Required"
134                        i18n:attributes="title title_required;"
135                        i18n:translate="label_required">(Required)</span>
136                <div class="formHelp" i18n:translate="help_email">
137                    Please enter your e-mail address
138                </div>
139                <div tal:content="error">Validation error output</div>           
140                <input type="text"
141                        id="email"
142                        name="email"
143                        size="40"
144                        value=""
145                        tal:attributes="value request/email|nothing"
146                        />
147                </div>
148                </tal:feedbackForm>
149                <tal:feedbackForm condition="not:isAnon"
150                                    define="fullname python:request.get('fullname', member.getProperty('fullname', ''));
151                                            email python:request.get('email', member.getProperty('email',''));">
152                    <input type="hidden" name="sender_fullname" value="fullname" tal:attributes="value fullname" />
153                    <input type="hidden" name="email" value="email" tal:attributes="value email" />
154                </tal:feedbackForm>
155                <div class="field"
156                    tal:define="error errors/message|nothing"
157                    tal:attributes="class python:error and 'field error' or 'field'">
158                <label for="message" i18n:translate="label_message">
159                    Description
160                </label>
161                <span class="fieldRequired" title="Required"
162                        i18n:attributes="title title_required;"
163                        i18n:translate="label_required">(Required)</span>
164
165                <div class="formHelp" i18n:translate="help_message">
166                    Please state your reasons why you would like to report this comment as abusive.
167                    Our administrator will be notified with your message.
168                </div>
169                <div tal:content="error">Validation error output</div>           
170                    <textarea name="message" id="message" rows="5" cols="25" tal:content="request/message|nothing"> </textarea>
171                </div>
172                <metal:macro define-macro="captcha">
173                    <div tal:define="comment_id comment_id|request/comment_id"
174                         tal:attributes="id string:div-captcha-${comment_id}"
175                         tal:condition="nocall:here/captcha_widget|nothing">
176                        <div metal:use-macro="here/captcha_widget/macros/captcha" />
177                    </div>
178                </metal:macro>
179
180                <div class="formControls">
181                    <input type="hidden" name="form.submitted" value="1" />
182
183                    <input type="hidden" name="require_email:boolean" value=""
184                        tal:attributes="value python:isAnon" />
185
186                    <input
187                        value="Send"
188                        type="submit"
189                        tal:attributes="comment_id comment_id;
190                                        class python:isAjaxReportAbuseEnabled  and 'context input-report-abuse-send' or 'context'"
191                        i18n:attributes="value label_send;"
192                        />
193
194                    <input
195                        id="input-report-abuse-cancel"
196                        class="destructive"
197                        value="Cancel"
198                        type="button"
199                        tal:condition="isAjaxReportAbuseEnabled"
200                        tal:attributes="onclick string:javascript:remove_abuse_report_form(${comment_id})"
201                        i18n:attributes="value label_cancel;"
202                        />
203                </div>
204                </fieldset>
205                </form>
206            </tal:if>
207            </span>
208        </metal:macro>
209    </tal:set>
210
211    </form>
212</div>
213</body>
214</html>
215
216
Note: See TracBrowser for help on using the repository browser.