source: products/quintagroup.ploneformgen.readonlystringfield/trunk/quintagroup/ploneformgen/readonlystringfield/skins/readonlystringfield/readonlystring.pt @ 826

Last change on this file since 826 was 826, checked in by mylan, 17 years ago

Fix i18n:attributes deprecation warning for Plone-2.5 (#337)

  • Property svn:eol-style set to native
File size: 1.9 KB
RevLine 
[322]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="plone">
6  <head><title></title></head>
7  <body>
8
9    <!-- Readonly String Widgets -->
10    <metal:view_macro define-macro="view"
11            tal:define="kssClassesView context/@@kss_field_decorator_view;
12                        getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;">
13        <span metal:define-macro="string-field-view"
14            tal:define="kss_class python:getKssClasses(fieldName,
15                              templateId='readonlystring', macro='string-field-view');"
16            tal:attributes="class kss_class;
17                            id string:parent-fieldname-$fieldName">
18            <span metal:define-slot="inside"
19                  tal:replace="accessor">string</span>
20        </span>
21    </metal:view_macro>
22
23    <metal:define define-macro="edit">
24      <metal:use use-macro="field_macro | here/widgets/field/macros/edit">
25        <input metal:fill-slot="widget_body"
26               type="text"
27               name=""
28               class="blurrable firstToFocus"
29               id=""
30               value=""
31               size="30"
32               readonly="1"
[826]33               tal:define="editable python:path('request/%s_editable|nothing' % fieldName)"
[322]34               tal:attributes="name fieldName;
35                               id fieldName;
36                               value value;
37                               size widget/size;
38                               maxlength widget/maxlength;
[826]39                               readonly python:not editable and '1' or None"
[322]40               />
41      </metal:use>
42    </metal:define>
43
44    <div metal:define-macro="search">
45      <div metal:use-macro="here/readonlystring/macros/edit">
46      </div>
47    </div>
48
49  </body>
50
51</html>
52
Note: See TracBrowser for help on using the repository browser.