Ignore:
Timestamp:
02/16/07 15:24:18 (13 years ago)
Author:
jukka
Message:

Fixed #1115 spent 1h more. Forgot to add the actual validator in last commit, piece mass uploader also fixd, but with irritating feature of not being able to go back and try a better name. (That page nees one more button.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/skins/lemill/script_editPieces.py

    r1212 r1379  
    1919edit_page=return_page['edit_page'] 
    2020edit_nr=return_page['edit_nr'] 
    21  
     21problems=[] 
     22psm='' 
    2223 
    2324for n in range(lenpieces): 
     
    3031    values.append(d) 
    3132    pieces.append(REQUEST.get('uid_%s' % n)) 
    32     context.lemill_tool.savePiece(pieces[n], values[n]) 
     33    problem=context.lemill_tool.savePiece(pieces[n], values[n]) 
     34    if problem: 
     35        problems.append(problem) 
     36 
     37if problems: 
     38    psm='&portal_status_message=%s' % ' '.join(problems) 
     39 
    3340 
    3441del REQUEST.SESSION['new_pieces'] 
     
    3744    n_pieces=REQUEST.SESSION['slide_uploader'] 
    3845    del REQUEST.SESSION['slide_uploader'] 
    39     return REQUEST.RESPONSE.redirect(context.absolute_url()+'/slide_uploader?n_pieces=%s' % n_pieces) 
     46    return REQUEST.RESPONSE.redirect(context.absolute_url()+'/slide_uploader?n_pieces=%s%s' % (n_pieces, psm)) 
    4047else:     
    4148    del REQUEST.SESSION['return_page'] 
    42     return REQUEST.RESPONSE.redirect(context.absolute_url()+'/%s?edit=%s#%s' % (edit_page, edit_nr, edit_nr)) 
     49    return REQUEST.RESPONSE.redirect(context.absolute_url()+'/%s?edit=%s#%s%s' % (edit_page, edit_nr, edit_nr, psm)) 
    4350     
Note: See TracChangeset for help on using the changeset viewer.