source: products/qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.5/formmailer.cpt @ 1

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