Index: /WAeUP_SRP/trunk/Students.py
===================================================================
--- /WAeUP_SRP/trunk/Students.py	(revision 657)
+++ /WAeUP_SRP/trunk/Students.py	(revision 658)
@@ -351,5 +351,5 @@
             app_doc = app.getContent()
             app_doc.edit(mapping=da)
-            wftool.doActionFor(app,'open',dest_container=app)
+            #wftool.doActionFor(app,'open',dest_container=app)
             app.manage_setLocalRoles(sid, ['Owner',])
             student.getContent().createSubObjects()
Index: /WAeUP_SRP/trunk/WAeUPTables.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTables.py	(revision 657)
+++ /WAeUP_SRP/trunk/WAeUPTables.py	(revision 658)
@@ -85,5 +85,5 @@
             return -1,"Student with Id %s already booked bed %s" % (student_id,records[0].bed)
             
-        records = self.searchResults({'bed_type' : bed_type, "student": ''})
+        records = [r for r in self.searchResults({'bed_type' : bed_type, "student": ''})]
         if len(records) == 0:
             return -1,"no bed of this type available"
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 657)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 658)
@@ -17,4 +17,6 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">iso8601_medium_easy</property>
+<property name="hidden_empty">True</property>
  </widget>
  <widget name="acco_maint_sc_pin" meta_type="String Widget">
@@ -28,4 +30,5 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
+<property name="hidden_empty">True</property>
  </widget>
  <widget name="acco_maint_sc_serial" meta_type="String Widget">
@@ -40,9 +43,10 @@
   <property name="hidden_readonly_layout_modes"/>
   <property name="display_width">10</property>
+<property name="hidden_empty">True</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"/>
+   <element value="acco_res_date"/>
   </property>
   <property name="label">Accommodation Reservation Date</property>
@@ -51,12 +55,13 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">iso8601_medium_easy</property>
  </widget>
  <widget name="acco_res_sc_pin" meta_type="String Widget">
-  <property name="title">Accommodation Reservation SC-pin</property>
+  <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="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"/>
@@ -73,4 +78,5 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
+<property name="hidden_empty">True</property>
  </widget>
  <widget name="bed" meta_type="String Widget">
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml	(revision 657)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml	(revision 658)
@@ -17,4 +17,5 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">iso8601_medium_easy</property>
  </widget>
 <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget">
@@ -219,6 +220,6 @@
   <property name="size_max">204800</property>
   <property name="display_external_editor">False</property>
-  <property name="display_width">300</property>
-  <property name="display_height">600</property>
+  <property name="display_width">150</property>
+  <property name="display_height">200</property>
   <property name="allow_resize">True</property>
  </widget>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 657)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 658)
@@ -21,4 +21,5 @@
   </property>
   <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">iso8601_medium_easy</property>
  </widget>
  <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget">
@@ -28,5 +29,5 @@
   </property>
   <property name="is_required">True</property>
-  <property name="label">Application PIN</property>
+  <property name="label">Access Code</property>
   <property name="label_edit">Application PIN</property>
   <property name="readonly_layout_modes">
@@ -89,5 +90,5 @@
    <element value="jamb_lastname"/>
   </property>
-  <property name="label">Name</property>
+  <property name="label">Student's Name</property>
   <property name="label_edit">Name</property>    
   <property name="readonly_layout_modes">
@@ -160,5 +161,17 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
- <widget name="passport" meta_type="WAeUP Image Widget">
+ <widget name="jamb_state" meta_type="String Widget">
+  <property name="title">JAMB State</property>
+  <property name="fields">
+   <element value="jamb_state"/>
+  </property>
+  <property name="label">State of Origin</property>
+  <property name="label_edit">JAMB State</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+ </widget>
+ <widget name="passport" meta_type="Photo Widget">
   <property name="title">Passport Picture</property>
   <property name="fields">
@@ -177,6 +190,6 @@
   <property name="size_max">204800</property>
   <property name="display_external_editor">False</property>
-  <property name="display_width">300</property>
-  <property name="display_height">600</property>
+  <property name="display_width">150</property>
+  <property name="display_height">200</property>
   <property name="allow_resize">True</property>
  </widget>
@@ -196,4 +209,10 @@
   <row>
    <cell name="jamb_sex" ncols="3"/>
+  </row>
+  <row>
+   <cell name="entry_mode" ncols="3"/>
+  </row>
+  <row>
+   <cell name="jamb_state" ncols="3"/>
   </row>
   <row>
