Index: main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser.py
===================================================================
--- main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser.py	(revision 10096)
+++ main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser.py	(revision 10105)
@@ -82,7 +82,11 @@
         html = ''
         pdf = getUtility(IExtFileStore).getFileByContext(
-            self.context, attr='formextension.pdf')
+            self.context, attr='extraform.pdf')
         if pdf:
-            html += '<a href="formextension.pdf">Offline Form Extension</a>'
+            html += '<a href="extraform.pdf">Extra Applicant Information Form</a>, '
+        pdf = getUtility(IExtFileStore).getFileByContext(
+            self.context, attr='refereeform.pdf')
+        if pdf:
+            html += '<a href="refereeform.pdf">Referee\'s Form</a>'
         return html
 
@@ -113,5 +117,6 @@
     def update(self):
         super(CustomApplicantDisplayFormPage, self).update()
-        self.formextension_url = self.url(self.context, 'formextension.pdf')
+        self.extraform_url = self.url(self.context, 'extraform.pdf')
+        self.referreeform_url = self.url(self.context, 'refereeform.pdf')
         return
 
@@ -161,11 +166,22 @@
     def update(self):
         super(CustomApplicantManageFormPage, self).update()
-        upload_formextension = self.request.form.get('form.formextension', None)
-        if upload_formextension:
-            # We got a fresh formextension upload
-            self.upload_success = handle_file_upload(
-                upload_formextension, self.context, self, attr='formextension.pdf')
-            if self.upload_success:
-                self.context.writeLogMessage(self, 'saved: formextension')
+        upload_extraform = self.request.form.get('form.extraform', None)
+        if upload_extraform:
+            # We got a fresh extraform upload
+            success = handle_file_upload(
+                upload_extraform, self.context, self, attr='extraform.pdf')
+            if success:
+                self.context.writeLogMessage(self, 'saved: extraform')
+            else:
+                self.upload_success = False
+        upload_refereeform = self.request.form.get('form.refereeform', None)
+        if upload_refereeform:
+            # We got a fresh refereeform upload
+            success = handle_file_upload(
+                upload_refereeform, self.context, self, attr='refereeform.pdf')
+            if success:
+                self.context.writeLogMessage(self, 'saved: refereeform')
+            else:
+                self.upload_success = False
         self.max_file_upload_size = string_from_bytes(MAX_FILE_UPLOAD_SIZE)
         return
@@ -195,6 +211,8 @@
         if not store.getFileByContext(self.context, attr=u'passport.jpg'):
             return _('No passport picture uploaded.')
-        if not store.getFileByContext(self.context, attr=u'formextension.pdf'):
-            return _('No form extension pdf file uploaded.')
+        if not store.getFileByContext(self.context, attr=u'extraform.pdf'):
+            return _('No extra information form pdf file uploaded.')
+        if not store.getFileByContext(self.context, attr=u'refereeform.pdf'):
+            return _('No referee form pdf file uploaded.')
         if not self.request.form.get('confirm_passport', False):
             return _('Passport picture confirmation box not ticked.')
@@ -208,16 +226,25 @@
             return
         super(CustomApplicantEditFormPage, self).update()
-        upload_formextension = self.request.form.get('form.formextension', None)
-        if upload_formextension:
-            # We got a fresh formextension upload
-            self.upload_success = handle_file_upload(
-                upload_formextension, self.context, self, attr='formextension.pdf')
+        upload_extraform = self.request.form.get('form.extraform', None)
+        if upload_extraform:
+            # We got a fresh extraform upload
+            success = handle_file_upload(
+                upload_extraform, self.context, self, attr='extraform.pdf')
+            if not success:
+                self.upload_success = False
+        upload_refereeform = self.request.form.get('form.refereeform', None)
+        if upload_refereeform:
+            # We got a fresh refereeform upload
+            success = handle_file_upload(
+                upload_refereeform, self.context, self, attr='refereeform.pdf')
+            if not success:
+                self.upload_success = False
         self.max_file_upload_size = string_from_bytes(MAX_FILE_UPLOAD_SIZE)
         return
 
