Ignore:
Timestamp:
13 Nov 2006, 20:06:17 (18 years ago)
Author:
joachim
Message:

implemented edit_form handling described in ticket #61

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_custom/cpsdocument_edit_form.pt

    r850 r859  
    66           no_form=True);
    77    form_action string:cpsdocument_edit;
     8    form_type string:waeup;
    89    creation python:False;
    910    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="not:creation">
    28      <a href=""
    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="ACTION" method="post" id="editForm"
    50           enctype="multipart/form-data" class="workflow"
    51           tal:attributes="action form_action">
    52       <div class="group">
    53         <div class="documentFields">
    54           <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
    55                      replace="structure python:getFormUidHtml(request)"/>
    56           <input type="hidden" name="type_name" value="VALUE"
    57                  tal:condition="creation"
    58                  tal:attributes="value request/type_name" />
    59           <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
    60           <div id="rendered_main" tal:content="structure rendered_main">
    61             CONTENT
    62           </div>
    63         </div>
    64 
    65         <tal:block condition="not:creation">
    66           <div class="tooltipArea" style="visibility: hidden;"
    67                id="transition_comments_help"
    68                onclick="showElement(false, 'transition_comments_help')"
    69                i18n:translate="help_transition_comments_modification">
    70             In this field you can give the reason for the modification
    71             on this document. Your comments may be used to notify other users.
    72           </div>
    73           <dl>
    74             <dt><label for="comments"
    75                        i18n:translate="transition_comments_modification"
    76                        >Reason of the modification</label>
    77               <button type="button" class="tooltipControl"
    78                       onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
    79             </dt>
    80             <dd>
    81               <textarea name="comments" id="comments" cols="60" rows="3"
    82                         tal:content="nothing">
    83               </textarea>
    84             </dd>
    85           </dl>
    86         </tal:block>
    87 
    88         <metal:block use-macro="here/cpsdocument_edit_buttons/macros/buttons"/>
    89       </div>
    90     </form>
    91   </metal:block>
    92 
    93 </metal:block>
    94 </metal:block>
     11    metadata metadata|nothing;"
     12    >
     13  <metal:block use-macro="context/waeup_edit_form/macros/edit_form" />
    9514</tal:block>
Note: See TracChangeset for help on using the changeset viewer.