Index: WAeUP_SRP/trunk/profiles/default/layouts.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 628)
+++ WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 629)
@@ -13,4 +13,6 @@
  <object name="scratch_card_batch" meta_type="CPS Layout"/>
  <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_application" meta_type="CPS Layout"/>
  <object name="student_application_fe" meta_type="CPS Layout"/>
Index: WAeUP_SRP/trunk/profiles/default/layouts/student_acco_reserve.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_acco_reserve.xml	(revision 629)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_acco_reserve.xml	(revision 629)
@@ -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_default_</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.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 629)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 629)
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<object name="student_accommodation" 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_waeup_</property>
+ <property name="flexible_widgets"/>
+ <property name="validate_values_expr"></property>
+ <widget name="acco_maint_date" meta_type="DateTime Widget">
+  <property name="title">Accommodation Maintainance Date</property>
+  <property name="fields">
+   <element value="acco_maint_date"/>
+  </property>
+  <property name="label">Accommodation Maintainance Date</property>
+  <property name="label_edit">Accommodation Maintainance Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_sc_pin" meta_type="String Widget">
+  <property name="title">Accommodation Maintainance SC-Pin</property>
+  <property name="fields">
+   <element value="acco_maint_sc_pin"/>
+  </property>
+  <property name="label">Accommodation Maintainance SC-Pin</property>
+  <property name="label_edit">Accommodation Maintainance SC-Pin</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_maint_sc_serial" meta_type="String Widget">
+  <property name="title">Accommodation Maintainance SC-Serial</property>
+  <property name="fields">
+   <element value="acco_maint_sc_serial"/>
+  </property>
+  <property name="label">Accommodation Maintainance SC-Serial</property>
+  <property name="label_edit">Accommodation Maintainance SC-Serial</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">10</property>
+ </widget>
+ <widget name="acco_res_date" meta_type="DateTime Widget">
+  <property name="title">Accommodation Reservation Date</property>
+  <property name="fields">
+   <element value="acco_res-date"/>
+  </property>
+  <property name="label">Accommodation Reservation Date</property>
+  <property name="label_edit">Accommodation Reservation Date</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_res_sc_pin" meta_type="String Widget">
+  <property name="title">Accommodation Reservation SC-pin</property>
+  <property name="fields">
+   <element value="acco_res_sc_pin"/>
+  </property>
+  <property name="label">Accommodation Reservation SC-pin</property>
+  <property name="label_edit">Accommodation Reservation SC-pin</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="acco_res_sc_serial" meta_type="String Widget">
+  <property name="title">Accommodation Reservation SC-Serial</property>
+  <property name="fields">
+   <element value="acco_res_sc_serial"/>
+  </property>
+  <property name="label">Accommodation Reservation SC-Serial</property>
+  <property name="label_edit">Accommodation Reservation SC-Serial</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="bed" meta_type="String Widget">
+  <property name="title">Bed Id</property>
+  <property name="fields">
+   <element value="bed"/>
+  </property>
+  <property name="label">Bed Id</property>
+  <property name="label_edit">Bed Id</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="session" meta_type="String Widget">
+  <property name="title">Session</property>
+  <property name="fields">
+   <element value="session"/>
+  </property>
+  <property name="label">Session</property>
+  <property name="label_edit">Session</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <table>
+  <row>
+   <cell name="session"/>
+  </row>
+  <row>
+   <cell name="bed"/>
+  </row>
+  <row>
+   <cell name="acco_res_date"/>
+  </row>
+  <row>
+   <cell name="acco_res_sc_serial"/>
+  </row>
+  <row>
+   <cell name="acco_res_sc_pin"/>
+  </row>
+  <row>
+   <cell name="acco_maint_date"/>
+  </row>
+  <row>
+   <cell name="acco_maint_sc_serial"/>
+  </row>
+  <row>
+   <cell name="acco_maint_sc_pin"/>
+  </row>
+ </table>
+</object>
Index: WAeUP_SRP/trunk/profiles/default/schemas.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 628)
+++ WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 629)
@@ -17,4 +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_application" meta_type="CPS Schema"/>
  <object name="student_clearance" meta_type="CPS Schema"/>
Index: WAeUP_SRP/trunk/profiles/default/schemas/student_acco_reserve.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas/student_acco_reserve.xml	(revision 629)
+++ WAeUP_SRP/trunk/profiles/default/schemas/student_acco_reserve.xml	(revision 629)
@@ -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/schemas/student_accommodation.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation.xml	(revision 628)
+++ WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation.xml	(revision 629)
@@ -1,18 +1,11 @@
 <?xml version="1.0"?>
 <object name="student_accommodation" meta_type="CPS Schema">