-class FormExtension(grok.View):
+class ExtraForm(grok.View):
     """Renders the pdf form extension for applicants.
     """
-    grok.name('formextension.pdf')
+    grok.name('extraform.pdf')
     grok.context(ICustomApplicant)
     grok.require('waeup.viewApplication')
@@ -225,5 +252,18 @@
     def render(self):
         pdf = getUtility(IExtFileStore).getFileByContext(
-            self.context, attr='formextension.pdf')
+            self.context, attr='extraform.pdf')
         self.response.setHeader('Content-Type', 'application/pdf')
         return pdf
+
+class RefereeForm(grok.View):
+    """Renders the pdf referee's form for applicants.
+    """
+    grok.name('refereeform.pdf')
+    grok.context(ICustomApplicant)
+    grok.require('waeup.viewApplication')
+
+    def render(self):
+        pdf = getUtility(IExtFileStore).getFileByContext(
+            self.context, attr='refereeform.pdf')
+        self.response.setHeader('Content-Type', 'application/pdf')
+        return pdf
Index: main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser_templates/applicanteditpage.pt
===================================================================
--- main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser_templates/applicanteditpage.pt	(revision 10096)
+++ main/waeup.futminna/trunk/src/waeup/futminna/applicants/browser_templates/applicanteditpage.pt	(revision 10105)
@@ -18,7 +18,10 @@
       Download, fill, scan and re-upload the following forms:
     </span>
-    <a href="https://futminna.waeup.org/downloads/ApplicationFormExtension.pdf"
+        <a href="https://futminna.waeup.org/downloads/ExtraApplicantInformationForm.pdf"
         i18n:translate="">
-      Offline Form Extension
+      Extra Applicant Information Form</a>,
+    <a href="https://futminna.waeup.org/downloads/RefereeForm.pdf"
+        i18n:translate="">
+      Referee's Form
     </a><br /><br />
   </div>
@@ -48,14 +51,32 @@
       <tr>
         <td class="fieldname" i18n:translate="">
-          Offline Form Extension:
+          Extra Applicant Information Form:
         </td>
         <td>
-          <p tal:condition="python: view.file_exists('formextension.pdf')">
-            <a href="formextension.pdf"
+          <p tal:condition="python: view.file_exists('extraform.pdf')">
+            <a href="extraform.pdf"
                i18n:translate="">
               Download pdf file
             </a>
           </p>
-          <input type="file" name="form.formextension" />
+          <input type="file" name="form.extraform" />
+          <br />
+          <span i18n:translate="">
+            Max. file size:
+          </span>
+          <span tal:replace="view/max_file_upload_size">10 KB</span>
+      </tr>
+      <tr>
+        <td class="fieldname" i18n:translate="">
+          Referee's Form:
+        </td>
+        <td>
+          <p tal:condition="python: view.file_exists('refereeform.pdf')">
+            <a href="refereeform.pdf"
+               i18n:translate="">
+              Download pdf file
+            </a>
+          </p>
+          <input type="file" name="form.refereeform" />
           <br />
           <span i18n:translate="">
Index: main/waeup.futminna/trunk/src/waeup/futminna/applicants/tests/test_browser.py
===================================================================
--- main/waeup.futminna/trunk/src/waeup/futminna/applicants/tests/test_browser.py	(revision 10096)
+++ main/waeup.futminna/trunk/src/waeup/futminna/applicants/tests/test_browser.py	(revision 10105)
@@ -65,5 +65,5 @@
         self.assertTrue(img is None)
 
-    def test_upload_formextension_by_student(self):
+    def test_upload_extraform_by_student(self):
         self.login()
         self.browser.open(self.edit_path)
@@ -71,5 +71,5 @@
         pdf_content = 'A' * 1024 * 600  # A string of 600 KB size
         pseudo_pdf = StringIO(pdf_content)
-        ctrl = self.browser.getControl(name='form.formextension')
+        ctrl = self.browser.getControl(name='form.extraform')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
@@ -81,12 +81,12 @@
         pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
         pseudo_pdf = StringIO(pdf_content)
