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

Last change on this file since 2013 was 2013, checked in by Henrik Bettermann, 17 years ago

see ticket #102

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