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