-        ctrl = self.browser.getControl(name='form.formextension')
-        file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
-        self.browser.getControl("Save").click() # submit form
-        # Even though the form could not be saved ...
-        self.assertTrue('Required input is missing' in self.browser.contents)
-        # ... the file has been successfully uploaded
-        pdf_url = self.edit_path.replace('edit', 'formextension.pdf')
+        ctrl = self.browser.getControl(name='form.extraform')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
+        self.browser.getControl("Save").click() # submit form
+        # Even though the form could not be saved ...
+        self.assertTrue('Required input is missing' in self.browser.contents)
+        # ... the file has been successfully uploaded
+        pdf_url = self.edit_path.replace('edit', 'extraform.pdf')
         self.browser.open(pdf_url)
         self.assertEqual(
@@ -96,18 +96,18 @@
         storage = getUtility(IExtFileStore)
         file_id = IFileStoreNameChooser(self.applicant).chooseName(
-            attr='formextension.pdf')
-        # The stored file can be fetched
-        fd = storage.getFile(file_id)
-        file_len = len(fd.read())
-        self.assertEqual(file_len, 307200)
-        # A file link is displayed on the edit view ...
-        self.browser.open(self.edit_path)
-        self.assertTrue('<a href="formextension.pdf">' in self.browser.contents)
-        # ... and on the dislay view
-        self.browser.open(self.view_path)
-        self.assertTrue('<a href="formextension.pdf">Offline Form Extension</a>'
-            in self.browser.contents)
-
-    def test_upload_formextension_by_manager(self):
+            attr='extraform.pdf')
+        # The stored file can be fetched
+        fd = storage.getFile(file_id)
+        file_len = len(fd.read())
+        self.assertEqual(file_len, 307200)
+        # A file link is displayed on the edit view ...
+        self.browser.open(self.edit_path)
+        self.assertTrue('<a href="extraform.pdf">' in self.browser.contents)
+        # ... and on the dislay view
+        self.browser.open(self.view_path)
+        self.assertTrue('<a href="extraform.pdf">Extra Applicant Information Form</a>'
+            in self.browser.contents)
+
+    def test_upload_extraform_by_manager(self):
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open(self.manage_path)
@@ -115,12 +115,12 @@
         pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
         pseudo_pdf = StringIO(pdf_content)
