Index: WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py	(revision 2167)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py	(revision 2168)
@@ -97,5 +97,5 @@
 elif psm == '' and not manage:
     return context.apply_pume_form(rendered = res,
-                                   psm = None,
+                                   psm = psm,
                                    ds = ds,
                                    mode = mode,
@@ -132,7 +132,7 @@
         mode = "view"
         psm = "You successfully applied for PUME!"
-        data['application_date'] = current
         if object['status'] == 'edited':
             data['status'] = "submitted"
+            data['application_date'] = current
             logger.info('%s/%s modified and submitted application record' % (member,reg_no))
         elif object['status'] == 'reset':
@@ -183,5 +183,5 @@
     else:
         mode = "edit"
-        psm = "Content changed"
+        psm = "Content changed!"
         data['status'] = "edited"
         context.applicants_catalog.modifyRecord(**data)
Index: WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py	(revision 2167)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py	(revision 2168)
@@ -37,4 +37,5 @@
 #REQUEST.set('type_name',type_name)
 reset = "reset" in request.keys()
+edit = "edit" in request.keys()
 lt = context.portal_layouts
 
@@ -42,5 +43,5 @@
 new_reg_no = request.get('new_reg_no','').upper()
 
-if reset:
+if reset or edit:
     reg_no = reg_no
 elif new_reg_no:
@@ -50,7 +51,45 @@
 psm = ''
 object = {}
+ds = []
+
+if reg_no:
+    brains = context.applicants_catalog(reg_no = reg_no)
+    if len(brains) == 1:
+        for field in context.applicants_catalog.schema():
+            object[field] = getattr(brains[0],field,None)
+
+        res,psm,ds = lt.renderLayout(layout_id= 'application_manage',
+                                     schema_id= 'application',
+                                     layout_mode = "edit",
+                                     context=context,
+                                     mapping=REQUEST,
+                                     ob=object,
+                                     commit = False,
+                                    )
+if psm == 'invalid':
+    return context.apply_pume_manage_form(rendered = res,
+                                   psm = "Please correct your input!",
+                                   #psm = "%s, %s" % (psm,ds),
+                                   ds = ds,
+                                  )
+elif psm == '':
+    psm = 'Registration Number not found!'
+    return context.apply_pume_manage_form(rendered = res,
+                                   psm = psm,
+                                   ds = ds,
+                                  )
+elif psm == 'valid':
+    psm = ''
+    pass
+    
 data = {}
+dm = ds.getDataModel()
+for field in context.applicants_catalog.schema():
+    if dm.has_key("%s" % field):
+        data[field] = dm.get(field)
+
+
 if reset and reg_no:
-    data['reg_no'] = reg_no
+    #data['reg_no'] = reg_no
     psm = "You successfully reset the record! The applicant will be able to edit and resubmit the data."
     data['status'] = "reset"
@@ -58,7 +97,13 @@
     logger.info('%s reset application record of %s' % (member,reg_no))
 
+if edit and reg_no:
+    #data['reg_no'] = reg_no
+    psm = "Content changed!"
+    context.applicants_catalog.modifyRecord(**data)
+    logger.info('%s edited application record of %s' % (member,reg_no))
+
 #set_trace()
 
-ds = []
+
 if reg_no:
     brains = context.applicants_catalog(reg_no = reg_no)
@@ -66,7 +111,7 @@
         for field in context.applicants_catalog.schema():
             object[field] = getattr(brains[0],field,None)
-        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application',
+        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application_manage',
                                      schema_id= 'application',
-                                     layout_mode = "view_slip",
+                                     layout_mode = "edit",
                                      context=context,
                                      ob=object,
Index: WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage_form.pt	(revision 2167)
+++ WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage_form.pt	(revision 2168)
@@ -53,4 +53,18 @@
                    tal:condition="python: 'submitted' in ds['status']"
                    />
+                   
+                   
+                   
+                   
+                   
+            <input type="submit" class="standalone" 
+                   name="edit"
+                   value="Save" 
+                   />                   
+                   
+                   
+                   
+                   
+                   
             <br /><br />
             
