Index: WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 820)
+++ WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 821)
@@ -1,3 +1,10 @@
+## Script (Python) "students_indext"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
 ##parameters=bed=None,mode=None,datastructure=None
+##title=
 # $Id$
 """
@@ -10,6 +17,5 @@
     return ''
 hall,block,room,letter = bed.split('_')
-res = context.portal_catalog(portal_type="AccoHall",id=hall)
-if res and len(res) == 1:
-    hall_title = res[0].Title
+hall_title = context.restrictedTraverse("%s/campus/getHallTitle" % 
+                         (context.portal_url.getPortalPath()))(hall)
 return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter)
Index: WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 820)
+++ WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 821)
@@ -2,5 +2,5 @@
                    portal_status_message options/psm;
                    data_storage options/ds;
-                   jamb options/jamb/getContent|nothing;
+                   mode options/mode;
                    edition python:1;"
                    >
@@ -14,10 +14,16 @@
     </metal:block>
       <metal:block fill-slot="main">
-        <h3>Book Your Accommodation! </h3>
+        <h3 tal:condition="python: mode == 'create'">Book Your Accommodation! </h3>
+        <h3 tal:condition="python: mode == 'edit'">Pay Your Accommodation Maintainance Fee! </h3>
         <br />
         <div tal:replace="structure rendered_main" />
           <p>Instructions :</p>
-          <ul>
+          <ul tal:condition="python: mode == 'create'">
             <li>Buy a Hostel Application Scratch Card.</li> 
+            <li>Enter the PIN above.</li>
+            <li>Print the Hostel Allocation Slip.</li>
+          </ul>
+          <ul tal:condition="python: mode == 'edit'">
+            <li>Buy a Hostel Maintainance Scratch Card.</li> 
             <li>Enter the PIN above.</li>
             <li>Print the Hostel Allocation Slip.</li>
Index: WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 820)
+++ WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 821)
@@ -11,6 +11,6 @@
 
 info = context.getStudentInfo()
-validate = REQUEST.has_key("cpsdocument_create_button") or\
-           REQUEST.has_key("cpsdocument_edit_button")
+validate = REQUEST.has_key("cpsdocument_create_button")
+#           REQUEST.has_key("cpsdocument_edit_button")
 
 lt = context.portal_layouts
@@ -22,4 +22,5 @@
 mode = 'create'
 if info.has_key('acco') and info['acco']:
+    validate = REQUEST.has_key("cpsdocument_edit_button")
     if info['acco_review_state'] == "maintenance_fee_payed":
         return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
@@ -27,10 +28,13 @@
         mode = 'edit'
 d = {}
+button = "Bookaccommodation"
 if mode == 'edit':
     info = context.getStudentInfo()
     d['acco_res_date'] = info['acco_doc'].acco_res_date
     d['acco_res_sc_pin'] = info['acco_doc'].acco_res_sc_pin
+    d['student_status'] = info['acco_doc'].student_status
     d['bed'] = info['acco_doc'].bed
     d['session'] = info['acco_doc'].session
+    button = "Pay Maintainance Fee"
 res,psm,ds = lt.renderLayout(layout_id= 'student_accommodation_fe',
                       schema_id= 'student_accommodation',
@@ -40,5 +44,5 @@
                       layout_mode=mode,
                       formaction = "reserve_accommodation",
-                      button = "Book",
+                      button = button
                       )
 if psm == 'invalid':
@@ -46,6 +50,5 @@
                                  psm = "Please correct your input.",
                                  #psm = "%s, %s" % (psm,ds),
-                                 firstlayout = True,
-                                 lastlayout = True,
+                                 mode = mode,
                                  ds = ds,
                                  )
@@ -53,6 +56,5 @@
     return context.accommodation_pin_form(rendered = res,
                                  psm = None,
-                                 firstlayout = True,
-                                 lastlayout = True,
+                                 mode = mode,
                                  ds = ds,
                                  )
@@ -66,6 +68,5 @@
             return context.accommodation_pin_form(rendered = res,
                                  psm = bed,
-                                 firstlayout = True,
-                                 lastlayout = True,
+                                 mode = mode,
                                  ds = ds,
                                  )
@@ -86,9 +87,3 @@
 return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
 
-##return context.accommodation_pin_form(rendered = res,
-##                                 psm = "successfully reserved bed %s" % bed,
-##                                 firstlayout = True,
-##                                 lastlayout = True,
-##                                 ds = ds,
-##                                 )
 
