Index: waeup_product/trunk/skins/waeup_student/check_admission.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/check_admission.py	(revision 47)
@@ -1,7 +1,51 @@
-##parameters=REQUEST=None
+##parameters=REQUEST
+# $Id$
+"""
+process the Admission Form
 
-# $Id$
+return html renderer + psm
+"""
+type_name = 'Jamb'
+ti = context.portal_types[type_name]
 
-admin = "SectionManager" in context.portal_membership.getAuthenticatedMember().getRolesInContext(context)
+REQUEST.set('type_name',type_name)
 
-return context.student_admitted_form()
+validate = REQUEST.has_key("cpsdocument_edit_button")
+
+#student = context.getContent()
+student = context
+
+#jamb = getattr(student,'my-jamb').getContent()
+jamb = getattr(student,'my-jamb')
+
+##res = jamb.validateStoreRender(request=REQUEST,
+##                               layout_mode='create',
+##                               layout_mode_ok='admitted',
+##                               layout_mode_err='create',
+##                               layout_id='admission',
+##                               )
+
+lt = context.portal_layouts
+
+res,psm,ds = lt.renderLayout(layout_id= 'admission',
+                      schema_id= 'jamb',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      )
+if psm == 'invalid':
+    return context.check_admission_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+    
+elif psm == 'valid':
+    return context.student_admitted_form(rendered = res,
+                                 psm = psm,
+                                 student = student,
+                                 jamb = jamb,
+                                 )
+    
+return res,psm,ds
+
Index: waeup_product/trunk/skins/waeup_student/check_admission_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/check_admission_form.pt	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/check_admission_form.pt	(revision 47)
@@ -1,45 +1,23 @@
-<metal:html use-macro="here/main_template/macros/master">
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   data_storage options/ds;
+                   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="header" />
-  <metal:main fill-slot="main" tal:define="lotool here/portal_layouts">
-    <metal:block tal:condition="python: 1" define-macro="default_view"
-                 tal:define="layout python: lotool.checkadmission;
-                 ldef python: lotool.checkadmission.getLayoutDefinition()"
-                 >
-      <form action='check_admission' method='post'
-            enctype='multipart/form-data' class='workflow'>
-        <table tal:condition="python: 1" width="100%" cellpadding="2" cellspacing="2" border="0"
-               summary="layout">
-          <tr valign="top">
-            <td colspan="1">
-              <div class="">
-                <div class="label">
-                  <label>Student Id</label>
-                </div>
-                <div class="field">
-                  <input name="student Id" type="text" value="" size="10" />
-                </div>
-              </div>
-            </td>
-          </tr>
-          <tr valign="top">
-            <td colspan="1">
-              <div class="label">
-                <label>Scratch Card Pin</label>
-              </div>
-              <div class="field">
-                <input name="sc_pin" type="text" value="" size="10" />
-              </div>
-            </td>
-          </tr>
-          <tr valign="top">
-            <td colspan="1">
-              <input type="submit" class="standalone"
-                     name="cpsdocument_create_button" value="check" />
-            </td>
-          </tr>
-        </table>
-      </form>
+    <metal:block fill-slot="main">
+<span tal:content="structure data_storage" />
+      <h1>check your admission to the UniDemo !</h1>
+      <div tal:replace="structure rendered_main" />
     </metal:block>
