[7955] | 1 | <metal:define tal:define="isStaff context/isStaff; |
---|
| 2 | isStudent context/isStudent; |
---|
| 3 | info context/getApplicationInfo; |
---|
| 4 | app_email info/app_doc/app_email|nothing; |
---|
| 5 | app_passport info/has_passport; |
---|
| 6 | "> |
---|
| 7 | |
---|
| 8 | <metal:block tal:condition="isStaff"> |
---|
| 9 | <metal:block use-macro="here/layout_waeup_edit/macros/default_edit"/> |
---|
| 10 | </metal:block> |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | <metal:block define-macro="application_student_edit" |
---|
| 14 | tal:condition="python:isStudent" |
---|
| 15 | tal:define="layout options/layout; |
---|
| 16 | ds options/datastructure; |
---|
| 17 | dm ds/getDataModel; |
---|
| 18 | formaction options/formaction|string:application_edit; |
---|
| 19 | creation creation|nothing; |
---|
| 20 | cpsmcat nocall:here/translation_service; |
---|
| 21 | proceed options/proceed|nothing; |
---|
| 22 | widgets python:context.getRenderedWidgets(layout); |
---|
| 23 | widget_email widgets/app_email|nothing; |
---|
[7956] | 24 | widget_passport nothing; |
---|
[7955] | 25 | "> |
---|
| 26 | <table class="layoutDefault" summary="Form layout" |
---|
| 27 | > |
---|
| 28 | |
---|
| 29 | <tr tal:condition="python: widget_email and not app_email" |
---|
| 30 | tal:define="cell widget_email"> |
---|
| 31 | <tal:block tal:define="widget cell/widget; |
---|
| 32 | wid widget/getWidgetId; |
---|
| 33 | err python:ds.getError(wid); |
---|
| 34 | err_mapping python:ds.getErrorMapping(wid); |
---|
| 35 | is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes); |
---|
| 36 | widget_css_class widget/widget_css_class|nothing; |
---|
| 37 | css_class python:test(err, 'row error','row')"> |
---|
| 38 | <div tal:attributes="class widget_css_class; |
---|
| 39 | id python:widget.getHtmlWidgetId()+'_widget';"> |
---|
| 40 | <td> |
---|
| 41 | <div class="label" tal:condition="widget/label_edit" |
---|
| 42 | tal:attributes="class python:test(is_required, 'label required','label')"> |
---|
| 43 | <label tal:content="widget/label_edit" |
---|
| 44 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: |
---|
| 45 | </div> |
---|
| 46 | </td> |
---|
| 47 | <td> |
---|
| 48 | <span class="field"> |
---|
| 49 | <div tal:replace="structure cell/widget_rendered"/> |
---|
| 50 | </span> |
---|
| 51 | <tal:block condition="err"> |
---|
| 52 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
| 53 | <br /><em style="color: red" |
---|
| 54 | tal:content="msg">err</em> |
---|
| 55 | </tal:block> |
---|
| 56 | </tal:block> |
---|
| 57 | </td> |
---|
| 58 | </div> |
---|
| 59 | </tal:block> |
---|
| 60 | </tr> |
---|
| 61 | <tr tal:condition="python: widget_passport and not app_passport" |
---|
| 62 | tal:define="cell widget_passport"> |
---|
| 63 | <tal:block tal:define="widget cell/widget; |
---|
| 64 | wid widget/getWidgetId; |
---|
| 65 | err python:ds.getError(wid); |
---|
| 66 | err_mapping python:ds.getErrorMapping(wid); |
---|
| 67 | is_required python: widget.is_required and creation and ('create' not in widget.readonly_layout_modes); |
---|
| 68 | tooltip_id python:wid + '_help'; |
---|
| 69 | widget_css_class widget/widget_css_class|nothing; |
---|
| 70 | css_class python:test(err, 'row error','row')" |
---|
| 71 | > |
---|
| 72 | <div tal:attributes="class widget_css_class; |
---|
| 73 | id python:widget.getHtmlWidgetId()+'_widget';" |
---|
| 74 | > |
---|
| 75 | <td> |
---|
| 76 | <div class="label" tal:condition="widget/label_edit" |
---|
| 77 | tal:attributes="class python:test(is_required, 'label required','label')"> |
---|
| 78 | <label tal:content="widget/label_edit" |
---|
| 79 | tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: |
---|
| 80 | |
---|
| 81 | <button type="button" class="tooltipControl" |
---|
| 82 | tal:condition="widget/help" |
---|
| 83 | tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button> |
---|
| 84 | </div> |
---|
| 85 | </td> |
---|
| 86 | <td> |
---|
| 87 | <span class="field"> |
---|
| 88 | <div tal:replace="structure cell/widget_rendered"/> |
---|
| 89 | </span> |
---|
| 90 | <div class="tooltipArea" style="visibility: hidden;" |
---|
| 91 | tal:condition="widget/help" |
---|
| 92 | tal:attributes="id tooltip_id; |
---|
| 93 | onclick python:'showElement(false, \'%s\')' % tooltip_id;" |
---|
| 94 | > |
---|
| 95 | <tal:block tal:content="widget/help">This is the help for this field |
---|
| 96 | </tal:block> |
---|
| 97 | </div> |
---|
| 98 | <tal:block condition="err"> |
---|
| 99 | <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)"> |
---|
| 100 | <br /><em style="color: red" |
---|
| 101 | tal:content="msg">err</em> |
---|
| 102 | </tal:block> |
---|
| 103 | </tal:block> |
---|
| 104 | </td> |
---|
| 105 | </div> |
---|
| 106 | </tal:block> |
---|
| 107 | </tr> |
---|
| 108 | </table> |
---|
| 109 | </metal:block> |
---|
| 110 | </metal:define> |
---|