source: products/qPloneCaptchas/tags/1.3.0/skins/captchas_ploneformmailer/2.0.5/formmailer.cpt

Last change on this file was 1, checked in by myroslav, 19 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 5.4 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xml:lang="en-us"
3      lang="en-us"
4      xmlns:tal="http://xml.zope.org/namespaces/tal"
5      xmlns:metal="http://xml.zope.org/namespaces/metal"
6      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7      metal:use-macro="here/main_template/macros/master"
8      i18n:domain="pfm">
9  <head><title></title></head>
10  <body>
11
12    <div metal:fill-slot="main"
13         tal:define="form here/form;
14                     title python: test(form.title, form.title, 'unknown');
15                     method python:form.method;
16                     enc python:form.enctype;
17                     fname string:${title}_form;
18                     tid template/id;
19                     tabindex python:Iterator(pos=40000)">
20
21      <h1 tal:content="here/title_or_id" class="documentFirstHeading">
22        Title or id
23      </h1>
24
25      <div metal:use-macro="here/document_actions/macros/document_actions">
26        Document actions (print, sendto etc)
27      </div>
28
29      <div class="documentDescription"
30           tal:content="here/Description">
31        description
32      </div>
33
34      <div tal:condition="python:here.isTransformable('form_pre')"
35           tal:content="structure python:here.getFormPre()">
36        Prepended text.
37      </div>
38
39      <div id="formmailer">
40        <form action=""
41              tal:define="errors options/state/getErrors;
42                          groups form/get_groups"
43              tal:attributes="id form/name;
44                              method form/method;
45                              enctype form/enctype">
46
47          <tal:repeat tal:repeat="group groups" >
48            <fieldset tal:omit-tag="python:group=='Default'">
49
50              <legend tal:content="group"
51                      tal:condition="python:group!='Default'"
52                      i18n:translate="">
53                Legend
54              </legend>
55
56              <tal:repeat define="fields python:form.get_fields_in_group(group)"
57                          repeat="field fields">
58
59                <div class="field"
60                     tal:condition="not:field/hidden"
61                     tal:define="field_id field/id;
62                                 error python:errors.get(field_id, None)"
63                     tal:attributes="class python:test(error, 'field error', 'field');
64                                     id    python:'pfm_'+field_id;">
65
66                  <label tal:content="field/title"
67                         i18n:translate="">Label</label>
68
69                  <span tal:condition="field/is_required"
70                        class="fieldRequired"
71                        title="Required"
72                        i18n:domain="plone"
73                        i18n:attributes="title"
74                        i18n:translate="label_required">(Required)</span>
75
76                  <div class="formHelp"
77                       tal:define="desc python:field['description']"
78                       tal:content="desc"
79                       i18n:translate="">Help</div>
80
81                  <div tal:content="error"
82                       tal:condition="error"
83                       i18n:translate="">
84                    Validation error output
85                  </div>
86
87                  <div tal:condition="python: field.id in ['email',  'fullname']"
88                       tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,'');
89                                   input python:field.render(REQUEST=request, value = initvalue )"
90                       tal:replace="structure input"
91                       tal:attributes="tabindex tabindex/next;">
92                  </div>
93                  <div tal:condition="python: not field.id in ['email',  'fullname']"
94                       tal:define="input python:field.render(REQUEST=request)"
95                       tal:replace="structure input"
96                       tal:attributes="tabindex tabindex/next;">
97                  </div>
98
99                </div>
100
101                <div tal:condition="field/hidden"
102                     tal:define="initvalue python:test(field.id in ['email', 'fullname'],member.getProperty(field.id, ''),'');
103                                 input python:field.render(REQUEST=request, value=initvalue )"
104                     tal:replace="structure input">
105                </div>
106
107              </tal:repeat>
108            </fieldset>
109          </tal:repeat>
110          <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
111          <div class="formControls">
112            <input tal:repeat="button python:here.getButtons()"
113                   i18n:attributes="value"
114                   tal:attributes="value python:button[0] or 'submit';
115                                   name  python:button[1] or button[0];
116                                   type  python:button[2] or 'submit';
117                                   class python:button[3] or 'context';
118                                   id    python:'pfm_button_%s' % button[1] or button[0];
119                                   tabindex tabindex/next;"
120                   class="context"/>
121          </div>
122
123          <input type="hidden" name="form.submitted" value="1" />
124          <input type="hidden" name="uf_formid" tal:attributes="value form/id" />
125
126        </form>
127      </div>
128
129      <div tal:condition="python:here.isTransformable('form_post')"
130           tal:content="structure python:here.getFormPost()">
131        Appended text.
132      </div>
133
134    </div>
135  </body>
136</html>
Note: See TracBrowser for help on using the repository browser.