Index: /WAeUP_SRP/trunk/profiles/default/themes.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/themes.xml	(revision 657)
+++ /WAeUP_SRP/trunk/profiles/default/themes.xml	(revision 658)
@@ -9,4 +9,5 @@
   <element key="index_html" value="WAeUP_Student+Default"/>
   <element key="application_slip" value="WAeUP_Student+Slippage"/>
+  <element key="accommodation_slip" value="WAeUP_Student+Slippage"/>
  </property>
  <object name="default" meta_type="Portal Theme"/>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 657)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 658)
@@ -8,5 +8,5 @@
  <property name="product">WAeUP_SRP</property>
  <property name="factory">addStudentAccommodation</property>
- <property name="immediate_view">accommodation_slip</property>
+ <property name="immediate_view">accommodation_view</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="accommodation_slip"/>
- <alias from="view" to="accommodation_slip"/>
+ <alias from="(Default)" to="accommodation_view"/>
+ <alias from="view" to="accommodation_view"/>
  <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/accommodation_slip"
+    condition_expr="" url_expr="string:${object_url}/accommodation_view"
     visible="True">
   <permission value="View"/>
Index: /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 657)
+++ /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 658)
@@ -79,5 +79,5 @@
     member.setProperties(last_login_time=current,login_time=current)
     if info['review_state'] == "application_pin_entered":
-        #wftool.doActionFor(info['app'],'open',dest_container=info['app'])
+        wftool.doActionFor(info['app'],'open',dest_container=info['app'])
         return response.redirect("%s/passport_entry_view" % student.absolute_url())
     return response.redirect("%s" % student.absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 657)
+++ /WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt	(revision 658)
@@ -1,29 +1,16 @@
-<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>Hostel Application 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>
+<metal:html tal:define="info context/getStudentInfo">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <h3>Hostel Application Slip</h3>
+      <br />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['acco_doc'].render(proxy=info['acco_doc'],
+            layout_mode='view_slip', 
+            layout_id='student_accommodation')" 
+            />
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: /WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt	(revision 658)
@@ -0,0 +1,30 @@
+<metal:html tal:define="info context/getStudentInfo">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info"
+            tal:define="review_state info/review_state">
+            
+        <div style="text-align: right">
+        <a href="" target="slip" tal:attributes="href string:accommodation_slip"
+            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+            Accommodation Slip
+        </a>
+        
+        </div>
+
+
+        <h3>Your Hostel Application</h3>
+        <br />
+        <span tal:omit-tag=""
+              tal:content="structure python: info['acco_doc'].render(proxy=info['acco_doc'],
+              layout_mode='view', 
+              layout_id='student_accommodation')" 
+              />
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: /WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt	(revision 657)
+++ /WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt	(revision 658)
@@ -1,59 +1,20 @@
-<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:block tal:condition="python:context.portal_type == 'Student'" tal:omit-tag="">
-    <h3>Post UME Acknowledegement Slip</h3>
+<metal:html tal:define="info context/getStudentInfo">
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+      <span tal:condition="not: info">
+        <metal:block use-macro="here/error_not_found/macros/not_found" />
+      </span>
+      <span tal:condition="info"
+            tal:define="review_state info/review_state">
+            
+        <h3>Post UME Acknowledegement Slip</h3>
         <br />
