source: products/qPloneCaptchas/branches/plone-3.1/skins/captchas_ploneformmailer/2.5/formmailer_portlet.cpt @ 2284

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

Building directory structure

  • Property svn:eol-style set to native
File size: 5.2 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xmlns:tal="http://xml.zope.org/namespaces/tal"
3      xmlns:metal="http://xml.zope.org/namespaces/metal"
4      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5      i18n:domain="pfm">
6  <head><title></title></head>
7  <body>
8    <div metal:define-macro="portlet"
9         i18n:domain="pfm"
10         tal:omit-tag="" >
11      <dl class="portlet"
12           id="portlet-formmailer"
13           tal:define="pfm python:here.pfmbox;
14                       translatable python:hasattr(portal,'portal_languages') and portal.portal_languages.isTranslatable(pfm);
15                       pfm python:translatable and pfm.getTranslation() or pfm;
16                       form python:pfm.form"
17            tal:condition="python: here!=pfm">
18          <dt class="portletHeader" tal:content="pfm/title_or_id">Title or Id</dt>
19          <dd class="portletItem plain"
20              tal:define="title python: test(form.title, form.title, 'unknown');
21                          method python:form.method;
22                          enc python:form.enctype;
23                          fname string:${title}_form;
24                          tid template/id;
25                          tabindex python:Iterator()">
26              <div tal:condition="python:form.isTransformable('form_pre')"
27                   tal:content="structure python:form.getFormPre()">
28                Prepended text.
29              </div>
30              <form tal:define="groups form/get_groups"
31                    tal:attributes="action pfm/id;
32                                    id form/name;
33                                    method form/method;
34                                    enctype form/enctype">
35                <tal:repeat tal:repeat="group groups" >
36                  <fieldset tal:omit-tag="python:group=='Default'">
37                    <legend tal:content="group"
38                            tal:condition="python:group!='Default'"
39                            i18n:translate="">
40                      Legend
41                    </legend>
42                    <tal:repeat define="fields python:form.get_fields_in_group(group)"
43                                repeat="field fields">
44                      <div class="field"
45                           tal:condition="not:field/hidden"
46                           tal:define="field_id field/id;">
47                        <label tal:content="field/title"
48                               i18n:translate="">Label</label>
49                        <span tal:condition="field/is_required"
50                              class="fieldRequired"
51                              title="Required"
52                              i18n:domain="plone"
53                              i18n:attributes="title"
54                              i18n:translate="label_required">(*)</span>
55                        <div class="formHelp"
56                             tal:define="desc python:field['description']"
57                             tal:content="desc"
58                             i18n:translate="">Help</div>
59                        <div tal:condition="python: field.id in ['email',  'fullname']"
60                             tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,'');
61                                         input python:field.render(REQUEST=request, value = initvalue )"
62                             tal:replace="structure input"
63                             tal:attributes="tabindex tabindex/next;">
64                        </div>
65                        <div tal:condition="python: not field.id in ['email',  'fullname']"
66                             tal:define="input python:field.render(REQUEST=request)"
67                             tal:replace="structure input"
68                             tal:attributes="tabindex tabindex/next;">
69                        </div>
70                      </div>
71                      <div tal:condition="field/hidden"
72                           tal:define="input python:field.render(REQUEST=request)"
73                           tal:replace="structure input">
74                      </div>
75                    </tal:repeat>
76                  </fieldset>
77                </tal:repeat>
78                <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
79                <div class="formControls">
80                  <input tal:repeat="button python:pfm.getButtons()"
81                         i18n:attributes="value"
82                         tal:attributes="value python:button[0] or 'submit';
83                                         name  python:button[1] or button[0];
84                                         type  python:button[2] or 'submit';
85                                         class python:button[3] or 'context';
86                                         tabindex tabindex/next;"
87                         class="context"/>
88                </div>
89                <input type="hidden" name="form.submitted" value="1" />
90                <input type="hidden" name="uf_formid" tal:attributes="value form/id" />
91              </form>
92              <div tal:condition="python:form.isTransformable('form_post')"
93                   tal:content="structure python:form.getFormPost()">
94                Appended text
95              </div>
96        </dd>
97      </dl>
98    </div>
99  </body>
100</html>
Note: See TracBrowser for help on using the repository browser.