Index: /WAeUP_SRP/trunk/profiles/default/actionicons.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 651)
+++ /WAeUP_SRP/trunk/profiles/default/actionicons.xml	(revision 652)
@@ -238,5 +238,5 @@
               title="Apply for PUME" priority="2"
               icon_expr="bell.png"/>
- <action-icon category="student" action_id="reserve_acco"
+ <action-icon category="student" action_id="reserve_accommodation"
               title="Book Hostal" priority="3"
               icon_expr="bell.png"/>                          
Index: /WAeUP_SRP/trunk/profiles/default/actions.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 651)
+++ /WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 652)
@@ -138,7 +138,7 @@
    <permission>View</permission>
   </action>
-  <action title="Book Hostal" action_id="reserve_acco"
+  <action title="Book Hostal" action_id="reserve_accommodation"
      category="student" condition_expr="member"
-     url_expr="string:${portal_url}/reserve_acco"
+     url_expr="string:${portal_url}/reserve_accommodation"
      visible="True">
    <permission>View</permission>
Index: /WAeUP_SRP/trunk/profiles/default/layouts.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 651)
+++ /WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 652)
@@ -14,5 +14,5 @@
  <object name="student_study_course" meta_type="CPS Layout"/>
  <object name="student_accommodation" meta_type="CPS Layout"/>
- <object name="student_acco_reserve" meta_type="CPS Layout"/>
+ <object name="student_accommodation_fe" meta_type="CPS Layout"/>
  <object name="student_application" meta_type="CPS Layout"/>
  <object name="student_application_fe" meta_type="CPS Layout"/>
Index: eUP_SRP/trunk/profiles/default/layouts/student_acco_reserve.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_acco_reserve.xml	(revision 651)
+++ 	(revision )
@@ -1,42 +1,0 @@
-<?xml version="1.0"?>
-<object name="student_acco_reserve" meta_type="CPS Layout">
- <property name="layout_create_method"></property>
- <property name="layout_edit_method"></property>
- <property name="layout_view_method"></property>
- <property name="style_prefix">layout_application_</property>
- <property name="flexible_widgets"/>
- <property name="validate_values_expr"></property>
- <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
-  <property name="title">Scratch Card Pin</property>
-  <property name="fields">
-   <element value="acco_res_sc_pin"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Scratch Card Pin</property>
-  <property name="label_edit">Scratch Card Pin</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="prefix">HOS</property>
- </widget>
- <widget name="student_status" meta_type="Select Widget">
-  <property name="title">Status</property>
-  <property name="fields">
-   <element value="student_status"/>
-  </property>
-  <property name="label">Status</property>
-  <property name="label_edit">Status</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="vocabulary">student_status_voc</property>
- </widget>
- <table>
-  <row>
-   <cell name="acco_res_sc_pin"/>
-  </row>
-  <row>
-   <cell name="student_status"/>
-  </row>
- </table>
-</object>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 652)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 652)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="student_acco_reserve" meta_type="CPS Layout">
+ <property name="layout_create_method"></property>
+ <property name="layout_edit_method"></property>
+ <property name="layout_view_method"></property>
+ <property name="style_prefix">layout_application_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Scratch Card Pin</property>
+  <property name="fields">
+   <element value="acco_res_sc_pin"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Scratch Card Pin</property>
+  <property name="label_edit">Scratch Card Pin</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">HOS</property>
+ </widget>
+ <widget name="student_status" meta_type="Select Widget">
+  <property name="title">Status</property>
+  <property name="fields">
+   <element value="student_status"/>
+  </property>
+  <property name="label">Status</property>
+  <property name="label_edit">Status</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">student_status_voc</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="acco_res_sc_pin"/>
+  </row>
+  <row>
+   <cell name="student_status"/>
+  </row>
+ </table>
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/schemas.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 651)
+++ /WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 652)
@@ -17,5 +17,5 @@
  <object name="scratch_card_batch" meta_type="CPS Schema"/>
  <object name="student_accommodation" meta_type="CPS Schema"/>
- <object name="student_acco_reserve" meta_type="CPS Schema"/>
+ <object name="student_accommodation_fe" meta_type="CPS Schema"/>
  <object name="student_application" meta_type="CPS Schema"/>
  <object name="student_clearance" meta_type="CPS Schema"/>
