1 | <metal:definetemplate tal:define="template here/main_template/macros/master"> |
---|
2 | <metal:definemacro define-macro="clearance_edit_form"> |
---|
3 | <metal:usemacro use-macro=template> |
---|
4 | |
---|
5 | <metal:main fill-slot="main" |
---|
6 | tal:define=" |
---|
7 | info context/getClearanceInfo; |
---|
8 | s_name context/getStudentNameInContext;"> |
---|
9 | |
---|
10 | <metal:block tal:condition="not: info"> |
---|
11 | <span tal:content="here/illegal_view" /> |
---|
12 | </metal:block> |
---|
13 | <metal:block tal:condition="info"> |
---|
14 | <metal:block tal:define=" |
---|
15 | is_so context/isSectionOfficer; |
---|
16 | is_staff context/isStaff; |
---|
17 | is_co context/isClearanceOfficer; |
---|
18 | is_student context/isStudent; |
---|
19 | review_state info/review_state; |
---|
20 | clear_review_state info/clear_review_state; |
---|
21 | editable python:not is_co and (is_student and clear_review_state == 'opened' or is_so); |
---|
22 | mode python: test(editable,'edit','view'); |
---|
23 | layout_id python: test(is_so,'student_clearance','student_clearance_fe'); |
---|
24 | rendered_main python:info['clear_doc'].render(request=request, |
---|
25 | layout_mode = mode, |
---|
26 | schema_id='student_clearance', |
---|
27 | layout_id=layout_id, |
---|
28 | use_session=True); |
---|
29 | form_action string:clearance_edit; |
---|
30 | creation python:False;"> |
---|
31 | |
---|
32 | <!-- Administration --> |
---|
33 | <tal:block condition="python: not(is_staff or is_so or is_student)"> |
---|
34 | <metal:block use-macro="here/error_not_found/macros/not_found" /> |
---|
35 | </tal:block> |
---|
36 | <tal:block condition="is_staff"> |
---|
37 | <h3> |
---|
38 | <span tal:condition="info"> |
---|
39 | <span tal:content="s_name" />: |
---|
40 | </span> |
---|
41 | <span tal:content="here/title_or_id" /> |
---|
42 | </h3> |
---|
43 | <br /> |
---|
44 | </tal:block> |
---|
45 | <!-- Student --> |
---|
46 | <tal:block condition="python: is_student"> |
---|
47 | <a href="" |
---|
48 | tal:attributes="href string:${here/academicsParent}"> |
---|
49 | <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/> |
---|
50 | Up one level |
---|
51 | </a> |
---|
52 | <h3>Fill Your Clearance/Eligibility Form!</h3> |
---|
53 | <br /> |
---|
54 | </tal:block> |
---|
55 | |
---|
56 | |
---|
57 | <form action="ACTION" method="post" id="editForm" |
---|
58 | enctype="multipart/form-data" class="workflow" |
---|
59 | tal:attributes="action form_action"> |
---|
60 | <div class="group"> |
---|
61 | <div class="documentFields"> |
---|
62 | <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml" |
---|
63 | replace="structure python:getFormUidHtml(request)"/> |
---|
64 | <input type="hidden" id="button_placeholder" name="button_placeholder" value="" /> |
---|
65 | <div id="rendered_main" tal:content="structure rendered_main"> |
---|
66 | CONTENT |
---|
67 | </div> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <metal:block use-macro="here/clearance_edit_lib/macros/buttons" /> |
---|
71 | </form> |
---|
72 | <div id="ajax_psm" style="display:none"> |
---|
73 | ajax feedback |
---|
74 | </div> |
---|
75 | </metal:block> |
---|
76 | </metal:block> |
---|
77 | </metal:main> |
---|
78 | |
---|
79 | </metal:usemacro> |
---|
80 | </metal:definemacro> |
---|
81 | </metal:definetemplate> |
---|