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

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

disable ajax because it does not work on the live system

also, it does not write any logging message

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