Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6769)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6770)
@@ -617,59 +617,4 @@
         return self.view.url(self.view.context, self.target)
 
-class StudentClearanceEditActionButton(ManageActionButton):
-    grok.order(1)
-    grok.context(IStudent)
-    grok.view(StudentClearanceDisplayFormPage)
-    grok.require('waeup.handleStudent')
-    text = 'Edit'
-    target = 'cedit'
-
-    @property
-    def target_url(self):
-        if self.context.clearance_locked:
-            return ''
-        return self.view.url(self.view.context, self.target)
-
-class StudentClearanceEditFormPage(StudentClearanceManageFormPage):
-    """ View to edit student clearance data by student
-    """
-    grok.context(IStudent)
-    grok.name('cedit')
-    grok.require('waeup.handleStudent')
-    form_fields = grok.AutoFields(
-        IStudentClearanceEdit).omit('clearance_locked')
-    label = 'Edit clearance data'
-    title = 'Clearance Data'
-    pnav = 4
-    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
-
-    def emitLockMessage(self):
-        self.flash('The requested form is locked (read-only).')
-        self.redirect(self.url(self.context))
-        return
-
-    def update(self):
-        if self.context.clearance_locked:
-            self.emitLockMessage()
-            return
-        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
-        self.redirect(self.url(self.context,'request_clearance'))
-        return
-
 class StartClearance(WAeUPPage):
     grok.context(IStudent)
@@ -711,4 +656,59 @@
         return
 
+class StudentClearanceEditActionButton(ManageActionButton):
+    grok.order(1)
+    grok.context(IStudent)
+    grok.view(StudentClearanceDisplayFormPage)
+    grok.require('waeup.handleStudent')
+    text = 'Edit'
+    target = 'cedit'
+
+    @property
+    def target_url(self):
+        if self.context.clearance_locked:
+            return ''
+        return self.view.url(self.view.context, self.target)
+
+class StudentClearanceEditFormPage(StudentClearanceManageFormPage):
+    """ View to edit student clearance data by student
+    """
+    grok.context(IStudent)
+    grok.name('cedit')
+    grok.require('waeup.handleStudent')
+    form_fields = grok.AutoFields(
+        IStudentClearanceEdit).omit('clearance_locked')
+    label = 'Edit clearance data'
+    title = 'Clearance Data'
+    pnav = 4
+    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
+
+    def emitLockMessage(self):
+        self.flash('The requested form is locked (read-only).')
+        self.redirect(self.url(self.context))
+        return
+
+    def update(self):
+        if self.context.clearance_locked:
+            self.emitLockMessage()
+            return
+        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
+        self.redirect(self.url(self.context,'request_clearance'))
+        return
+
 class RequestClearance(WAeUPPage):
     grok.context(IStudent)
