source: WAeUP_SRP/trunk/skins/waeup_custom/cpsdocument_edit_form.pt @ 811

Last change on this file since 811 was 809, checked in by joachim, 18 years ago

fixed cpsdocument_edit_form

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