Index: eUP_SRP/trunk/profiles/default/schemas/student_acco_reserve.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/student_acco_reserve.xml	(revision 651)
+++ 	(revision )
@@ -1,5 +1,0 @@
-<?xml version="1.0"?>
-<object name="student_acco_reserve" meta_type="CPS Schema">
- <field name="acco_res_sc_pin" meta_type="CPS String Field"/>
- <field name="student_status" meta_type="CPS String Field"/>
-</object>
Index: /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation_fe.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation_fe.xml	(revision 652)
+++ /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation_fe.xml	(revision 652)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<object name="student_acco_reserve" meta_type="CPS Schema">
+ <field name="acco_res_sc_pin" meta_type="CPS String Field"/>
+ <field name="student_status" meta_type="CPS String Field"/>
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 651)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 652)
@@ -8,5 +8,5 @@
  <property name="product">WAeUP_SRP</property>
  <property name="factory">addStudentAccommodation</property>
- <property name="immediate_view">hostal_reservation_slip</property>
+ <property name="immediate_view">accommodation_slip</property>
  <property name="global_allow">True</property>
  <property name="filter_content_types">True</property>
@@ -26,8 +26,8 @@
  <property name="storage_methods"/>
  <property name="cps_is_portlet">False</property>
- <alias from="(Default)" to="hostal_reservation_slip"/>
- <alias from="view" to="hostal_reservation_slip"/>
+ <alias from="(Default)" to="accommodation_slip"/>
+ <alias from="view" to="accommodation_slip"/>
  <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/hostal_reservation_slip"
+    condition_expr="" url_expr="string:${object_url}/accommodation_slip"
     visible="True">
   <permission value="View"/>