-        
-      <tal:block tal:define="application_data python:context.application.getContent();">
-      
-      
-      <table cellpadding="10em" cellspacing="">
-      <tr>
-      <td valign="top">
-        <img tal:condition="application_data/passport|nothing" width="150" height="200" 
-             tal:attributes="src string:${context/absolute_url}/application/passport"/>
-              <span tal:condition="nothing" tal:replace="structure application_data/passport" />
-      </td>
-
-      <td>
-      
-      <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
-      <tr><td>Student ID: </td><td><span tal:content="context/id" /></td>
-      <tr><td>Access Code: </td><td><span tal:content="application_data/app_ac_pin" /></td></tr>
-      <tr><td>Application Date: </td><td><span tal:content="python:application_data.app_ac_date.aCommonZ()" /></td></tr>
-      <tr><td>JAMB Registration Number: </td><td><span tal:content="application_data/jamb_reg_no" /></td></tr>
-      <tr><td>Student's Name: </td><td><span tal:content="application_data/jamb_firstname" /> <span tal:content="application_data/jamb_middlename" /> <span tal:content="application_data/jamb_lastname" /></td></tr>
-      <tr><td>Sex: </td><td><span tal:content="application_data/jamb_sex" /></td></tr>
-      <tr><td>Mode of Entry: </td><td><span tal:content="application_data/entry_mode" /></td></tr>
-      <tr><td>Course of Study: </td><td><span tal:content="application_data/jamb_first_cos" />, <span tal:content="application_data/jamb_second_cos" /></td></tr>
-      <tr><td>State of Origin: </td><td><span tal:content="application_data/jamb_state" /> / <span tal:content="application_data/jamb_lga" /></td></tr>
-      <tr><td>Post UME Examination Date: </td><td></td></tr>
-      </table>
-
-      </td>
-      </tr>
-      </table>
-      
-      </tal:block>
-    </tal:block>
-    <tal:block condition="python:context.portal_type != 'Student'">
-      Please do not manipulate the URL! This is not a student object.
-    </tal:block>  
-  
-  </metal:block>
-
-  <metal:block fill-slot="sub">
-  </metal:block>
-</html>
+        <span tal:omit-tag=""
+              tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+              layout_mode='view_slip', 
+              layout_id='student_application_fe')" 
+              />
+      </span>
+    </metal:main>
+  </metal:body>
+</metal:html>
Index: /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view.pt	(revision 658)
@@ -0,0 +1,32 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('session',
+                                 'bed',
+                                 'acco_res_date',
+                                 'acco_res_sc_pin',
+                                 )"
+                                 >
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td >
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view_slip.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/layout_accommodation_view_slip.pt	(revision 658)
@@ -0,0 +1,32 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('session',
+                                 'bed',
+                                 'acco_res_date',
+                                 'acco_res_sc_pin',
+                                 )"
+                                 >
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td >
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_student/layout_application_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/layout_application_slip.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/layout_application_slip.pt	(revision 658)
@@ -0,0 +1,59 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('jamb_reg_no',
+                                 'app_ac_pin',
+                                 'app_ac_date',
+                                 'jamb_lastname',
+                                 'jamb_sex',
+                                 'jamb_first_cos',
+                                 'jamb_second_cos',)"
+                                 >
+  <table cellpadding="2" cellspacing="2" summary="layout">
+    <tr>
+      <td><span class="dlabel">Student ID</span>:
+      </td>
+      <td> 
+         <span tal:replace="python:here.aq_parent.aq_parent.id" />
+      </td>      
+    </tr>
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td >
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:replace="structure cell/widget_rendered" />
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+    <tr>
+      <tal:block define="cell widgets/passport;
+                         widget cell/widget"
+                         >
+          <div tal:attributes="class cell/widget_css_class|nothing;
+              id python:widget.getHtmlWidgetId()+'_widget';">
+            <td valign="top">
+            <tal:block condition="widget/label">
+              <span class="label"
+                    tal:content="widget/label">label</span>:
+            </tal:block>
+            </td>
+            <td>
+              <img src="img" tal:replace="structure cell/widget_rendered">
+            </td>
+          </div>
+      </tal:block>
+    </tr>    
+  </table>
+</metal:block>
Index: /WAeUP_SRP/trunk/skins/waeup_student/layout_application_view_slip.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/layout_application_view_slip.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/layout_application_view_slip.pt	(revision 658)
@@ -0,0 +1,58 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('jamb_reg_no',
+                                 'app_ac_pin',
+                                 'app_ac_date',
+                                 'jamb_lastname',
+                                 'jamb_sex',
+                                 'entry_mode',
+                                 'jamb_first_cos',
+                                 'jamb_state',
+                                  )"
+                                 >
+  <table cellpadding="10em" cellspacing="">
+    <tr>
+      <tal:block define="cell widgets/passport;
+                 widget cell/widget"
+                 >
+        <td valign="top">
+          <img src="img" tal:replace="structure cell/widget_rendered" />
+        </td>
+      </tal:block>
+      <td>
+        <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+          <tr>
+            <td><span class="dlabel">Student ID</span>:
+            </td>
+            <td> 
+              <span tal:replace="python:here.aq_parent.aq_parent.id" />
+            </td>      
+          </tr>
+          <tr tal:repeat="field fields">
+            <tal:block tal:define="cell python: widgets[field]">
+              <tal:block define="widget cell/widget">
+                <div tal:attributes="class cell/widget_css_class|string:label;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <td >
+                    <span class="dlabel"
+                          tal:condition="widget/label"
+                          tal:content="widget/label">label</span>:
+                  </td>
+                  <td> 
+                    <span tal:replace="structure cell/widget_rendered" />
+                  </td>
+                </div>
+              </tal:block>
+            </tal:block>
+          </tr>
+          <tr><td>Post UME Examination Date: </td><td></td></tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</metal:block>