- <field name="accommodation" meta_type="CPS String Field">
-  <property name="is_searchabletext">True</property>
- </field>
- <field name="sc_id" meta_type="CPS String Field">
-  <property name="is_searchabletext">True</property>
-  <property name="acl_write_roles">SectionReader</property>
- </field>
- <field name="sc_pin" meta_type="CPS String Field">
-  <property name="is_searchabletext">True</property>
-  <property name="acl_write_roles">SectionReader</property>
- </field>
- <field name="sc_value" meta_type="CPS Float Field">
-  <property name="default_expr">python:500.</property>
-  <property name="is_searchabletext">True</property>
- </field>
+ <field name="acco_maint_date" meta_type="CPS DateTime Field"/>
+ <field name="acco_maint_sc_pin" meta_type="CPS String Field"/>
+ <field name="acco_maint_sc_serial" meta_type="CPS String Field"/>
+ <field name="acco_res_date" meta_type="CPS DateTime Field"/>
+ <field name="acco_res_sc_pin" meta_type="CPS String Field"/>
+ <field name="acco_res_sc_serial" meta_type="CPS String Field"/>
+ <field name="bed" meta_type="CPS String Field"/>
+ <field name="session" meta_type="CPS String Field"/>
 </object>
Index: WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 629)
+++ WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 629)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<object name="StudentAccommodation" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Student Application Data</property>
+ <property name="description"></property>
+ <property name="content_icon"></property>
+ <property name="content_meta_type">StudentAccommodation</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addStudentAccommodation</property>
+ <property name="immediate_view">student_index</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">False</property>
+ <property name="cps_proxy_type">document</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="student_accommodation"/>
+ </property>
+ <property name="layouts">
+  <element value="student_accommodation"/>
+ </property>
+ <property name="layout_clusters"/>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="(Default)" to="student_index"/>
+ <alias from="view" to="student_index"/>
+ <action title="Standard View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/student_index"
+    visible="True">
+  <permission value="View"/>
+ </action>
+</object>
Index: WAeUP_SRP/trunk/profiles/default/vocabularies.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/vocabularies.xml	(revision 628)
+++ WAeUP_SRP/trunk/profiles/default/vocabularies.xml	(revision 629)
@@ -17,4 +17,5 @@
  <object name="pin_prefixes" meta_type="CPS Vocabulary"/>
  <object name="student_search_mode" meta_type="CPS Vocabulary"/>
+ <object name="student_status_voc" meta_type="CPS Vocabulary"/>
  <object name="searchable_student_states" meta_type="CPS Vocabulary"/>
  <object name="academics_search_mode" meta_type="CPS Vocabulary"/>
Index: WAeUP_SRP/trunk/profiles/default/vocabularies/student_status_voc.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/vocabularies/student_status_voc.xml	(revision 629)
+++ WAeUP_SRP/trunk/profiles/default/vocabularies/student_status_voc.xml	(revision 629)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<object name="student_status_voc" meta_type="CPS Vocabulary">
+ <property name="title"></property>
+ <property name="title_msgid"></property>
+ <property name="description"></property>
+ <property name="acl_write_roles">Manager</property>
+ <item key="fr" msgid="">Freshmen</item>
+ <item key="re" msgid="">Returning</item>
+ <item key="fi" msgid="">Final Year</item>
+</object>
Index: WAeUP_SRP/trunk/skins/waeup_accommodation/acco_reserve_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_accommodation/acco_reserve_form.pt	(revision 629)
+++ WAeUP_SRP/trunk/skins/waeup_accommodation/acco_reserve_form.pt	(revision 629)
@@ -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>Reserve your Hostel! </h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+          <p>Instructions :</p>
+          <ul>
+            <li>Buy an Hostelreservation Scratch Card.</li> 
+            <li>Enter the pin above.</li>
+            <li>Print the Hostelreservation Acknowledgement Slip.</li>
+          </ul>
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py	(revision 629)
+++ WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py	(revision 629)
@@ -0,0 +1,54 @@
+##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
+
+
+type_name = 'StudentApplication'
+ti = context.portal_types[type_name]
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+pr = context.portal_registration
+
+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 = "acco_reserve",
+                      button = "book Bed",
+                      )
+if psm == 'invalid':
+    return context.acco_reserve_form(rendered = res,
+                                 psm = "Please correct your input.",
+                                 #psm = "%s, %s" % (psm,ds),
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.acco_reserve_form(rendered = res,
+                                 psm = None,
+                                 firstlayout = True,
+                                 lastlayout = True,
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    s_id = ds.get('s_id')
+    pin = str(ds.get('app_ac_pin'))
+    return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"
+          % (context.absolute_url(),s_id,pin.split('-')[2],pin))
+
+
+return
+
+
