1 | <!-- a layout_lib macro --> |
---|
2 | <!-- $Id: layout_application_edit.pt 535 2006-09-19 07:53:21Z joachim $ --> |
---|
3 | |
---|
4 | <metal:block define-macro="default_edit" |
---|
5 | tal:define="layout options/layout; |
---|
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; |
---|
14 | apply request/apply_button|nothing; |
---|
15 | "> |
---|
16 | |
---|
17 | <form action="" id="editForm" method="post" |
---|
18 | enctype="multipart/form-data" class="workflow" |
---|
19 | tal:attributes="action formaction" |
---|
20 | |
---|
21 | > |
---|
22 | <table width="" cellpadding="2" cellspacing="0" summary="Form layout" |
---|
23 | tal:condition="layout/rows"> |
---|
24 | <tr tal:repeat="row layout/rows" valign="top" > |
---|
25 | <span tal:repeat="cell row" |
---|
26 | tal:attributes="colspan cell/ncols"> |
---|
27 | <tal:block define="widget cell/widget; |
---|
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 | > |
---|
36 | <div tal:attributes="class widget_css_class; |
---|
37 | id python:widget.getHtmlWidgetId()+'_widget';" |
---|
38 | > |
---|
39 | <td> |
---|
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" |
---|
43 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: |
---|
44 | </div> |
---|
45 | <button type="button" class="tooltipControl" |
---|
46 | tal:condition="widget/help" |
---|
47 | tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> |
---|
48 | </td> |
---|
49 | <td> |
---|
50 | <span class="field"> |
---|
51 | <div tal:replace="structure cell/widget_rendered"/> |
---|
52 | </span> |
---|
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"> |
---|
62 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
63 | <br /><em style="color: red" |
---|
64 | tal:content="msg">err</em> |
---|
65 | </tal:block> |
---|
66 | </tal:block> |
---|
67 | </td> |
---|
68 | </div> |
---|
69 | </tal:block> |
---|
70 | </span> |
---|
71 | </tr> |
---|
72 | </table> |
---|
73 | <br /> |
---|
74 | <input type="submit" class="standalone" name="cpsdocument_edit_button" |
---|
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"/> |
---|
83 | <input type="submit" |
---|
84 | class="standalone" |
---|
85 | name="cpsdocument_create_button" |
---|
86 | value="apply" |
---|
87 | tal:attributes="value options/button" |
---|
88 | tal:condition="creation" /> |
---|
89 | |
---|
90 | </form> |
---|
91 | </metal:block> |
---|