-  </metal:main>
-</metal:html>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: waeup_product/trunk/skins/waeup_student/create_personal_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_personal_form.pt	(revision 47)
+++ waeup_product/trunk/skins/waeup_student/create_personal_form.pt	(revision 47)
@@ -0,0 +1,26 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+  <metal:block fill-slot="head_slot">
+    <tal:block tal:define="student here/getContent">
+    </tal:block>
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+          tal:attributes="href string:${base_url}student.css" />
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="items here/contentValues"
+               >
+    <form action="content_create" tal:attributes="action string:${here_url}/content_create"
+          method="post" class="group">
+      <dt>
+        <input type="hidden" name="type_name" value="Jamb" /> 
+      <p>
+        <input id="objectTitle" type="text" name="Title" value="personal" class="focus" size="40" />
+        <input type="submit" class="standalone searchButton" value="create" />
+      </p>
+    </form>
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/layout_admission_create.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/layout_admission_create.pt	(revision 47)
+++ waeup_product/trunk/skins/waeup_student/layout_admission_create.pt	(revision 47)
@@ -0,0 +1,83 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             creation creation|nothing;
+             metadata metadata|nothing;
+             type_name request/type_name|nothing;
+             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+             formaction string:check_admission_form;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             "
+             >
+  <form action='check_admission' method='post'
+        enctype='multipart/form-data' class='workflow'>
+    <div class='group'>
+      <div class='documentFields'>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="row layout/rows" valign="top">
+            <td tal:repeat="cell row"
+                tal:attributes="colspan cell/ncols">
+              <tal:block define="widget cell/widget;
+              wid widget/getWidgetId;
+              dm options/datastructure/getDataModel;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required widget/is_required|nothing;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', 'row'))"
+              >
+                <div tal:attributes="class widget_css_class;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <div class="label" tal:condition="widget/label_edit"
+                       tal:attributes="class python:test(is_required, 'label required','label')">
+                    <label i18n:translate="" tal:condition="widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                    <label tal:condition="not:widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                  </div>
+                  <button type="button" class="tooltipControl"
+                          tal:condition="widget/help"
+                          tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+                  <div class="field">
+                    <div tal:replace="structure cell/widget_rendered"/>
+                  </div>
+                  <div class="tooltipArea" style="visibility: hidden;"
+                       tal:condition="widget/help"
+                       tal:attributes="id tooltip_id;
+                       onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                       >
+                    <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+                               tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+                    <tal:block tal:condition="not:widget/is_i18n"
+                               tal:content="widget/help">This is the help for this field</tal:block>
+                  </div>
+                  <tal:block condition="err">
+                    <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                      <br /><em style="color: red"
+                                tal:content="msg">err</em>
+                    </tal:block>
+                  </tal:block>
+                </div>
+              </tal:block>
+            </td>
+          </tr>
+        </table>
+        <input type="submit" class="standalone" name="cpsdocument_edit_button" value="check" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: waeup_product/trunk/skins/waeup_student/student_admitted_form.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_admitted_form.pt	(revision 45)
+++ waeup_product/trunk/skins/waeup_student/student_admitted_form.pt	(revision 47)
@@ -1,112 +1,15 @@
+<tal:block define="rendered_main options/rendered;
+                   portal_status_message options/psm;
+                   jamb options/jamb/getContent;
+                   student options/student/getContent;
+                   edition python:1;"
+                   >
 <metal:html use-macro="here/main_template/macros/master">
-
   <metal:block fill-slot="header" />