-        ctrl = self.browser.getControl(name='form.formextension')
-        file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
-        self.browser.getControl("Save").click() # submit form
-        # Even though the form could not be saved ...
-        self.assertTrue('Required input is missing' in self.browser.contents)
-        # ... the file has been successfully uploaded
-        pdf_url = self.manage_path.replace('manage', 'formextension.pdf')
+        ctrl = self.browser.getControl(name='form.extraform')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
+        self.browser.getControl("Save").click() # submit form
+        # Even though the form could not be saved ...
+        self.assertTrue('Required input is missing' in self.browser.contents)
+        # ... the file has been successfully uploaded
+        pdf_url = self.manage_path.replace('manage', 'extraform.pdf')
         self.browser.open(pdf_url)
         self.assertEqual(
@@ -130,15 +130,15 @@
         storage = getUtility(IExtFileStore)
         file_id = IFileStoreNameChooser(self.applicant).chooseName(
-            attr='formextension.pdf')
-        # The stored file can be fetched
-        fd = storage.getFile(file_id)
-        file_len = len(fd.read())
-        self.assertEqual(file_len, 307200)
-        # A file link is displayed on the edit view ...
-        self.browser.open(self.manage_path)
-        self.assertTrue('<a href="formextension.pdf">' in self.browser.contents)
-        # ... and on the dislay view
-        self.browser.open(self.view_path)
-        self.assertTrue('<a href="formextension.pdf">Offline Form Extension</a>'
+            attr='extraform.pdf')
+        # The stored file can be fetched
+        fd = storage.getFile(file_id)
+        file_len = len(fd.read())
+        self.assertEqual(file_len, 307200)
+        # A file link is displayed on the edit view ...
+        self.browser.open(self.manage_path)
+        self.assertTrue('<a href="extraform.pdf">' in self.browser.contents)
+        # ... and on the dislay view
+        self.browser.open(self.view_path)
+        self.assertTrue('<a href="extraform.pdf">Extra Applicant Information Form</a>'
             in self.browser.contents)
         # Adding file is properly logged
@@ -148,5 +148,92 @@
         self.assertTrue(
             'zope.mgr - waeup.futminna.applicants.browser.CustomApplicantManageFormPage'
-            ' - %s - saved: formextension'
+            ' - %s - saved: extraform'
             % (self.applicant.applicant_id)
             in logcontent)
+
+    def test_upload_refereeform_by_student(self):
+        self.login()
+        self.browser.open(self.edit_path)
+        # Create a pseudo file and select it to be uploaded in form
+        pdf_content = 'A' * 1024 * 600  # A string of 600 KB size
+        pseudo_pdf = StringIO(pdf_content)
+        ctrl = self.browser.getControl(name='form.refereeform')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
+        self.browser.getControl("Save").click() # submit form
+        # We get a warning message
+        self.assertTrue(
+            'Uploaded file is too big' in self.browser.contents)
+        # Create a pseudo file with acceptable size
+        pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
+        pseudo_pdf = StringIO(pdf_content)
+        ctrl = self.browser.getControl(name='form.refereeform')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
+        self.browser.getControl("Save").click() # submit form
+        # Even though the form could not be saved ...
+        self.assertTrue('Required input is missing' in self.browser.contents)
+        # ... the file has been successfully uploaded
+        pdf_url = self.edit_path.replace('edit', 'refereeform.pdf')
+        self.browser.open(pdf_url)
+        self.assertEqual(
+            self.browser.headers['content-type'], 'application/pdf')
+        self.assertEqual(len(self.browser.contents), 307200)
+        # There is really a file stored for the applicant
+        storage = getUtility(IExtFileStore)
+        file_id = IFileStoreNameChooser(self.applicant).chooseName(
+            attr='refereeform.pdf')
+        # The stored file can be fetched
+        fd = storage.getFile(file_id)
+        file_len = len(fd.read())
+        self.assertEqual(file_len, 307200)
+        # A file link is displayed on the edit view ...
+        self.browser.open(self.edit_path)
+        self.assertTrue('<a href="refereeform.pdf">' in self.browser.contents)
+        # ... and on the dislay view
+        self.browser.open(self.view_path)
+        self.assertTrue('<a href="refereeform.pdf">Referee\'s Form</a>'
+            in self.browser.contents)
+
+    def test_upload_refereeform_by_manager(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.manage_path)
+        # Create a pseudo file with acceptable size
+        pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
+        pseudo_pdf = StringIO(pdf_content)
+        ctrl = self.browser.getControl(name='form.refereeform')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
+        self.browser.getControl("Save").click() # submit form
+        # Even though the form could not be saved ...
+        self.assertTrue('Required input is missing' in self.browser.contents)
+        # ... the file has been successfully uploaded
+        pdf_url = self.manage_path.replace('manage', 'refereeform.pdf')
+        self.browser.open(pdf_url)
+        self.assertEqual(
+            self.browser.headers['content-type'], 'application/pdf')
+        self.assertEqual(len(self.browser.contents), 307200)
+        # There is rally a file stored for the applicant
+        storage = getUtility(IExtFileStore)
+        file_id = IFileStoreNameChooser(self.applicant).chooseName(
+            attr='refereeform.pdf')
+        # The stored file can be fetched
+        fd = storage.getFile(file_id)
+        file_len = len(fd.read())
+        self.assertEqual(file_len, 307200)
+        # A file link is displayed on the edit view ...
+        self.browser.open(self.manage_path)
+        self.assertTrue('<a href="refereeform.pdf">' in self.browser.contents)
+        # ... and on the dislay view
+        self.browser.open(self.view_path)
+        self.assertTrue('<a href="refereeform.pdf">Referee\'s Form</a>'
+            in self.browser.contents)
+        # Adding file is properly logged
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'applicants.log')
+        logcontent = open(logfile).read()
+        self.assertTrue(
+            'zope.mgr - waeup.futminna.applicants.browser.CustomApplicantManageFormPage'
+            ' - %s - saved: refereeform'
+            % (self.applicant.applicant_id)
+            in logcontent)
