source: products/qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.1.2/formmailer.cpt @ 3664

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

Building directory structure

  • Property svn:eol-style set to native
File size: 5.0 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    <div metal:fill-slot="main"
12         tal:define="script here/runBeforeScriptIfNeeded;
13                     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 tabindex|python:Iterator(pos=30000)">
20      <h1 tal:content="here/title_or_id" class="documentFirstHeading">
21        Title or id
22      </h1>
23      <div metal:use-macro="here/document_actions/macros/document_actions">
24        Document actions (print, sendto etc)
25      </div>
26      <div class="documentDescription"
27           tal:content="here/Description">
28        description
29      </div>
30      <div tal:condition="python:here.isTransformable('form_pre')"
31           tal:content="structure python:here.getFormPre()">
32        Prepended text.
33      </div>
34      <div id="formmailer">
35        <form action=""
36              tal:define="errors options/state/getErrors;
37                          groups form/get_groups"
38              tal:attributes="id form/name;
39                              method form/method;
40                              enctype form/enctype">
41
42                              <div tal:condition="errors" class="portalMessage">Please correct the errors indicated below.</div>
43          <tal:repeat tal:repeat="group groups" >
44            <fieldset tal:omit-tag="python:group=='Default'">
45              <legend tal:content="group"
46                      tal:condition="python:group!='Default'"
47                      i18n:translate="">
48                Legend
49              </legend>
50              <tal:repeat define="fields python:form.get_fields_in_group(group)"
51                          repeat="field fields">
52                <div class="field"
53                     tal:condition="not:field/hidden"
54                     tal:define="field_id field/id;
55                                 error python:errors.get(field_id, None)"
56                     tal:attributes="class python:test(error, 'field error', 'field');
57                                     id    python:'pfm_'+field_id;">
58                  <label tal:content="field/title"
59                         tal:attributes="for field_id"
60                         i18n:translate="">Label</label>
61                  <span tal:condition="field/is_required"
62                        class="fieldRequired"
63                        title="Required"
64                        i18n:domain="plone"
65                        i18n:attributes="title"
66                        i18n:translate="label_required">(Required)</span>
67                  <div class="formHelp"
68                       tal:define="desc python:field['description']"
69                       tal:content="desc"
70                       i18n:translate="">Help</div>
71                  <div tal:content="error"
72                       tal:condition="error"
73                       i18n:translate="">
74                    Validation error output
75                  </div>
76                  <div tal:define="initvalue python:request.get(field.id, None);
77                                   input python:field.render(REQUEST=request, value=initvalue)"
78                       tal:replace="structure input">
79                  </div>
80                </div>
81                <div tal:condition="field/hidden"
82                     tal:define="initvalue python:request.get(field.id, None);
83                                 input python:field.render(REQUEST=request, value=initvalue)"
84                     tal:replace="structure input">
85                </div>
86              </tal:repeat>
87            </fieldset>
88          </tal:repeat>
89          <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
90          <div class="formControls">
91            <input tal:repeat="button python:here.getButtons()"
92                   i18n:attributes="value"
93                   tal:attributes="value python:button[0] or 'submit';
94                                   name  python:button[1] or button[0];
95                                   type  python:button[2] or 'submit';
96                                   class python:button[3] or 'context';
97                                   id    python:'pfm_button_%s' % button[1] or button[0];"
98                   class="context"/>
99          </div>
100          <input type="hidden" name="form.submitted" value="1" />
101          <input type="hidden" name="uf_formid" tal:attributes="value form/id" />
102        </form>
103      </div>
104      <div tal:condition="python:here.isTransformable('form_post')"
105           tal:content="structure python:here.getFormPost()">
106        Appended text.
107      </div>
108    </div>
109  </body>
110</html>
Note: See TracBrowser for help on using the repository browser.