- Timestamp:
- 9 Nov 2006, 21:37:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
r805 r821 11 11 12 12 info = context.getStudentInfo() 13 validate = REQUEST.has_key("cpsdocument_create_button") or\14 REQUEST.has_key("cpsdocument_edit_button")13 validate = REQUEST.has_key("cpsdocument_create_button") 14 # REQUEST.has_key("cpsdocument_edit_button") 15 15 16 16 lt = context.portal_layouts … … 22 22 mode = 'create' 23 23 if info.has_key('acco') and info['acco']: 24 validate = REQUEST.has_key("cpsdocument_edit_button") 24 25 if info['acco_review_state'] == "maintenance_fee_payed": 25 26 return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url()) … … 27 28 mode = 'edit' 28 29 d = {} 30 button = "Bookaccommodation" 29 31 if mode == 'edit': 30 32 info = context.getStudentInfo() 31 33 d['acco_res_date'] = info['acco_doc'].acco_res_date 32 34 d['acco_res_sc_pin'] = info['acco_doc'].acco_res_sc_pin 35 d['student_status'] = info['acco_doc'].student_status 33 36 d['bed'] = info['acco_doc'].bed 34 37 d['session'] = info['acco_doc'].session 38 button = "Pay Maintainance Fee" 35 39 res,psm,ds = lt.renderLayout(layout_id= 'student_accommodation_fe', 36 40 schema_id= 'student_accommodation', … … 40 44 layout_mode=mode, 41 45 formaction = "reserve_accommodation", 42 button = "Book",46 button = button 43 47 ) 44 48 if psm == 'invalid': … … 46 50 psm = "Please correct your input.", 47 51 #psm = "%s, %s" % (psm,ds), 48 firstlayout = True, 49 lastlayout = True, 52 mode = mode, 50 53 ds = ds, 51 54 ) … … 53 56 return context.accommodation_pin_form(rendered = res, 54 57 psm = None, 55 firstlayout = True, 56 lastlayout = True, 58 mode = mode, 57 59 ds = ds, 58 60 ) … … 66 68 return context.accommodation_pin_form(rendered = res, 67 69 psm = bed, 68 firstlayout = True, 69 lastlayout = True, 70 mode = mode, 70 71 ds = ds, 71 72 ) … … 86 87 return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url()) 87 88 88 ##return context.accommodation_pin_form(rendered = res,89 ## psm = "successfully reserved bed %s" % bed,90 ## firstlayout = True,91 ## lastlayout = True,92 ## ds = ds,93 ## )94 89
Note: See TracChangeset for help on using the changeset viewer.