Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt	(revision 501)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt	(revision 502)
@@ -43,5 +43,5 @@
   </div>
     <span tal:omit-tag="" tal:condition="python:display_buttons or context.display_content()" 
-          tal:content="structure doc/render" />
+          tal:content="structure python: doc.render(proxy=here,layout_mode='view')" />
 
   <form action="" method="post" class="group"
Index: WAeUP_SRP/trunk/skins/waeup_custom/logged_in.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/logged_in.pt	(revision 501)
+++ WAeUP_SRP/trunk/skins/waeup_custom/logged_in.pt	(revision 502)
@@ -38,5 +38,5 @@
                    dum_home mtool/createMemberArea"
                    >
-          <span tal:condition="nothing" 
+          <span tal:condition="python:1" 
               tal:define="dummy python: context.process_waeup_login(member=member,sc_pin=request.get('sc_pin',None))" />
           <tal:block condition="first_time">
Index: WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py	(revision 501)
+++ WAeUP_SRP/trunk/skins/waeup_default/process_waeup_login.py	(revision 502)
@@ -7,13 +7,38 @@
 request = context.REQUEST
 response=request.response
-return
-##
-##if request.form.get('submit') == 'Login':
-##    #waeup = context.portal_catalog(id = 'demouni')[0]
-##    #waeup = context.portal_catalog(portal_type = 'University')[0]
-##    if 1 or "Manager" in member.getRoles():
-##        return
-###return
-##member_id = str(member)
+import DateTime
+current = DateTime.DateTime()
+#
+if request.form.get('submit') == 'Login':
+    if "Manager" in member.getRoles():
+        return
+member_id = str(member)
+student = getattr(context.students,member_id)
+application = student.application
+#student.invokeFactory('StudentPersonal','personal')
+apdoc = application.getContent()
+names = apdoc.jamb_lastname.split()
+dp = {}
+if len(names) == 3:
+    dp['firstname'] = names[0].capitalize()
+    dp['middlename'] = names[1].capitalize()
+    dp['lastname'] = names[2].capitalize()
+elif len(names) == 2:
+    dp['firstname'] = names[0].capitalize()
+    dp['lastname'] = names[1].capitalize()
+else:
+    dp['lastname'] = apdoc.jamb_lastname
+    dp['sex'] = apdoc.jamb_sex == 'F'
+    dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga )
+student.personal.getContent().edit(mapping = dp)
+##student.content_status_modify(workflow_action="enter_application_pin")
+
+da = {}
+da['app_ac_pin'] = request.get('pin')
+da['app_ac_date'] = current
+apdoc.edit(mapping = da)
+
+return response.redirect("%s/application_form" % student.application.absolute_url())
+
 ##ma = getattr(context,member_id)
 ##jkw = {'application_sc_pin': sc_pin}
@@ -53,5 +78,4 @@
 ##context.notifyCPSDocumentCreation(ob=pd)
 ##
-##return response.redirect("%s" % ma.absolute_url())
 ###return ma.personal_addon(REQUEST=context.REQUEST)
 
Index: WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_create_do.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_create_do.py	(revision 502)
+++ WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_create_do.py	(revision 502)
@@ -0,0 +1,37 @@
+##parameters=type_name, datamodel
+# $Id$
+"""
+Create an empty object in the context according to the datamodel.
+
+Datamodel may be examined to create a suitable id.
+"""
+from Products.CMFCore.utils import getToolByName
+
+prefix = datamodel.get('prefix').upper()
+datamodel.set('prefix',prefix)
+bl = context.portal_catalog({'meta_type': "ScratchCardBatch",})
+b_ids = []
+for b in bl:
+    b_ids.append(b.getId)
+next = 1
+while b_ids and "%s_%d" % (prefix,next) in b_ids:
+    next += 1
+id = "%s_%d" % (prefix,next)
+datamodel.set('batch_no',next)
+##language = datamodel.get('Language')
+##if not language:
+##    ts = getToolByName(context, 'translation_service')
+##    language = ts.getSelectedLanguage()
+
+# Datamodel is passed so that flexti can initialize the object.
+new_id = context.invokeFactory(type_name, id, datamodel=datamodel,
+                               )
+if new_id is not None:
+    id = new_id
+
+ob = getattr(context, id)
+ob.getContent().edit(mapping=datamodel)
+
+#context.notifyCPSDocumentCreation(ob=ob) # BBB obsolete in CPS 3.5.0
+
+return ob
Index: WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_created.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_created.py	(revision 502)
+++ WAeUP_SRP/trunk/skins/waeup_pins/scratch_card_batch_created.py	(revision 502)
@@ -0,0 +1,14 @@
+## Script (Python) "cpsdocument_created"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=object=None
+##title=
+##
+# $Id$
+if object is not None:
+    batch = object
+batch.getContent().makePins()
+return
Index: WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py	(revision 501)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py	(revision 502)
@@ -7,4 +7,5 @@
 import DateTime
 current = DateTime.DateTime()
