Ignore:
Timestamp:
19 Feb 2007, 22:14:47 (18 years ago)
Author:
Henrik Bettermann
Message:

make book_reserved_bed work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py

    r1444 r1446  
    7272            break
    7373        if not bed_brain.bed_type.endswith("reserved"):
    74             psm = "Not a reserved bed %s" % bid
     74            psm = "Not a reserved bed: %s" % bid
    7575            break
    7676        if bed_brain.student and not change:
     
    8585            break
    8686        if not bed_brain.bed_type.endswith("reserved"):
    87             psm = "Not a reserved bed %s" % bid
     87            psm = "Not a reserved bed: %s" % bid
    8888            break
    8989        if not bed_brain.student:
     
    9191            break
    9292    break
    93        
     93
    9494if psm != '':
    9595    return context.book_reserved_bed_form(rendered = rendered,
     
    103103    for bed in already:
    104104        acco_cat.modifyRecord(bed=bed.bed,student='')
    105        
     105
    106106students = context.portal_url.getPortalObject().campus.students
    107107student_obj = getattr(students,sid)
     
    118118    if acco_id in student_obj.objectIds():
    119119        acco_doc = getattr(student_obj, acco_id).getContent()
    120         acco_doc.edit(mapping={'bed': bid + "(removed)"})
    121     logger.info('"%s","released reserved bed %s for","%s"' % (member,bid,sid))
    122     psm = "Bed %s released for %s" % (sid,student.name)
    123    
     120        acco_doc.edit(mapping={'bed':bid + " (reservation cancelled by %s!)" % member})
     121    logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     122    psm = "%s removed from %s" % (student.name,bid)
     123
    124124mode = 'view'
    125125return context.book_reserved_bed_form(rendered = "",
Note: See TracChangeset for help on using the changeset viewer.