source: WAeUP_SRP/trunk/skins/waeup_default/waeup_edit_form.pt @ 12663

Last change on this file since 12663 was 3682, checked in by Henrik Bettermann, 16 years ago
  • Implement Student Pastoral Report for secondary schools
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1<metal:defineblock tal:define="rendered_main python:context.getContent().render(layout_mode='edit',
2           cluster=None,
3           request=request,
4           use_session=True,
5           no_form=True);
6           form_action string:waeup_edit;
7           form_type string:waeup;
8           creation python:False;
9           is_allowed context/isSectionOfficer;
10           metadata metadata|nothing;
11           template here/main_template/macros/master;
12           info here/getDocumentInfo;"
13           >
14  <metal:block define-macro="edit_form">
15    <metal:block use-macro=template>
16      <metal:block fill-slot="style_slot">
17        <link rel="Stylesheet" type="text/css" href=""
18              tal:attributes="href string:${base_url}document.css" />
19        <metal:block define-macro="widgets_javascript">
20
21       
22         
23          <span tal:condition="python:0">
24            <script type="text/javascript" src="prototype.js"
25                    tal:attributes="src string:${base_url}prototype.js"></script>
26            <script type="text/javascript" src="effects.js"
27                    tal:attributes="src string:${base_url}effects.js"></script>
28            <script type="text/javascript" src="controls.js"
29                    tal:attributes="src string:${base_url}controls.js"></script>
30            <script type="text/javascript" src="cpsdocument.js"
31                    tal:attributes="src string:${base_url}cpsdocument.js"></script>
32            <script type="text/javascript" src="cpsschemas.js"
33                    tal:attributes="src string:${base_url}cpsschemas.js"></script>
34          </span>
35         
36         
37         
38          <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
39            <script type="text/javascript">
40              var popup_editor_form = 'popup_fckeditor_form';
41              var width = 640;
42              var height = 520;
43            </script>
44          </tal:block>
45          <script type="text/javascript">
46            function popup_rte(input_id, label_edit) {
47            var args, value;
48            value = document.getElementById(input_id).value;
49            args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
50            str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
51            popup = window.open(popup_editor_form + args, input_id, str_window_features);
52            if (!popup.opener) {
53            popup.opener = window;
54            }
55            return false;
56            }
57          </script>
58        </metal:block>
59      </metal:block>
60      <metal:block fill-slot="header">
61    <span tal:condition="not: is_allowed">
62        <span tal:content="here/illegal_view" />
63    </span>
64    <span tal:condition="is_allowed">
65    <h3 tal:condition="creation" i18n:translate="">
66      Create a document of type
67      <tal:block i18n:name="type_name" i18n:translate=""
68            tal:define="type_name request/type_name;
69                        type_info python:here.portal_types[type_name]"
70            tal:content="type_info/Title">Type Title</tal:block>
71    </h3>
72    <span tal:condition="python: not creation">
73     <a href="" tal:condition="python: form_type in ('waeup',)"
74       tal:attributes="href string:${here/academicsParent}">
75      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
76      Up one level
77    </a>
78    <h3>
79      <tal:block condition="not: metadata"
80        i18n:translate="">Edit <span id="page_title" i18n:name="title"
81        tal:content="info/title">Page Title</span>
82      </tal:block>
83      <tal:block tal:condition="metadata"
84        i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span>
85      </tal:block>
86    </h3>
87    <br />       
88    </span>
89    </span>
90  </metal:block>
91 
92 
93  <metal:block fill-slot="main" tal:condition="is_allowed">
94    <form id=editForm action="waeup_edit" method="post" id="editForm"
95          enctype="multipart/form-data" class="workflow"
96          tal:attributes="action string:${context/absolute_url}/waeup_edit"
97          >
98        <input type="hidden" id="came_from" name="came_from" value=""
99               tal:attributes="value string:${form_action}_form"/>
100      <div class="group">
101        <div class="documentFields">
102          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
103                     replace="structure python:getFormUidHtml(request)"/>
104          <input type="hidden" name="type_name" value="VALUE"
105                 tal:condition="creation"
106                 tal:attributes="value request/type_name" />
107          <div id="rendered_main" tal:content="structure rendered_main">
108            CONTENT
109          </div>
110        </div>
111
112        <metal:block use-macro="python:path('context/%s_edit_buttons/macros/buttons' % form_type)"/>
113        </div>
114      </form>
115      <div id="ajax_psm" style="display:none">
116        ajax feedback
117      </div>
118  </metal:block>
119
120</metal:block>
121</metal:block>
122</metal:defineblock>
Note: See TracBrowser for help on using the repository browser.