+pr = context.portal_registration
 
 
@@ -25,5 +26,5 @@
                       layout_mode='create',
                       formaction = "apply_admission",
-                      submit = "check",
+                      button = "Open JAMB Record",
                       )
 if psm == 'invalid':
@@ -43,39 +44,26 @@
                                  )
 elif psm == 'valid':
-    jamb_id = ds.get('jamb_reg_no')
-    student = context.getContent().getStudentByRegNo(jamb_id)
-    if student is None:
-        psm = "JAMB record %s not accessible." % (jamb_id)
-        return context.application_pin_form(rendered = res,
-                                 psm = psm,
-                                 #psm = "%s, %s" % (psm,ds),
-                                 ds = ds,
-                                 )
-application = student.application
-if context.portal_workflow.getInfoFor(student,'review_state',None) == "created":
-    #student.invokeFactory('StudentClearance','clearance')
-    student.invokeFactory('StudentPersonal','personal')
-    student.content_status_modify(workflow_action="enter_application_pin")
+    s_id = ds.get('s_id')
+    return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"
+          % (context.absolute_url(),s_id,'uNsEt',ds.get('app_ac_pin')))
+    
+##    jamb_id = ds.get('jamb_reg_no')
+##    student = context.getContent().getStudentByRegNo(jamb_id)
+##    if student is None:
+##        psm = "JAMB record %s not accessible." % (jamb_id)
+##        return context.application_pin_form(rendered = res,
+##                                 psm = psm,
+##                                 #psm = "%s, %s" % (psm,ds),
+##                                 ds = ds,
+##                                 )
+##if context.portal_workflow.getInfoFor(student,'review_state',None) == "created":
+##    #student.invokeFactory('StudentClearance','clearance')
+##da = {}
+##pin = str(ds.get('app_ac_pin'))
+##da['app_ac_pin'] = pin
+##da['app_ac_date'] = current
+##apdoc.edit(mapping = da)
 
 
-apdoc = application.getContent()
-names = apdoc.jamb_lastname.split()
-dp = {}
-if len(names) == 3:
-    dp['firstname'] = names[0].capitalize()
-    dp['middlename'] = names[1].capitalize()
-    dp['lastname'] = names[2].capitalize()
-elif len(names) == 2:
-    dp['firstname'] = names[0].capitalize()
-    dp['lastname'] = names[1].capitalize()
-else:
-    dp['lastname'] = apdoc.jamb_lastname
-dp['sex'] = apdoc.jamb_sex == 'F'
-dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga )
-student.personal.getContent().edit(mapping = dp)
-da = {}
-da['app_ac_pin'] = ds.get('app_ac_pin')
-da['app_ac_date'] = current
-apdoc.edit(mapping = da)
 # now display the passport form with jamb-data readonly
 return context.REQUEST.RESPONSE.redirect("%s/application_form" % (student.application.absolute_url()))
Index: WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt	(revision 501)
+++ WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt	(revision 502)
@@ -81,10 +81,9 @@
          class="standalone" 
          name="cpsdocument_create_button"
-         value="apply" 
-         i18n:attributes="value" tal:condition="creation" />
+         value="apply"
+         tal:attributes="value options/button"
+         tal:condition="creation" />
 
 </form>
-
-                         
 </metal:block>
 
Index: WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_create_do.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_create_do.py	(revision 501)
+++ 	(revision )
@@ -1,37 +1,0 @@
-##parameters=type_name, datamodel
-# $Id$
-"""
-Create an empty object in the context according to the datamodel.
-
-Datamodel may be examined to create a suitable id.
-"""
-from Products.CMFCore.utils import getToolByName
-
-prefix = datamodel.get('prefix').upper()
-datamodel.set('prefix',prefix)
-bl = context.portal_catalog({'meta_type': "ScratchCardBatch",})
-b_ids = []
-for b in bl:
-    b_ids.append(b.getId)
-next = 1
-while b_ids and "%s_%d" % (prefix,next) in b_ids:
-    next += 1
-id = "%s_%d" % (prefix,next)
-datamodel.set('batch_no',next)
-##language = datamodel.get('Language')
-##if not language:
-##    ts = getToolByName(context, 'translation_service')
-##    language = ts.getSelectedLanguage()
-
-# Datamodel is passed so that flexti can initialize the object.
-new_id = context.invokeFactory(type_name, id, datamodel=datamodel,
-                               )
-if new_id is not None:
-    id = new_id
-
-ob = getattr(context, id)
-ob.getContent().edit(mapping=datamodel)
-
-context.notifyCPSDocumentCreation(ob=ob) # BBB obsolete in CPS 3.5.0
-
-return ob
Index: WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_created.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/scratch_card_batch_created.py	(revision 501)
+++ 	(revision )
@@ -1,14 +1,0 @@
-## Script (Python) "cpsdocument_created"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=object=None
-##title=
-##
-# $Id$
-if object is not None:
-    batch = object
-batch.getContent().makePins()
-return
