Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7107)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7108)
@@ -70,8 +70,8 @@
         changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
     fields_string = ' + '.join(changed_fields)
-    view.context._p_changed = True
+    #view.context._p_changed = True
     view.flash('Form has been saved.')
     if fields_string:
-        write_log_message(view, 'saved: % s' % fields_string)
+        write_log_message(view, 'saved: %s' % fields_string)
     return
 
@@ -470,6 +470,4 @@
     title = 'Clearance Data'
     pnav = 4
-    files_changed = []
-    files_deleted = []
 
     form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
@@ -479,5 +477,5 @@
         return super(StudentClearanceManageFormPage, self).update()
 
-    @grok.action('Save')
+    @grok.action('Save (no upload)')
     def save(self, **data):
         msave(self, **data)
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt	(revision 7107)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt	(revision 7108)
@@ -8,6 +8,4 @@
     <span class="widget">
       <tal:file tal:condition="viewlet/file_exists">
-        <input type="submit" id="delete"
-               name="delete" value="Delete file" class="button" />
         <a tal:attributes="href viewlet/download_name"
            tal:content="viewlet/download_name"
@@ -15,8 +13,11 @@
           LINK
         </a>
+        <input type="submit" id="delete"
+               name="delete" value="Delete" class="button" />
         <br /><br />
       </tal:file>
-      Upload new file:<br />
       <input type="file" tal:attributes="name viewlet/input_name"/>
+      <input type="submit" id="upload"
+             name="upload" value="Upload" class="button" />
       <br />
       <span i18n:translate="">
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7107)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7108)
@@ -365,14 +365,17 @@
         # as birth certificate
         pseudo_image = StringIO('I pretend to be a graphics file')
-        ctrl = self.browser.getControl(name='form.birth_certificate')
+        ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
-        self.browser.getControl("Save").click() # submit form
-        # Form has errors ...
-        self.assertTrue(
-            'Required input is missing' in self.browser.contents)
-        # ... but file has been uploaded and a correct <img> link included
-        self.assertTrue(
+        # The Save action does not upload files
+        self.browser.getControl("Save (no upload)").click() # submit form
+        self.assertFalse(
             '<a target="image" href="birth_certificate.jpg">' in self.browser.contents)
+        # ... but the Upload submit button
+        import pdb; pdb.set_trace()
+        ctrl = self.browser.getControl(name='birth_certificate')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
+        self.browser.getControl("Upload").click() # submit form
         # There is a correct <img> link included
         self.assertTrue(
@@ -388,5 +391,5 @@
         photo_content = 'A' * 1024 * 151  # A string of 21 KB size
         pseudo_image = StringIO(photo_content)
-        ctrl = self.browser.getControl(name='form.birth_certificate')
+        ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7107)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7108)
@@ -8,5 +8,6 @@
 from waeup.sirp.browser import DEFAULT_IMAGE_PATH
 from waeup.sirp.students.browser import (
-    StudentClearanceDisplayFormPage, StudentClearanceManageFormPage)
+    StudentClearanceDisplayFormPage, StudentClearanceManageFormPage,
+    write_log_message)
 from waeup.sirp.students.interfaces import IStudentClearance
 
@@ -205,4 +206,5 @@
     store = getUtility(IExtFileStore)
     store.deleteFileByContext(context, attr=download_name)
+    write_log_message(view, 'deleted: %s' % download_name)
     view.flash('File %s deleted.' % download_name)
     return
@@ -227,5 +229,5 @@
     ext.lower()
     if ext != expected_ext:
-        view.flash('%s extension expected.' % expected_ext)
+        view.flash('%s file extension expected.' % expected_ext)
         return False
     size = file_size(upload)
@@ -237,4 +239,6 @@
     file_id = IFileStoreNameChooser(context).chooseName(attr=download_name)
     store.createFile(file_id, upload)
+    write_log_message(view, 'uploaded: %s (%s)' % (download_name,upload.filename))
+    view.flash('File %s uploaded.' % download_name)
     return True
 
@@ -276,11 +280,10 @@
     grok.require('waeup.manageStudents')
     mus = 1024 * 150
-    input_name = u'form.filename'
+    input_name = u'filename'
 
     def update(self):
         self.max_upload_size = string_from_bytes(self.mus)
-        delete = self.request.form.get('delete', None)
-        if delete:
-            self.view.files_deleted += self.download_name
+        delete_button = self.request.form.get('delete', None)
+        if delete_button:
             handle_file_delete(
                 context=self.context, view=self.view,
@@ -289,15 +292,15 @@
                 self.view.url(self.context, self.view.__name__))
             return
-        upload = self.request.form.get(self.input_name, None)
-        if upload:
-            # We got a fresh upload
-            file_changed = handle_file_upload(
-                upload, self.context, self.view, self.mus, self.download_name)
-            if file_changed is False:  # False is not None!
-                self.view.redirect(
-                    self.view.url(self.context, self.view.__name__))
-                return # error during file upload. Ignore other values
-            else:
-                self.view.files_changed += self.download_name
+        upload_button = self.request.form.get('upload', None)
+        if upload_button:
+            upload = self.request.form.get(self.input_name, None)
+            if upload:
+                # We got a fresh upload
+                file_changed = handle_file_upload(
+                    upload, self.context, self.view, self.mus, self.download_name)
+                if file_changed is False:  # False is not None!
+                    self.view.redirect(
+                        self.view.url(self.context, self.view.__name__))
+                    return # error during file upload. Ignore other values
         return
 
@@ -313,8 +316,8 @@
     """
     grok.order(1)
-    label = u'Birth Certificate (jpeg image):'
+    label = u'Birth Certificate (jpg only):'
     mus = 1024 * 150
     download_name = u'birth_certificate.jpg'
-    input_name = u'form.birth_certificate'
+    input_name = u'birth_certificate'
 
 class Image(grok.View):
