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 | > |
---|
13 | <metal:block define-macro="edit_form"> |
---|
14 | <metal:block use-macro=template> |
---|
15 | <metal:block fill-slot="style_slot"> |
---|
16 | <link rel="Stylesheet" type="text/css" href="" |
---|
17 | tal:attributes="href string:${base_url}document.css" /> |
---|
18 | <metal:block define-macro="widgets_javascript"> |
---|
19 | <span tal:condition="python:1"> |
---|
20 | <script type="text/javascript" src="prototype.js" |
---|
21 | tal:attributes="src string:${base_url}prototype.js"></script> |
---|
22 | <script type="text/javascript" src="effects.js" |
---|
23 | tal:attributes="src string:${base_url}effects.js"></script> |
---|
24 | <script type="text/javascript" src="controls.js" |
---|
25 | tal:attributes="src string:${base_url}controls.js"></script> |
---|
26 | <script type="text/javascript" src="cpsdocument.js" |
---|
27 | tal:attributes="src string:${base_url}cpsdocument.js"></script> |
---|
28 | <script type="text/javascript" src="cpsschemas.js" |
---|
29 | tal:attributes="src string:${base_url}cpsschemas.js"></script> |
---|
30 | </span> |
---|
31 | <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')"> |
---|
32 | <script type="text/javascript"> |
---|
33 | var popup_editor_form = 'popup_fckeditor_form'; |
---|
34 | var width = 640; |
---|
35 | var height = 520; |
---|
36 | </script> |
---|
37 | </tal:block> |
---|
38 | <script type="text/javascript"> |
---|
39 | function popup_rte(input_id, label_edit) { |
---|
40 | var args, value; |
---|
41 | value = document.getElementById(input_id).value; |
---|
42 | args = '?input_id='+input_id+'&label_edit='+escape(label_edit); |
---|
43 | str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height; |
---|
44 | popup = window.open(popup_editor_form + args, input_id, str_window_features); |
---|
45 | if (!popup.opener) { |
---|
46 | popup.opener = window; |
---|
47 | } |
---|
48 | return false; |
---|
49 | } |
---|
50 | </script> |
---|
51 | </metal:block> |
---|
52 | </metal:block> |
---|
53 | <metal:block fill-slot="header"> |
---|
54 | <span tal:condition="not: is_allowed"> |
---|
55 | <span tal:content="here/illegal_view" /> |
---|
56 | </span> |
---|
57 | <span tal:condition="is_allowed"> |
---|
58 | <h3 tal:condition="creation" i18n:translate=""> |
---|
59 | Create a document of type |
---|
60 | <tal:block i18n:name="type_name" i18n:translate="" |
---|
61 | tal:define="type_name request/type_name; |
---|
62 | type_info python:here.portal_types[type_name]" |
---|
63 | tal:content="type_info/Title">Type Title</tal:block> |
---|
64 | </h3> |
---|
65 | <span tal:condition="python: not creation"> |
---|
66 | <a href="" tal:condition="python: form_type in ('waeup',)" |
---|
67 | tal:attributes="href string:${here/academicsParent}"> |
---|
68 | <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/> |
---|
69 | Up one level |
---|
70 | </a> |
---|
71 | <h3> |
---|
72 | <tal:block condition="not: metadata" |
---|
73 | i18n:translate="">Edit <span id="page_title" i18n:name="title" |
---|
74 | tal:content="here/title_or_id">Page Title</span> |
---|
75 | </tal:block> |
---|
76 | <tal:block tal:condition="metadata" |
---|
77 | i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span> |
---|
78 | </tal:block> |
---|
79 | </h3> |
---|
80 | <br /> |
---|
81 | </span> |
---|
82 | </span> |
---|
83 | </metal:block> |
---|
84 | |
---|
85 | |
---|
86 | <metal:block fill-slot="main" tal:condition="is_allowed"> |
---|
87 | <form id=editForm action="waeup_edit" method="post" id="editForm" |
---|
88 | enctype="multipart/form-data" class="workflow" |
---|
89 | tal:attributes="action string:${context/absolute_url}/waeup_edit" |
---|
90 | > |
---|
91 | <input type="hidden" id="came_from" name="came_from" value="" |
---|
92 | tal:attributes="value string:${form_action}_form"/> |
---|
93 | <div class="group"> |
---|
94 | <div class="documentFields"> |
---|
95 | <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml" |
---|
96 | replace="structure python:getFormUidHtml(request)"/> |
---|
97 | <input type="hidden" name="type_name" value="VALUE" |
---|
98 | tal:condition="creation" |
---|
99 | tal:attributes="value request/type_name" /> |
---|
100 | <div id="rendered_main" tal:content="structure rendered_main"> |
---|
101 | CONTENT |
---|
102 | </div> |
---|
103 | </div> |
---|
104 | |
---|
105 | <tal:block condition="python: 0 and not creation"> |
---|
106 | <div class="tooltipArea" style="visibility: hidden;" |
---|
107 | id="transition_comments_help" |
---|
108 | onclick="showElement(false, 'transition_comments_help')" |
---|
109 | i18n:translate="help_transition_comments_modification"> |
---|
110 | In this field you can give the reason for the modification |
---|
111 | on this document. Your comments may be used to notify other users. |
---|
112 | </div> |
---|
113 | <dl> |
---|
114 | <dt><label for="comments" |
---|
115 | i18n:translate="transition_comments_modification" |
---|
116 | >Reason of the modification</label> |
---|
117 | <button type="button" class="tooltipControl" |
---|
118 | onclick="toggleElementVisibility('transition_comments_help')"> ? </button> |
---|
119 | </dt> |
---|
120 | <dd> |
---|
121 | <textarea name="comments" id="comments" cols="60" rows="3" |
---|
122 | tal:content="nothing"> |
---|
123 | </textarea> |
---|
124 | </dd> |
---|
125 | </dl> |
---|
126 | </tal:block> |
---|
127 | <metal:block use-macro="python:path('context/%s_edit_buttons/macros/buttons' % form_type)"/> |
---|
128 | </div> |
---|
129 | </form> |
---|
130 | <div id="ajax_psm" style="display:none"> |
---|
131 | ajax feedback |
---|
132 | </div> |
---|
133 | </metal:block> |
---|
134 | |
---|
135 | </metal:block> |
---|
136 | </metal:block> |
---|
137 | </metal:defineblock> |
---|