source: products/quintagroup.plonecomments/trunk/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt @ 1631

Last change on this file since 1631 was 1631, checked in by kroman0, 14 years ago

Fixed global variables in templates for Plone4, fixed some translation messages and preferences forms condition

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