-  <metal:main fill-slot="main" tal:define="lotool here/portal_layouts">
-    <metal:block tal:condition="python: 1" define-macro="default_view"
-                 tal:define="layout python: lotool.checkadmission;
-                 ldef python: lotool.checkadmission.getLayoutDefinition()"
-                 >
-      <form action='check_addmission' method='post'
-            enctype='multipart/form-data' class='workflow'>
-        <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
-          <TR>
-            <td colspan="">
-              Disclaimer
-            </TD>
-          </TR>
-          <TR>
-            <td colspan="">
-              <span>The result information given below is correct at the time of release of results by the Board. The board accepts no responsibility there after for any errors or omissions caused as a result of transmission via the internet or downloading or printing by the user. <p> Candidates are required to obtain their results slips from the Board as the result information contained herein does not constitute valid admission documentation and will therefore not be acceptable as such the institution applied to and/or the Board</p></span>
-            </TD>
-          </TR>
-          <TR>
-            <td colspan="">
-              <span >Examination</span></TD>
-            <td colspan="">
-              <span>UME 2005/2006</span></TD>
-          </TR>
-          <tr>
-            <td colspan="2">
-              <span>Personal Information</span></TD>
-          </tr>
-          <tr>
-            <TD width="50%">
-            Candidate Name</TD>
-            <TD>
-              <span>Olomide Kingshasa</span></TD>
-          </tr>
-          <tr>
-            <TD>Registration Number</TD>
-            <TD>
-              <span>1234567AC</span></TD>
-          </tr>
-          <tr>
-            <TD colspan="2">
-              <span>Examination Information</span></TD>
-          </tr>
-          <tr>
-            <TD>Examination Number</TD>
-            <TD>
-            Examination Centre Name</TD>
-          </tr>
-          <tr>
-            <TD >
-              <span>4568</span>
-              <span>401</span></TD>
-            <TD>
-              <span>Imaguero College (Snr) Sapele Rd B/C</span></TD>
-          </tr>
-          <TR>
-            <TD colspan="2">
-              <span>Subjects Information</span>
-            </TD>
-          </TR>
-          <TR>
-            <TD colspan="2">
-              <table cellspacing="0" rules="all" border="0">
-                <tr>
-                  <td>Subject</td><td>Score</td>
-                </tr>
-                <tr>
-                  <td>Use of English</td><td>32</td>
-                </tr>
-                <tr>
-                  <td>Economics</td><td>34</td>
-                </tr>
-                <tr>
-                  <td>Government</td><td>34</td>
-                </tr>
-                <tr>
-                  <td>Mathematics</td><td>31</td>
-                </tr>
-              </table>
-            </TD>
-          </TR>
-          <TR>
-            <TD>Aggregate</TD>
-            <TD>
-              <span>131</span>
-            </TD>
-          </TR>
-          <tr>
-            <TD colspan="2"><span>Admission Information</span></TD>
-          </tr>
-          <tr>
-            <TD colspan="2" align="left">
-              <span>NO ADMISSION OFFERED YET</span>
-              <HR width="100%" SIZE="1" />
-            </TD>
-          </tr>
-          <TR>
-            <TD>
-              <span>Card Use</span>
-            </TD>
-            <TD>
-              <span>1 of 5</span>
-            </TD>
-          </TR>
-        </TABLE>
-      </form>
-    </metal:block>
-  </metal:main>
-</metal:html>
+    <metal:main fill-slot="main">
+      <span tal:condition="python: 1" tal:content="jamb/reg_nr" />
+      <span tal:condition="python: 1" tal:content="jamb/admission_sc_pin" />
+      <span tal:content="student/title_or_id" />
+    </metal:main>
+  </metal:html>
+</tal:block>
Index: waeup_product/trunk/skins/waeup_student/student_index_html.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_index_html.py	(revision 47)
+++ waeup_product/trunk/skins/waeup_student/student_index_html.py	(revision 47)
@@ -0,0 +1,7 @@
+##parameters=post_id=None, REQUEST=None
+
+# $Id$
+
+"""Default view for the Student."""
+
+return context.student_view_main()
Index: waeup_product/trunk/skins/waeup_student/student_view.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_view.py	(revision 45)
+++ 	(revision )
@@ -1,8 +1,0 @@
-##parameters=post_id=None, REQUEST=None
-
-# $Id$
-
-"""Default view for the forum. If post_id is not None, post with id = <post_id>
-will be displayed, otherwise first post will be displayed."""
-
-return context.student_view_main()
Index: waeup_product/trunk/skins/waeup_student/student_view_main.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_view_main.pt	(revision 45)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-
-<metal:block fill-slot="head_slot">
-  <tal:block tal:define="student here/getContent">
-  </tal:block>
-</metal:block>
-
-<metal:block fill-slot="css_slot">
-  <link rel="Stylesheet" type="text/css" href=""
-    tal:attributes="href string:${base_url}student.css" />
-</metal:block>
-
-<metal:block fill-slot="main"
-             tal:define="student here/getContent;
-             items here/contentValues"
-             >
-    <span tal:condition="python: 0" tal:content="items" />
-    <tal:block tal:content="structure student/jamb_where_admitted" />
-    <table cellspacing="0" cellpadding="0">
-      <tal:block condition="python: len(items)">
-        <tr tal:repeat="item items">
-          <td colspan="1"> 
-            <a href="jamb" 
-               tal:attributes="href item/absolute_url"
-               tal:content="item/title_or_id"></a>
-          </td>
-        </tr>
-      </tal:block>
-      <tr tal:condition="python:not len(items)">
-        <td>
-          no Items yet !
-        </td>
-      </tr>
-    </table>
-  </metal:block>
-</html>
Index: waeup_product/trunk/skins/waeup_student/student_view_manager.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/student_view_manager.pt	(revision 47)
+++ waeup_product/trunk/skins/waeup_student/student_view_manager.pt	(revision 47)
@@ -0,0 +1,36 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+<metal:block fill-slot="css_slot">
+  <link rel="Stylesheet" type="text/css" href=""
+    tal:attributes="href string:${base_url}student.css" />
+</metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="student here/getContent;
+             items here/contentValues"
+             >
+    <span tal:condition="python: 0" tal:content="items" />
+    <tal:block tal:content="structure student/jamb_where_admitted" />
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+      <tr tal:condition="python:not len(items)">
+        <td>
+          no Items yet !
+        </td>
+      </tr>
+    </table>
+  </metal:block>
+</html>