Index: eUP_SRP/trunk/skins/waeup_accommodation/hostal_reservation_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/hostal_reservation_slip.pt	(revision 651)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-  <metal:block fill-slot="head_slot">
-  </metal:block>
-
-  <metal:block fill-slot="css_slot">
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
-  </metal:block>
-  
-  <metal:block fill-slot="header">
-  </metal:block>
-
-  <metal:block fill-slot="main"
-      tal:define="info context/getStudentInfo">
-    <h3>Hostal Reservation Acknowledge Slip</h3>
-    <br />
-    
-    <table width="" cellpadding="2" cellspacing="0" summary="Form layout"
-           tal:define="acco_doc nocall: info/acco_doc"
-           >
-      <tr><td>Reservation Date: </td><td><span tal:content="python:acco_doc.acco_res_date.aCommonZ()" /></td></tr>
-      <tr><td>Pin used: </td><td><span tal:content="acco_doc/acco_res_sc_pin" /></td></tr>
-      <tr><td>Bed </td><td><span tal:content="python:context.formatBed(acco_doc.bed)" /></td></tr>
-    </table>
-  </metal:block>
-  
-  <metal:block fill-slot="sub">
-  </metal:block>
-</html>
Index: eUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py	(revision 651)
+++ 	(revision )
@@ -1,72 +1,0 @@
-##parameters=REQUEST
-# $Id: apply_admission.py 543 2006-09-24 07:44:32Z henrik $
-"""
-process the Application Form
-return html renderer + psm
-"""
-import DateTime
-current = DateTime.DateTime()
-pr = context.portal_registration
-
-info = context.getStudentInfo()
-validate = REQUEST.has_key("cpsdocument_create_button")
-
-lt = context.portal_layouts
-pr = context.portal_registration
-session = current.year()
-acco_id = 'Acco_%s' % session
-info = context.getStudentInfo()
-student = info['student']
-if info['acco']:
-    return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url())
-res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve',
-                      schema_id= 'student_acco_reserve',
-                      context=context,
-                      mapping=validate and REQUEST,
-                      ob={},
-                      layout_mode='create',
-                      formaction = "reserve_acco",
-                      button = "book Bed",
-                      )
-if psm == 'invalid':
-    return context.reserve_acco_form(rendered = res,
-                                 #psm = "Please correct your input.",
-                                 psm = "%s, %s" % (psm,ds),
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == '':
-    return context.reserve_acco_form(rendered = res,
-                                 psm = None,
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-elif psm == 'valid':
-    s_id = ds.get('s_id')
-    pin = str(ds.get('acco_res_ac_pin'))
-    
-    pa = context.portal_accommodation
-    code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
-    if code < 0:
-        return context.reserve_acco_form(rendered = res,
-                                 psm = bed,
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
-student.invokeFactory('StudentAccommodation',acco_id)
-acco = getattr(student,acco_id)
-ds.set('acco_res_date', current)
-ds.set('bed', bed)
-ds.set('session', session)
-acco.getContent().edit(mapping=ds)
-return context.REQUEST.RESPONSE.redirect("%s/hostal_reservation_slip" % student.absolute_url())
-##return context.reserve_acco_form(rendered = res,
-##                                 psm = "successfully reserved bed %s" % bed,
-##                                 firstlayout = True,
-##                                 lastlayout = True,
-##                                 ds = ds,
-##                                 )
-
Index: eUP_SRP/trunk/skins/waeup_accommodation/reserve_acco_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco_form.pt	(revision 651)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<tal:block define="rendered_main options/rendered;
-                   portal_status_message options/psm;
-                   data_storage options/ds;
-                   jamb options/jamb/getContent|nothing;
-                   edition python:1;"
-                   >
-<metal:block define-macro="edit_form">
-  <metal:block use-macro="here/content_lib_master/macros/master">
-  <metal:block fill-slot="header"
-    tal:define="creation creation|nothing;
-                edition edition|nothing;
-                metadata metadata|nothing"
-                >
-    </metal:block>
-      <metal:block fill-slot="main">
-        <h3>Book Your Accommodation! </h3>
-        <br />
-        <div tal:replace="structure rendered_main" />
-          <p>Instructions :</p>
-          <ul>
-            <li>Buy a Hostel Application Scratch Card.</li> 
-            <li>Enter the PIN above.</li>
-            <li>Print the Hostel Allocation Slip.</li>
-          </ul>
-      </metal:block>
-      <metal:block fill-slot="sub">
-      </metal:block>
-    </metal:block>
-  </metal:block>
-</tal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 652)
+++ /WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 652)
@@ -0,0 +1,30 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   jamb options/jamb/getContent|nothing;
+                   edition python:1;"
+                   >
+<metal:block define-macro="edit_form">
+  <metal:block use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="header"
+    tal:define="creation creation|nothing;
+                edition edition|nothing;
+                metadata metadata|nothing"
+                >
+    </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Book Your Accommodation! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy a Hostel Application Scratch Card.</li> 
+            <li>Enter the PIN above.</li>
+            <li>Print the Hostel Allocation Slip.</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 652)
+++ /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 652)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+      tal:define="info context/getStudentInfo">
+    <h3>Hostal Reservation Acknowledge Slip</h3>
+    <br />
+    
+    <table width="" cellpadding="2" cellspacing="0" summary="Form layout"
+           tal:define="acco_doc nocall: info/acco_doc"
+           >
+      <tr><td>Reservation Date: </td><td><span tal:content="python:acco_doc.acco_res_date.aCommonZ()" /></td></tr>
+      <tr><td>Pin used: </td><td><span tal:content="acco_doc/acco_res_sc_pin" /></td></tr>
+      <tr><td>Bed </td><td><span tal:content="python:context.formatBed(acco_doc.bed)" /></td></tr>
+    </table>
+  </metal:block>
+  
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 652)
+++ /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 652)
@@ -0,0 +1,72 @@
+##parameters=REQUEST
+# $Id: apply_admission.py 543 2006-09-24 07:44:32Z henrik $
+"""
+process the Application Form
+return html renderer + psm
+"""
+import DateTime
+current = DateTime.DateTime()
+pr = context.portal_registration
+
+info = context.getStudentInfo()
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+session = current.year()
+acco_id = 'Acco_%s' % session
+info = context.getStudentInfo()
+student = info['student']
+if info['acco']:
+    return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url())
+res,psm,ds = lt.renderLayout(layout_id= 'student_accommodation_fe',
+                      schema_id= 'student_accommodation_fe',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "reserve_accommodation",
+                      button = "book Bed",
+                      )
+if psm == 'invalid':
+    return context.accommodation_pin_form(rendered = res,
+                                 #psm = "Please correct your input.",
+                                 psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.accommodation_pin_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    pin = str(ds.get('acco_res_ac_pin'))
+    
+    pa = context.portal_accommodation
+    code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
+    if code < 0:
+        return context.accommodation_pin_form(rendered = res,
+                                 psm = bed,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+student.invokeFactory('StudentAccommodation',acco_id)
+acco = getattr(student,acco_id)
+ds.set('acco_res_date', current)
+ds.set('bed', bed)
+ds.set('session', session)
+acco.getContent().edit(mapping=ds)
+return context.REQUEST.RESPONSE.redirect("%s/accommodation_slip" % student.absolute_url())
+##return context.accommodation_pin_form(rendered = res,
+##                                 psm = "successfully reserved bed %s" % bed,
+##                                 firstlayout = True,
+##                                 lastlayout = True,
+##                                 ds = ds,
+##                                 )
+
