[478] | 1 | <!-- a layout_lib macro --> |
---|
[486] | 2 | <!-- $Id: layout_application_edit.pt 535 2006-09-19 07:53:21Z joachim $ --> |
---|
[492] | 3 | |
---|
[478] | 4 | <metal:block define-macro="default_edit" |
---|
| 5 | tal:define="layout options/layout; |
---|
[486] | 6 | ds options/datastructure; |
---|
| 7 | dm ds/getDataModel; |
---|
| 8 | formaction formaction|string:student_edit; |
---|
| 9 | creation creation|nothing; |
---|
| 10 | metadata metadata|nothing; |
---|
| 11 | type_name request/type_name|nothing; |
---|
| 12 | ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None); |
---|
| 13 | cpsmcat nocall:here/translation_service; |
---|
[535] | 14 | apply request/apply_button|nothing; |
---|
[486] | 15 | "> |
---|
[478] | 16 | |
---|
[486] | 17 | <form action="" id="editForm" method="post" |
---|
| 18 | enctype="multipart/form-data" class="workflow" |
---|
| 19 | tal:attributes="action formaction" |
---|
[492] | 20 | |
---|
[486] | 21 | > |
---|
[493] | 22 | <table width="" cellpadding="2" cellspacing="0" summary="Form layout" |
---|
[486] | 23 | tal:condition="layout/rows"> |
---|
[492] | 24 | <tr tal:repeat="row layout/rows" valign="top" > |
---|
| 25 | <span tal:repeat="cell row" |
---|
[486] | 26 | tal:attributes="colspan cell/ncols"> |
---|
| 27 | <tal:block define="widget cell/widget; |
---|
[492] | 28 | wid widget/getWidgetId; |
---|
| 29 | err python:ds.getError(wid); |
---|
| 30 | err_mapping python:ds.getErrorMapping(wid); |
---|
| 31 | is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes); |
---|
| 32 | tooltip_id python:wid + '_help'; |
---|
| 33 | widget_css_class cell/widget_css_class|nothing; |
---|
| 34 | css_class python:test(err, 'row error','row')" |
---|
| 35 | > |
---|
[486] | 36 | <div tal:attributes="class widget_css_class; |
---|
| 37 | id python:widget.getHtmlWidgetId()+'_widget';" |
---|
| 38 | > |
---|
[492] | 39 | <td> |
---|
[486] | 40 | <div class="label" tal:condition="widget/label_edit" |
---|
| 41 | tal:attributes="class python:test(is_required, 'label required','label')"> |
---|
| 42 | <label tal:content="widget/label_edit" |
---|
[492] | 43 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: |
---|
[486] | 44 | </div> |
---|
| 45 | <button type="button" class="tooltipControl" |
---|
| 46 | tal:condition="widget/help" |
---|
| 47 | tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> |
---|
[492] | 48 | </td> |
---|
| 49 | <td> |
---|
| 50 | <span class="field"> |
---|
[486] | 51 | <div tal:replace="structure cell/widget_rendered"/> |
---|
[492] | 52 | </span> |
---|
[486] | 53 | <div class="tooltipArea" style="visibility: hidden;" |
---|
| 54 | tal:condition="widget/help" |
---|
| 55 | tal:attributes="id tooltip_id; |
---|
| 56 | onclick python:'showElement(false, \'%s\')' % tooltip_id;" |
---|
| 57 | > |
---|
| 58 | <tal:block tal:content="widget/help">This is the help for this field |
---|
| 59 | </tal:block> |
---|
| 60 | </div> |
---|
| 61 | <tal:block condition="err"> |
---|
[478] | 62 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
| 63 | <br /><em style="color: red" |
---|
[486] | 64 | tal:content="msg">err</em> |
---|
[478] | 65 | </tal:block> |
---|
[486] | 66 | </tal:block> |
---|
[492] | 67 | </td> |
---|
[478] | 68 | </div> |
---|
[486] | 69 | </tal:block> |
---|
[492] | 70 | </span> |
---|
[486] | 71 | </tr> |
---|
| 72 | </table> |
---|
[492] | 73 | <br /> |
---|
[478] | 74 | <input type="submit" class="standalone" name="cpsdocument_edit_button" |
---|
[535] | 75 | value="button_change" |
---|
| 76 | id="cpsdocument_edit_button" |
---|
| 77 | tal:condition="not:creation" /> |
---|
| 78 | <input type="submit" class="standalone" name="apply_admission" |
---|
| 79 | value="apply for admission" |
---|
| 80 | id="cpsdocument_edit_and_view_button" |
---|
| 81 | tal:condition="apply" |
---|
| 82 | tal:attributes="value apply"/> |
---|
[481] | 83 | <input type="submit" |
---|
| 84 | class="standalone" |
---|
| 85 | name="cpsdocument_create_button" |
---|
[502] | 86 | value="apply" |
---|
| 87 | tal:attributes="value options/button" |
---|
| 88 | tal:condition="creation" /> |
---|
[478] | 89 | |
---|
[492] | 90 | </form> |
---|
[478] | 91 | </metal:block> |
---|