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

Last change on this file since 864 was 859, checked in by joachim, 18 years ago

implemented edit_form handling described in ticket #61

File size: 3.8 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 
15  <metal:block fill-slot="header">
16    <span tal:condition="not: context/isManager">
17        <metal:block use-macro="here/error_not_found/macros/not_found" />
18    </span>
19    <span tal:condition="context/isManager">
20    <h3 tal:condition="creation" i18n:translate="">
21      Create a document of type
22      <tal:block i18n:name="type_name" i18n:translate=""
23            tal:define="type_name request/type_name;
24                        type_info python:here.portal_types[type_name]"
25            tal:content="type_info/Title">Type Title</tal:block>
26    </h3>
27    <span tal:condition="python: not creation">
28     <a href="" tal:condition="python: form_type in ('waeup',)"
29       tal:attributes="href string:${here/academicsParent}">
30      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
31      Up one level
32    </a>
33    <h3>
34      <tal:block condition="python: edition and not metadata"
35        i18n:translate="">Edit <span id="page_title" i18n:name="title"
36        tal:content="here/title_or_id">Page Title</span>
37      </tal:block>
38      <tal:block tal:condition="metadata"
39        i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span>
40      </tal:block>
41    </h3>
42    <br />       
43    </span>
44    </span>
45  </metal:block>
46 
47 
48  <metal:block fill-slot="main" tal:condition="context/isManager">
49    <form action="waeup_edit" method="post" id="editForm"
50          enctype="multipart/form-data" class="workflow"
51          >
52        <input type="hidden" id="came_from" name="came_from" value=""
53               tal:attributes="value string:${form_action}_form"/>
54      <div class="group">
55        <div class="documentFields">
56          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
57                     replace="structure python:getFormUidHtml(request)"/>
58          <input type="hidden" name="type_name" value="VALUE"
59                 tal:condition="creation"
60                 tal:attributes="value request/type_name" />
61          <div id="rendered_main" tal:content="structure rendered_main">
62            CONTENT
63          </div>
64        </div>
65
66        <tal:block condition="python: 0 and not creation">
67          <div class="tooltipArea" style="visibility: hidden;"
68               id="transition_comments_help"
69               onclick="showElement(false, 'transition_comments_help')"
70               i18n:translate="help_transition_comments_modification">
71            In this field you can give the reason for the modification
72            on this document. Your comments may be used to notify other users.
73          </div>
74          <dl>
75            <dt><label for="comments"
76                       i18n:translate="transition_comments_modification"
77                       >Reason of the modification</label>
78              <button type="button" class="tooltipControl"
79                      onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
80            </dt>
81            <dd>
82              <textarea name="comments" id="comments" cols="60" rows="3"
83                        tal:content="nothing">
84              </textarea>
85            </dd>
86          </dl>
87        </tal:block>
88
89        <metal:block use-macro="python:path('context/%s_edit_buttons/macros/buttons' % form_type)"/>
90      </div>
91    </form>
92  </metal:block>
93
94</metal:block>
95</metal:block>
96</tal:block>
Note: See TracBrowser for help on using the repository browser.