Show
Ignore:
Timestamp:
09/28/06 19:13:55 (2 years ago)
Author:
atchertchian
Message:

cpsdocument_edit changes: get rid of CPS3_only features, and change return parameters in case redirection is not to be done + upd docstring

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • CPS4/products/CPSDocument/trunk/skins/cps_document/cpsdocument_edit.py

    r48434 r49254  
    33""" 
    44Called when a document form is posted. 
     5 
     6If 'doc' parameter is not None, use it instead of context document. 
    57 
    68Validates data, then: 
     
    911 
    1012 - if there's an error, puts data in session and redirects to edit form. 
     13 
     14If 'redirect' parameter is False, no redirection is done: validation result, 
     15datastructure are returned. 
    1116 
    1217A form uid is propagated during the redirect to uniquely identify the 
     
    1823 
    1924# Until ajax posts directly to its own script... 
    20 if 'ajax_edit' in REQUEST.form: 
    21     return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster) 
    22  
    23 # Check flexible controls 
    24 context.editLayouts(REQUEST=REQUEST) 
     25# XXX AT: disabled til ajax works for capsule docs 
     26#if 'ajax_edit' in REQUEST.form: 
     27#    return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster) 
    2528 
    2629# Validate the document and write it if it's valid 
     
    5255    REQUEST.RESPONSE.redirect(url) 
    5356else: 
    54     return psm 
     57    return is_valid, ds