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 | <div metal:fill-slot="main" |
---|
11 | tal:define="errors options/state/getErrors;"> |
---|
12 | |
---|
13 | <h1 i18n:translate="heading_add_comment">Add Comment</h1> |
---|
14 | |
---|
15 | <p i18n:translate="description_add_comment"> |
---|
16 | You can add a comment by filling out the form below. Plain text formatting. |
---|
17 | </p> |
---|
18 | |
---|
19 | <form name="edit_form" |
---|
20 | method="post" |
---|
21 | action="talkback" |
---|
22 | tal:attributes="action string:${here/getId}/${template/getId}" |
---|
23 | tal:define="isForAnonymous here/isForAnonymous"> |
---|
24 | <fieldset> |
---|
25 | <legend i18n:translate="legend_comment_details">Comment Details</legend> |
---|
26 | |
---|
27 | <input type="hidden" name="Creator" value="" |
---|
28 | tal:attributes="value member/getUserName" |
---|
29 | tal:condition="not:isForAnonymous" /> |
---|
30 | |
---|
31 | <div class="field" |
---|
32 | tal:condition="isForAnonymous"> |
---|
33 | |
---|
34 | <div class="field" |
---|
35 | tal:define="error errors/Creator|nothing;" |
---|
36 | tal:attributes="class python:test(error, 'field error', 'field');"> |
---|
37 | |
---|
38 | <label for="username" i18n:translate="label_name">Name</label> |
---|
39 | |
---|
40 | <span class="fieldRequired" title="Required" |
---|
41 | tal:condition="isAnon" |
---|
42 | i18n:attributes="title" |
---|
43 | i18n:translate="label_required">(Required)</span> |
---|
44 | |
---|
45 | <div class="formHelp" i18n:translate="help_name" |
---|
46 | tal:condition="isAnon"> |
---|
47 | Enter your name for sign comment. |
---|
48 | </div> |
---|
49 | |
---|
50 | <div tal:content="error">Validation error output</div> |
---|
51 | |
---|
52 | <div> |
---|
53 | <input name="Creator" |
---|
54 | id="username" |
---|
55 | value="" alt="Submitter" title="Name" |
---|
56 | size="40" |
---|
57 | tabindex="" |
---|
58 | i18n:attributes="title" |
---|
59 | tal:attributes="tabindex tabindex/next; |
---|
60 | value python:test(isAnon, '', member.getUserName()); |
---|
61 | disabled python:test(isAnon, None, 'true')" /> |
---|
62 | |
---|
63 | </div> |
---|
64 | </div> |
---|
65 | </div> |
---|
66 | |
---|
67 | <div class="portalMessage" |
---|
68 | tal:condition="python:(not isForAnonymous) and isAnon"> |
---|
69 | |
---|
70 | <tal:block replace="structure here/info.gif"/> |
---|
71 | |
---|
72 | <span i18n:translate="legend_note_reply_anonymous"> |
---|
73 | Note: you are not logged in. You may optionally enter your username |
---|
74 | and password below. If you don't enter your username and |
---|
75 | password below, this comment will be posted as the 'Anonymous User'. |
---|
76 | </span> |
---|
77 | |
---|
78 | <br/><br/> |
---|
79 | |
---|
80 | <div class="field"> |
---|
81 | |
---|
82 | <label for="username" i18n:translate="label_name">Name</label> |
---|
83 | |
---|
84 | <input name="username" |
---|
85 | id="username" |
---|
86 | value="" alt="Username" title="Name" |
---|
87 | size="40" |
---|
88 | tabindex="" |
---|
89 | i18n:attributes="title" |
---|
90 | tal:attributes="tabindex tabindex/next;" /> |
---|
91 | |
---|
92 | </div> |
---|
93 | |
---|
94 | <div class="field"> |
---|
95 | |
---|
96 | <label for="password" i18n:translate="label_password">Password</label> |
---|
97 | |
---|
98 | <input type="password" |
---|
99 | id="password" |
---|
100 | name="password" |
---|
101 | tabindex="" |
---|
102 | value="" alt="Password" title="Password" |
---|
103 | size="40" |
---|
104 | i18n:attributes="title" |
---|
105 | tal:attributes="tabindex tabindex/next;" /> |
---|
106 | |
---|
107 | </div> |
---|
108 | |
---|
109 | </div> |
---|
110 | |
---|
111 | |
---|
112 | <div class="field" |
---|
113 | tal:define="error errors/subject|nothing;" |
---|
114 | tal:attributes="class python:test(error, 'field error', 'field')"> |
---|
115 | |
---|
116 | <label for="title" i18n:translate="label_subject">Subject</label> |
---|
117 | |
---|
118 | <span class="fieldRequired" title="Required" |
---|
119 | i18n:attributes="title" |
---|
120 | i18n:translate="label_required">(Required)</span> |
---|
121 | |
---|
122 | <div class="formHelp" i18n:translate="help_subject"> |
---|
123 | The subject of your posting. |
---|
124 | </div> |
---|
125 | |
---|
126 | <div tal:content="error">Validation error output</div> |
---|
127 | |
---|
128 | <input name="subject" |
---|
129 | id="subject" |
---|
130 | value="" |
---|
131 | size="40" |
---|
132 | tabindex="" |
---|
133 | tal:attributes="value request/subject|request/title_override|nothing; |
---|
134 | tabindex tabindex/next" /> |
---|
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="text" i18n:translate="label_body_text">Body text</label> |
---|
143 | |
---|
144 | <span class="fieldRequired" title="Required" |
---|
145 | i18n:attributes="title" |
---|
146 | i18n:translate="label_required">(Required)</span> |
---|
147 | |
---|
148 | <div class="formHelp" i18n:translate="help_body_text"> |
---|
149 | The message of your posting. |
---|
150 | </div> |
---|
151 | |
---|
152 | <div tal:content="error">Validation error output</div> |
---|
153 | |
---|
154 | <textarea name="body_text" |
---|
155 | id="body_text" |
---|
156 | cols="40" |
---|
157 | rows="8" |
---|
158 | tabindex="" |
---|
159 | tal:content="request/body_text|request/text_override | nothing" |
---|
160 | tal:attributes="tabindex tabindex/next" |
---|
161 | ></textarea> |
---|
162 | |
---|
163 | </div> |
---|
164 | |
---|
165 | <div class="formControls"> |
---|
166 | |
---|
167 | <input class="context" |
---|
168 | tabindex="" |
---|
169 | type="submit" |
---|
170 | value="Add Comment" |
---|
171 | name="form.button.Save" |
---|
172 | i18n:attributes="value" |
---|
173 | tal:attributes="tabindex tabindex/next; |
---|
174 | name string:discussion_reply:method;" /> |
---|
175 | |
---|
176 | </div> |
---|
177 | <input type="hidden" name="form.submitted" value="1" /> |
---|
178 | |
---|
179 | </fieldset> |
---|
180 | |
---|
181 | </form> |
---|
182 | |
---|
183 | </div> |
---|
184 | |
---|
185 | </body> |
---|
186 | </html> |
---|