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

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

Merged revisions 1894-1897,1903 via svnmerge from
http://svn.quintagroup.com/products/qPloneComments/branches/plone3_extend

........

r1894 | mylan | 2009-03-25 21:44:18 +0200 (Wed, 25 Mar 2009) | 1 line


Insert Add comment form into comment viewlet

........

r1895 | mylan | 2009-03-25 21:45:56 +0200 (Wed, 25 Mar 2009) | 1 line


Remove 'add comment' button from comment viewlet

........

r1896 | mylan | 2009-03-25 22:09:36 +0200 (Wed, 25 Mar 2009) | 1 line


Wrap add comment form into macros. Use the macros in comment viewlet

........

r1897 | mylan | 2009-03-26 11:18:04 +0200 (Thu, 26 Mar 2009) | 1 line


Add edit comment functionality

........

r1903 | mylan | 2009-03-27 13:24:05 +0200 (Fri, 27 Mar 2009) | 1 line


Fix not saving in editing comment

........

File size: 5.4 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
19    <form name="edit_form"
20          method="post"
21          action="talkback"
22          tal:attributes="action string:$here_url/$template_id">
23
24        <fieldset>
25
26            <legend i18n:translate="legend_edit_comment">Edit comment</legend>
27            <p i18n:translate="description_edit_comment">
28                You can edit a comment by filling out the form below. Plain text
29                formatting.
30            </p>
31
32            <input type="hidden" name="Creator" value=""
33                   tal:attributes="value member/getUserName" />
34
35            <div class="portalMessage"
36                 tal:condition="isAnon">
37
38                <tal:block replace="structure here/info.gif"/>
39
40                <p i18n:translate="legend_note_reply_anonymous">
41                    Note: you are not logged in. You may optionally enter your
42                    username and password below. If you don't enter your
43                    username and password below, this comment will be posted as
44                    the 'Anonymous User'.
45                </p>
46
47                <div class="field">
48
49                    <label for="username" i18n:translate="label_name">Name</label>
50
51                    <input name="username"
52                           id="username"
53                           value="" alt="Username" title="Name"
54                           size="40"
55                           tabindex=""
56                           i18n:attributes="title label_name; alt label_username;"
57                           tal:attributes="tabindex tabindex/next;" />
58
59                </div>
60
61                <div class="field">
62
63                    <label for="password" i18n:translate="label_password">Password</label>
64
65                    <input type="password"
66                           id="password"
67                           name="password"
68                           tabindex=""
69                           value="" alt="Password" title="Password"
70                           size="40"
71                           i18n:attributes="title label_password; alt label_password;"
72                           tal:attributes="tabindex tabindex/next;" />
73
74                </div>
75
76            </div>
77
78
79        <div class="field"
80        tal:define="error errors/subject|nothing;"
81        tal:attributes="class python:test(error, 'field error', 'field')">
82
83                <label for="subject" i18n:translate="label_subject">Subject</label>
84
85        <span class="fieldRequired" title="Required"
86              i18n:attributes="title title_required;"
87              i18n:translate="label_required">(Required)</span>
88
89            <div tal:content="error">Validation error output</div>
90
91                <input name="subject"
92                       id="subject"
93                       value=""
94                       size="40"
95                       tabindex=""
96                       tal:attributes="value context/title|request/subject|request/title_override|nothing;
97                                       tabindex tabindex/next" />
98
99            </div>
100
101        <div class="field"
102        tal:define="error errors/body_text|nothing;"
103        tal:attributes="class python:test(error, 'field error', 'field')">
104
105          <label for="body_text" i18n:translate="label_comment">Comment</label>
106
107        <span class="fieldRequired" title="Required"
108              i18n:attributes="title title_required;"
109              i18n:translate="label_required">(Required)</span>
110
111            <div tal:content="error">Validation error output</div>
112
113                <textarea name="body_text"
114                          id="body_text"
115                          cols="40"
116                          rows="20"
117                          tabindex=""
118                          tal:content="context/text|request/body_text|request/text_override | nothing"
119                          tal:attributes="tabindex tabindex/next"
120                        ></textarea>
121
122            </div>
123
124             <div tal:condition="nocall:here/captcha_widget|nothing"
125                  tal:omit-tag="">
126                <div metal:use-macro="here/captcha_widget/macros/captcha" />
127             </div>
128             
129            <div class="formControls">
130
131                <input class="context"
132                       tabindex=""
133                       type="submit"
134                       value="Save"
135                       name="form.button.Save"
136                       i18n:attributes="value label_save;"
137                       tal:attributes="tabindex tabindex/next;" />
138                <input class="standalone"
139                       tabindex=""
140                       type="submit"
141                       value="Cancel"
142                       name="form.button.Cancel"
143                       i18n:attributes="value label_cancel;"
144                       tal:attributes="tabindex tabindex/next;" />
145
146            </div>
147          <input type="hidden" name="form.submitted" value="1" />
148
149        </fieldset>
150
151    </form>
152
153</div>
154
155</body>
156</html>
Note: See TracBrowser for help on using the repository browser.