[788] | 1 | <!-- a layout_lib macro --> |
---|
[805] | 2 | <!-- $Id: layout_clearance_edit.pt 826 2006-11-10 12:44:56Z henrik $ --> |
---|
[788] | 3 | |
---|
| 4 | <metal:block define-macro="default_edit" |
---|
| 5 | tal:define="layout options/layout; |
---|
| 6 | ds options/datastructure; |
---|
| 7 | dm ds/getDataModel; |
---|
| 8 | formaction options/formaction|string:clearance_edit; |
---|
| 9 | creation creation|nothing; |
---|
| 10 | metadata metadata|nothing; |
---|
| 11 | type_name request/type_name|nothing; |
---|
| 12 | cpsmcat nocall:here/translation_service; |
---|
| 13 | proceed options/proceed|nothing; |
---|
| 14 | widgets python:context.getRenderedWidgets(layout); |
---|
| 15 | "> |
---|
| 16 | <table class="layoutDefault" summary="Form layout" |
---|
| 17 | tal:condition="layout/rows"> |
---|
| 18 | <span tal:repeat="row python: layout['rows']" valign="top" > |
---|
| 19 | <span tal:repeat="cell row"> |
---|
[789] | 20 | <span tal:define="widget cell/widget; |
---|
[788] | 21 | wid widget/getWidgetId; |
---|
| 22 | err python:ds.getError(wid); |
---|
| 23 | err_mapping python:ds.getErrorMapping(wid); |
---|
| 24 | is_required python: widget.is_required; |
---|
| 25 | tooltip_id python:wid + '_help'; |
---|
| 26 | widget_css_class cell/widget_css_class|nothing; |
---|
| 27 | css_class python:test(err, 'row error','row')" |
---|
| 28 | tal:condition="python: wid != 'passport'" |
---|
| 29 | > |
---|
[789] | 30 | <tr tal:condition="widget/description|nothing" class="even ajaxtd"> |
---|
[826] | 31 | <th colspan="5" align="left"><h3 tal:replace="widget/description" /></th> |
---|
[789] | 32 | </tr> |
---|
| 33 | <tr> |
---|
[788] | 34 | <div tal:attributes="class widget_css_class; |
---|
| 35 | id python:widget.getHtmlWidgetId()+'_widget';" |
---|
| 36 | > |
---|
| 37 | <td> |
---|
| 38 | <div class="label" tal:condition="widget/label_edit" |
---|
| 39 | tal:attributes="class python:test(is_required, 'label required','label')"> |
---|
| 40 | <label tal:content="widget/label_edit" |
---|
| 41 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: |
---|
| 42 | </div> |
---|
| 43 | <button type="button" class="tooltipControl" |
---|
| 44 | tal:condition="widget/help" |
---|
| 45 | tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> |
---|
| 46 | </td> |
---|
| 47 | <td> |
---|
| 48 | <span class="field"> |
---|
| 49 | <div tal:replace="structure cell/widget_rendered"/> |
---|
| 50 | </span> |
---|
| 51 | <div class="tooltipArea" style="visibility: hidden;" |
---|
| 52 | tal:condition="widget/help" |
---|
| 53 | tal:attributes="id tooltip_id; |
---|
| 54 | onclick python:'showElement(false, \'%s\')' % tooltip_id;" |
---|
| 55 | > |
---|
| 56 | <tal:block tal:content="widget/help">This is the help for this field |
---|
| 57 | </tal:block> |
---|
| 58 | </div> |
---|
| 59 | <tal:block condition="python:err"> |
---|
| 60 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
| 61 | <br /><em style="color: red" |
---|
| 62 | tal:content="msg">err</em> |
---|
| 63 | </tal:block> |
---|
| 64 | </tal:block> |
---|
| 65 | </td> |
---|
| 66 | </div> |
---|
| 67 | </tr> |
---|
| 68 | </span> |
---|
[789] | 69 | </span> |
---|
[788] | 70 | </span> |
---|
| 71 | </table> |
---|
| 72 | </metal:block> |
---|