Index: WAeUP_SRP/base/skins/waeup_accommodation/accommodation_edit_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/accommodation_edit_form.pt	(revision 2887)
+++ 	(revision )
@@ -1,48 +1,0 @@
-<tal:block define="rendered_main options/rendered;
-                   portal_status_message options/psm;
-                   data_storage options/ds;
-                   mode options/mode;
-                   edition python:1;"
-                   >
-<metal:block define-macro="edit_form">
-  <metal:block use-macro="here/main_template/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">
-      
-        <div style="text-align: right" tal:condition="python: mode == 'edit'">
-        <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 tal:condition="python: mode == 'create'">Book Your Accommodation! </h3>
-        <h3 tal:condition="python: mode == 'edit'">Pay Your Accommodation Maintenance Fee! </h3>
-        <br />
-        <div tal:replace="structure rendered_main" />
-          <p>Instructions :</p>
-          <ul tal:condition="python: mode == 'create'">
-            <li>Buy a Hostel Application Scratch Card.</li> 
-            <li>Enter the PIN above and press 'Book'.</li>
-            <li>Print your Hostel Allocation Slip.</li>
-          </ul>
-          <ul tal:condition="python: mode == 'edit'" 
-              tal:define="info python: context.getAccommodationInfo()">
-            <li>Buy a Hostel Maintainance Scratch Card 
-            (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
-            <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
-            <li>Enter the PIN above and press 'Save'.</li>
-            <li>Print your Hostel Maintenance Receipt.</li>
-          </ul>
-      </metal:block>
-      <metal:block fill-slot="sub">
-      </metal:block>
-    </metal:block>
-  </metal:block>
-</tal:block>
Index: WAeUP_SRP/base/skins/waeup_accommodation/reserve_accommodation.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/reserve_accommodation.py	(revision 2887)
+++ 	(revision )
@@ -1,137 +1,0 @@
-## Script (Python) "reserve_accommodation.py"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=REQUEST
-# $Id$
-"""
-process the the accommodation reservation
-"""
-try:
-    from Products.zdb import set_trace
-except:
-    def set_trace():
-        pass
-import DateTime
-current = DateTime.DateTime()
-pr = context.portal_registration
-wftool = context.portal_workflow
-lt = context.portal_layouts
-info = context.getAccommodationInfo()
-
-import logging
-logger = logging.getLogger('Skins.reserve_accommodation')
-
-#if info is None:
-#    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
-
-if info is None:
-    member_id = str(context.portal_membership.getAuthenticatedMember())
-    logger.info('%s tried to reserve accommodation' % (member_id))
-    return context.REQUEST.RESPONSE.redirect("%s/srp_invalid_access" % context.portal_url())
-
-mode = 'create'
-if not info['booking_allowed']:
-    return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
-student = info['student']
-student_id = info['student_id']
-acco_id = info['acco_id']
-#session = info['session'][1]
-session = info['session']
-#session = acco_id[-4:]
-validate = REQUEST.has_key("cpsdocument_create_button")
-if info.has_key('acco') and info['acco']:
-    validate = REQUEST.has_key("cpsdocument_edit_button")
-    if info['maintenance_paid']:
-        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
-    elif info['online_payment']:
-        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
-        # return context.REQUEST.RESPONSE.redirect("%s/pay_interswitch_acco?paytype=HOM" % info['student'].absolute_url())
-    else:
-        mode = 'edit'
-d = {}
-button = "Book"
-if mode == 'edit':
-    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',
-                      context=context,
-                      mapping=validate and REQUEST,
-                      ob=d,
-                      layout_mode=mode,
-                      formaction = "reserve_accommodation",
-                      button = button
-                      )
-if psm == 'invalid' or info['error'] is not None:
-    member_id = str(context.portal_membership.getAuthenticatedMember())
-    logger.info('%s, %s' % (member_id,info['error'] ))
-    if psm == 'invalid':
-        psm = "Please correct your input."
-    else:
-        psm = "Error in data, unable to reserve bed."
-    return context.accommodation_edit_form(rendered = res,
-                                 psm = psm,
-                                 #psm = "%s, %s" % (psm,ds),
-                                 mode = mode,
-                                 ds = ds,
-                                 )
-elif psm == '':
-    return context.accommodation_edit_form(rendered = res,
-                                 psm = None,
-                                 mode = mode,
-                                 ds = ds,
-                                 )
-elif psm == 'valid':
-    if mode == 'create':
-        #set_trace()
-        pin = str(ds.get('acco_res_sc_pin'))
-        code,bed = context.portal_accommodation.searchAndReserveBed(student_id,
-                                                                    "%s" % (info['student_status']))
-        while True:
-            if code == 1:
-                break
-            if code == -1:
-                return context.accommodation_edit_form(rendered = res,
-                                        psm = "%s" % bed,
-                                        mode = mode,
-                                        ds = ds,
-                                        )
-            elif code == -2:
-                return context.accommodation_edit_form(rendered = res,
-                                        psm = "No bed available. Your category is already fully booked.",
-                                        mode = mode,
-                                        ds = ds,
-                                        )
-            else: # unknown error
-                return context.accommodation_edit_form(rendered = res,
-                                        psm = "Unexpected Error!",
-                                        mode = mode,
-                                        ds = ds,
-                                        )
-        student.invokeFactory('StudentAccommodation',acco_id)
-        hall_info = context.waeup_tool.getHallInfo(bed)
-        ds.set('acco_maint_code', hall_info.get('maintenance_code'))
-        ds.set('acco_maint_fee', hall_info.get('maintenance_fee'))
-        ds.set('acco_res_date', current)
-        ds.set('bed', bed)
-        ds.set('session', session)
-        ds.set('student_status',info['student_status'])
-        acco = getattr(student,acco_id)
-        acco.getContent().edit(mapping=ds)
-        #wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
-        return context.REQUEST.RESPONSE.redirect("%s/reserve_accommodation" % student.absolute_url())
-pin = str(ds.get('acco_main_sc_pin'))
-pp = context.portal_pins
-acco = getattr(student,acco_id)
-ds.set('acco_maint_date', current)
-acco.getContent().edit(mapping=ds)
-wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
-return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
-
