Index: main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6721)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6722)
@@ -72,4 +72,5 @@
 from waeup.sirp.accesscodes import invalidate_accesscode, get_access_code
 from waeup.sirp.accesscodes.workflow import USED
+from waeup.sirp.students.workflow import CLEARANCE
 
 class StudentsTab(PrimaryNavTab):
@@ -598,5 +599,5 @@
     grok.view(StudentClearanceDisplayFormPage)
     grok.require('waeup.handleStudent')
-    text = 'Edit and submit'
+    text = 'Edit'
     target = 'cedit'
 
@@ -615,5 +616,5 @@
     form_fields = grok.AutoFields(IStudentClearanceEdit).omit('clearance_locked')
     #grok.template('clearanceeditpage')
-    label = 'Edit clerance data'
+    label = 'Edit clearance data'
     title = 'Clearance Data'
     pnav = 4
@@ -631,4 +632,28 @@
         datepicker.need()
         return super(StudentClearanceEditFormPage, self).update()
+
+    @grok.action('Save')
+    def save(self, **data):
+        self.applyData(self.context, **data)
+        self.flash('Form has been saved.')
+        return
+
+    @grok.action('Save and request clearance')
+    def requestclearance(self, **data):
+        self.applyData(self.context, **data)
+        self.context._p_changed = True
+        #if self.dataNotComplete():
+        #    self.flash(self.dataNotComplete())
+        #    return
+        state = IWorkflowState(self.context).getState()
+        # This shouldn't happen, but the application officer
+        # might have forgotten to lock the form after changing the state
+        if state != CLEARANCE:
+            self.flash('This form cannot be submitted. Wrong state!')
+            return
+        IWorkflowInfo(self.context).fireTransition('request_clearance')
+        self.flash('Clearance has been requested.')
+        self.redirect(self.url(self.context))
+        return
 
 class StartClearance(WAeUPPage):
@@ -668,6 +693,4 @@
             invalidate_accesscode(pin,comment)
         IWorkflowInfo(self.context).fireTransition('start_clearance')
-        self.context.application_date = datetime.now()
-        self.context.clearance_locked = False
         self.flash('Clearance process is started.')
         self.redirect(self.url(self.context))
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py	(revision 6721)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py	(revision 6722)
@@ -82,4 +82,6 @@
     )
 
+LOCK_CLEARANCE_TRANS = ('reset2', 'request_clearance')
+UNLOCK_CLEARANCE_TRANS = ('reset3', 'reset4', 'start_clearance')
 
 registration_workflow = WAeUPWorkflow(REGISTRATION_TRANSITIONS)
@@ -111,4 +113,8 @@
     history = IObjectHistory(obj)
     history.addMessage(msg)
+    if event.transition.transition_id in LOCK_CLEARANCE_TRANS:
+        obj.clearance_locked = True
+    if event.transition.transition_id in UNLOCK_CLEARANCE_TRANS:
+        obj.clearance_locked = False
     # In some tests we don't have a students container or a user
     try:
