Index: WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 739)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml	(revision 742)
@@ -4,33 +4,7 @@
  <property name="layout_edit_method"></property>
  <property name="layout_view_method"></property>
- <property name="style_prefix">layout_accommodation_</property>
+ <property name="style_prefix">layout_student_acco_</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">Hostel Application PIN</property>
-  <property name="fields">
-   <element value="acco_res_sc_pin"/>
-  </property>
-  <property name="is_required">True</property>
-  <property name="label">Hostel Application PIN</property>
-  <property name="label_edit">Hostel Application 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>
-
  <widget name="acco_maint_date" meta_type="DateTime Widget">
   <property name="title">Maintainance Payment Date</property>
@@ -41,8 +15,10 @@
   <property name="label_edit">Maintainance Payment Date</property>
   <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+   <element value="edit"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
   <property name="view_format">iso8601_medium_easy</property>
-<property name="hidden_empty"></property>
  </widget>
  <widget name="acco_maint_sc_pin" meta_type="Scratchcard Pin Widget">
@@ -54,10 +30,10 @@
   <property name="label_edit">Maintainance Payment PIN</property>
   <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
-<property name="hidden_empty"></property>
+  <property name="prefix">@getMaintainancePrefix</property>
  </widget>
-
-
  <widget name="acco_res_date" meta_type="DateTime Widget">
   <property name="title">Hostel Application Date</property>
@@ -67,22 +43,42 @@
   <property name="label">Hostel Application Date</property>
   <property name="label_edit">Hostel Application Date</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
   <property name="view_format">iso8601_medium_easy</property>
  </widget>
-
+ <widget name="acco_res_sc_pin" meta_type="Scratchcard Pin Widget">
+  <property name="title">Hostel Application PIN</property>
+  <property name="fields">
+   <element value="acco_res_sc_pin"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Hostel Application PIN</property>
+  <property name="label_edit">Hostel Application PIN</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="prefix">HOS</property>
+ </widget>
  <widget name="bed" meta_type="Method Widget">
- <property name="title">Bed</property>
- <property name="fields">
-  <element value="bed"/>
- </property>
- <property name="label">Bed</property>
- <property name="label_edit">Bed</property>
- <property name="readonly_layout_modes"/>
- <property name="hidden_layout_modes"/>
- <property name="hidden_readonly_layout_modes"/>
- <property name="render_method">formatBed</property>
-</widget>
+  <property name="title">Bed</property>
+  <property name="fields">
+   <element value="bed"/>
+  </property>
+  <property name="label">Bed</property>
+  <property name="label_edit">Bed</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="render_method">formatBed</property>
+ </widget>
  <widget name="session" meta_type="String Widget">
   <property name="title">Session</property>
@@ -92,10 +88,25 @@
   <property name="label">Session</property>
   <property name="label_edit">Session</property>
-  <property name="readonly_layout_modes">edit</property>
+  <property name="readonly_layout_modes">
+   <element value="edit"/>
+   <element value="create"/>
+  </property>
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
  </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">
+   <element value="edit"/>
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">student_status_voc</property>
+ </widget>
  <table>
   <row>
Index: WAeUP_SRP/trunk/profiles/default/workflows.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 739)
+++ WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 742)
@@ -15,4 +15,5 @@
  <object name="waeup_section_wf" meta_type="CPS Workflow"/>
  <object name="waeup_student_wf" meta_type="CPS Workflow"/>
+ <object name="waeup_student_accommodation_wf" meta_type="CPS Workflow"/>
  <object name="waeup_student_subobject_wf" meta_type="CPS Workflow"/>
  <object name="waeup_workspace_wf" meta_type="CPS Workflow"/>
@@ -62,5 +63,5 @@
   </type>
   <type type_id="StudentAccommodation">
-   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
+   <bound-workflow workflow_id="waeup_student_accommodation_wf"/>
   </type>
   <type type_id="StudentApplication">
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml	(revision 742)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml	(revision 742)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<cps-workflow workflow_id="waeup_student_accommodation_wf"
+              title="CPS Workflow Definition"
+              state_variable="review_state"
+              meta_type="CPS Workflow">
+ <permission>Add portal content</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="bed_reserved" title="">
+  <exit-transition transition_id="pay_maintainance_fee"/>
+  <exit-transition transition_id="remove"/>
+  <permission-map name="Add portal content" acquired="True">
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="maintainance_fee_payed" title="">
+  <exit-transition transition_id="remove"/>
+ </state>
+ <state state_id="removed" title="">
+ </state>
+ <transition transition_id="pay_maintainance_fee" title=""
+             new_state="maintainance_fee_payed"
+             trigger="USER" before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="remove" title=""
+             new_state="removed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="reserve_bed" title=""
+             new_state="bed_reserved" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
+ </transition>
+</cps-workflow>
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 739)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 742)
@@ -30,4 +30,5 @@
  </state>
  <state state_id="cleared_and_validated" title="">
+  <exit-transition transition_id="create_content"/>
  </state>
  <state state_id="clearence_requested" title="">
