source: products/qPloneCaptchas/tags/1.3.1/skins/captchas_ploneformmailer/2.0.5/formmailer_portlet.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.3 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      <div 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        <div class="padding">
19          <h5 tal:content="pfm/title_or_id">Title or Id</h5>
20          <div class="portletBody"
21               tal:define="title python: test(form.title, form.title, 'unknown');
22                           method python:form.method;
23                           enc python:form.enctype;
24                           fname string:${title}_form;
25                           tid template/id;
26                           tabindex python:Iterator()">
27            <div class="portletContent odd">
28              <div tal:condition="python:form.isTransformable('form_pre')"
29                   tal:content="structure python:form.getFormPre()">
30                Prepended text.
31              </div>
32              <form tal:define="groups form/get_groups"
33                    tal:attributes="action pfm/id;
34                                    id form/name;
35                                    method form/method;
36                                    enctype form/enctype">
37
38                <tal:repeat tal:repeat="group groups" >
39                  <fieldset tal:omit-tag="python:group=='Default'">
40
41                    <legend tal:content="group"
42                            tal:condition="python:group!='Default'"
43                            i18n:translate="">
44                      Legend
45                    </legend>
46
47                    <tal:repeat define="fields python:form.get_fields_in_group(group)"
48                                repeat="field fields">
49
50                      <div class="field"
51                           tal:condition="not:field/hidden"
52                           tal:define="field_id field/id;">
53
54                        <label tal:content="field/title"
55                               i18n:translate="">Label</label>
56
57                        <span tal:condition="field/is_required"
58                              class="fieldRequired"
59                              title="Required"
60                              i18n:domain="plone"
61                              i18n:attributes="title"
62                              i18n:translate="label_required">(Required)</span>
63
64                        <div class="formHelp"
65                             tal:define="desc python:field['description']"
66                             tal:content="desc"
67                             i18n:translate="">Help</div>
68
69                        <div tal:condition="python: field.id in ['email',  'fullname']"
70                             tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,'');
71                                         input python:field.render(REQUEST=request, value = initvalue )"
72                             tal:replace="structure input"
73                             tal:attributes="tabindex tabindex/next;">
74                        </div>
75                        <div tal:condition="python: not field.id in ['email',  'fullname']"
76                             tal:define="input python:field.render(REQUEST=request)"
77                             tal:replace="structure input"
78                             tal:attributes="tabindex tabindex/next;">
79                        </div>
80
81                      </div>
82
83                      <div tal:condition="field/hidden"
84                           tal:define="input python:field.render(REQUEST=request)"
85                           tal:replace="structure input">
86                      </div>
87
88                    </tal:repeat>
89                  </fieldset>
90                </tal:repeat>
91                <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
92                <div class="formControls">
93                  <input tal:repeat="button python:pfm.getButtons()"
94                         i18n:attributes="value"
95                         tal:attributes="value python:button[0] or 'submit';
96                                         name  python:button[1] or button[0];
97                                         type  python:button[2] or 'submit';
98                                         class python:button[3] or 'context';
99                                         tabindex tabindex/next;"
100                         class="context"/>
101                </div>
102
103                <input type="hidden" name="form.submitted" value="1" />
104                <input type="hidden" name="uf_formid" tal:attributes="value form/id" />
105
106              </form>
107              <div tal:condition="python:form.isTransformable('form_post')"
108                   tal:content="structure python:form.getFormPost()">
109                Appended text
110              </div>
111            </div>
112          </div>
113        </div>
114      </div>
115    </div>
116  </body>
117</html>
Note: See TracBrowser for help on using the repository browser.