Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/applicant.py
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/applicant.py	(revision 15942)
+++ main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/applicant.py	(revision 15947)
@@ -27,12 +27,4 @@
     ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, IPUTMEApplicantEdit)
 
-@grok.subscribe(ICustomApplicant, grok.IObjectRemovedEvent)
-def custom_handle_applicant_removed(applicant, event):
-    """If an applicant is removed also pdf files of this applicant are removed.
-    """
-    file_store = getUtility(IExtFileStore)
-    file_store.deleteFileByContext(applicant, attr='res_stat.pdf')
-    return
-
 class CustomApplicant(NigeriaApplicant):
 
Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py	(revision 15942)
+++ main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py	(revision 15947)
@@ -26,5 +26,5 @@
 from waeup.kofa.utils.helpers import string_from_bytes, file_size, now
 from waeup.kofa.applicants.browser import (
-    ApplicantRegistrationPage, ApplicantsContainerPage)
+    ApplicantRegistrationPage, ApplicantsContainerPage, AdditionalFile)
 from waeup.kofa.applicants.interfaces import (
     ISpecialApplicant, IApplicantsContainer)
@@ -78,27 +78,4 @@
     'aggregate')
 
-def handle_file_upload(upload, context, view, attr=None):
-    """Handle upload of applicant files.
-
-    Returns `True` in case of success or `False`.
-
-    Please note that file pointer passed in (`upload`) most probably
-    points to end of file when leaving this function.
-    """
-    size = file_size(upload)
-    if size > MAX_FILE_UPLOAD_SIZE:
-        view.flash(_('Uploaded file is too big!'))
-        return False
-    dummy, ext = os.path.splitext(upload.filename)
-    ext.lower()
-    if ext != '.pdf':
-        view.flash(_('pdf file extension expected.'))
-        return False
-    upload.seek(0) # file pointer moved when determining size
-    store = getUtility(IExtFileStore)
-    file_id = IFileStoreNameChooser(context).chooseName(attr=attr)
-    store.createFile(file_id, upload)
-    return True
-
 class CustomApplicantsContainerPage(ApplicantsContainerPage):
     """The standard view for regular applicant containers.
@@ -121,14 +98,4 @@
     """A display view for applicant data.
     """
-
-    @property
-    def file_links(self):
-        html = ''
-        pdf = getUtility(IExtFileStore).getFileByContext(
-            self.context, attr='res_stat.pdf')
-        if pdf:
-            html += '<a href="%s">Statement of Result</a>' % self.url(
-                self.context, 'res_stat.pdf')
-        return html
 
     @property
@@ -172,21 +139,13 @@
         return form_fields
 
-    def update(self):
-        super(CustomApplicantManageFormPage, self).update()
-        upload_res_stat = self.request.form.get('form.res_stat', None)
-        if upload_res_stat:
-            # We got a fresh res_stat upload
-            success = handle_file_upload(
-                upload_res_stat, self.context, self, attr='res_stat.pdf')
-            if success:
-                self.context.writeLogMessage(self, 'saved: res_stat')
-            else:
-                self.upload_success = False
-        self.max_file_upload_size = string_from_bytes(MAX_FILE_UPLOAD_SIZE)
-        return
-
 class CustomApplicantEditFormPage(NigeriaApplicantEditFormPage):
     """An applicant-centered edit view for applicant data.
     """
+
+    def display_fileupload(self, filename):
+        if filename[1] == 'res_stat.pdf':
+            if self.context.subtype != 'transfer':
+                return False
+        return True
 
     def dataNotComplete(self, data):
@@ -217,21 +176,4 @@
         return form_fields
 
-    def update(self):
-        if self.context.locked or (
-            self.context.__parent__.expired and
-            self.context.__parent__.strict_deadline):
-            self.emit_lock_message()
-            return
-        super(CustomApplicantEditFormPage, self).update()
-        upload_res_stat = self.request.form.get('form.res_stat', None)
-        if upload_res_stat:
-            # We got a fresh res_stat upload
-            success = handle_file_upload(
-                upload_res_stat, self.context, self, attr='res_stat.pdf')
-            if not success:
-                self.upload_success = False
-        self.max_file_upload_size = string_from_bytes(MAX_FILE_UPLOAD_SIZE)
-        return
-
 class CustomPDFApplicationSlip(NigeriaPDFApplicationSlip):
 
@@ -256,14 +198,11 @@
         return form_fields
 
-class ResultStatement(grok.View):
+class ResultStatement(AdditionalFile):
     """Renders the pdf form extension for applicants.
     """
     grok.name('res_stat.pdf')
-    grok.context(ICustomApplicant)
-    grok.require('waeup.viewApplication')
-
-    def render(self):
-        pdf = getUtility(IExtFileStore).getFileByContext(
-            self.context, attr='res_stat.pdf')
-        self.response.setHeader('Content-Type', 'application/pdf')
-        return pdf
+
+class JAMBResult(AdditionalFile):
+    """Renders the pdf form extension for applicants.
+    """
+    grok.name('jamb.pdf')
Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser_templates/applicantdisplaypage.pt
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser_templates/applicantdisplaypage.pt	(revision 15942)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<h2 i18n:domain="waeup.kofa">
-  ...
-  <span tal:replace="context/translated_state">APPLICATIONSTATE
-  </span>
-  <span tal:omit-tag=""
-    i18n:translate="" tal:condition="context/suspended">(account suspended)
-  </span>
-  ...
-</h2>
-
-<div class="workflow">
-  <div tal:repeat="msg context/history/messages">
-    <span tal:replace="msg">MESSAGE</span><br />
-  </div>
-</div>
-
-<img tal:condition="python: context.__parent__.with_picture"
-     src="" height="180px" tal:attributes="src view/passport_url" />
-
-<table i18n:domain="waeup.kofa" class="form-table">
-  <tbody>
-    <tal:files tal:condition="python: view.context.subtype == 'transfer'">
-      <tr>
-        <td class="separator" colspan=2>
-          Files
-        </td>
-      </tr>
-      <tr>
-        <td colspan=2>
-          <span tal:replace="structure view/file_links" />
-        </td>
-      </tr>
-    </tal:files>
-    <tal:widgets content="structure provider:widgets" />
-    <tr tal:condition="view/getCourseAdmitted">
-      <td class="fieldname" i18n:translate="">
-          Admitted Course of Study:
-      </td>
-      <td>
-        <span tal:replace="structure view/getCourseAdmitted" />
-      </td>
-    </tr>
-    <tr>
-      <td class="fieldname" i18n:translate="">
-          Password:
-      </td>
-      <td>
-          <tal:password replace="view/hasPassword" />
-      </td>
-    <tr>
-  </tbody>
-</table>
-<tal:payments condition="view/display_payments">
-  <h3 i18n:domain="waeup.kofa" i18n:translate="">
-      Payment Tickets
-  </h3>
-  <table i18n:domain="waeup.kofa" class="table table-condensed">
-    <thead>
-      <tr>
-        <th i18n:translate="">Payment Id</th>
-        <th i18n:translate="">Creation Date</th>
-        <th i18n:translate="">Payment Date</th>
-        <th i18n:translate="">Category</th>
-        <th i18n:translate="">Item</th>
-        <th i18n:translate="">State</th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr tal:repeat="value context/payments">
-        <td> <a tal:attributes="href python:view.url(value)">
-        <span tal:content="value/p_id">PID</span></a></td>
-        <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td>
-        <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td>
-        <td tal:content ="value/category">CATEGORY</td>
-        <td tal:content ="value/display_item">ITEM</td>
-        <td tal:content ="value/p_state_title">STATE</td>
-      </tr>
-    </tbody>
-  </table>
-</tal:payments>
Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser_templates/applicanteditpage.pt
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser_templates/applicanteditpage.pt	(revision 15942)
+++ 	(revision )
@@ -1,191 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="post"
-      i18n:domain="waeup.kofa" enctype="multipart/form-data"
-      autocomplete="off">
-
-  <h2 i18n:domain="waeup.kofa" tal:condition="context/translated_state">
-    ...
-    <span tal:replace="context/translated_state">APPLICATIONSTATE
-    </span>
-    <span tal:omit-tag=""
-      i18n:translate="" tal:condition="context/suspended">(account suspended)
-    </span>
-    ...
-  </h2>
-
-  <div class="workflow" tal:condition="context/history">
-    <div tal:repeat="msg context/history/messages">
-      <span tal:replace="msg">MESSAGE</span><br />
-    </div>
-  </div>
-
-  <table class="form-table">
-    <tbody>
-      <tal:widgets content="structure provider:widgets" />
-      <tr tal:condition="python: context.__parent__.with_picture">
-        <td class="fieldname" i18n:translate="">
-          Passport Photo:
-        </td>
-        <td>
-          <img src="passport.jpg" height="180px" /><br />
-          <br />
-      		<div class="input-group half">
-      			<div class="input-group-btn">
-      				<div class="btn btn-default btn-file">
-                Select&hellip;
-                <input type="file" name="form.passport" />
-              </div>
-      			</div>
-      			<input type="text" class="form-control" readonly>
-          </div>
-          <span i18n:translate="">
-            Max. file size:
-          </span>
-          <span tal:replace="view/max_upload_size">10 KB</span>
-      </tr>
-      <tr tal:condition="python: view.context.subtype == 'transfer'">
-        <td class="fieldname" i18n:translate="">
-          Statement of Result:
-        </td>
-        <td>
-          <p tal:condition="python: view.file_exists('res_stat.pdf')">
-            <a href="res_stat.pdf"
-               i18n:translate="">
-              Download pdf file
-            </a>
-          </p>
-          <div class="input-group half">
-            <div class="input-group-btn">
-              <div class="btn btn-default btn-file">
-                Select&hellip;
-              <input type="file" name="form.res_stat" />
-              </div>
-            </div>
-            <input type="text" class="form-control" readonly>
-          </div>
-          <span i18n:translate="">
-            PDF files only. Max. file size:
-          </span>
-          <span tal:replace="view/max_file_upload_size">10 KB</span>
-      </tr>
-      <tr tal:condition="view/manage_applications">
-        <td class="fieldname" i18n:translate="">Password:</td>
-        <td>
-          <input class="form-control" name="password" type="password"  />
-        </td>
-      </tr>
-      <tr tal:condition="view/manage_applications">
-        <td class="fieldname" i18n:translate="">Retype Password:</td>
-        <td>
-          <input class="form-control" name="control_password" type="password" />
-        </td>
-      </tr>
-      <tr tal:condition="view/manage_applications">
-        <td class="fieldname" i18n:translate="">Application Transition:</td>
-        <td>
-          <select id="transition" name="transition" class="form-control half">
-            <option tal:repeat="transition view/getTransitions"
-                    tal:attributes="value transition/name">
-              <span tal:replace="transition/title">TRANSITIONTITLE</span>
-            </option>
-          </select>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-
-  <div tal:condition="python: not view.manage_applications
-                              and context.__parent__.with_picture">
-    <input id="confirm_passport" name="confirm_passport"
-           type="checkbox" value="True"/>&nbsp;&nbsp;
-    <span i18n:translate="">
-    I confirm that the Passport Photograph uploaded on this form is a
-    true picture of me.
-    </span>
-  </div>
-  <br />
-
-  <div tal:condition="view/availableActions">
-    <span tal:repeat="action view/actions"
-          tal:omit-tag="">
-      <input tal:condition="python:action.label in view.display_actions[0]"
-             tal:replace="structure action/render"/>
-    </span>
-  </div>
-
-  <tal:refereereports condition="view/display_refereereports">
-    <br /><br />
-    <h3 i18n:translate="">
-        Referee Reports
-    </h3>
-    <table i18n:domain="waeup.kofa" class="table table-condensed">
-      <thead>
-      <tr>
-        <th i18n:translate="">Report Id</th>
-        <th i18n:translate="">Creation Date</th>
-        <th i18n:translate="">Referee</th>
-        <th i18n:translate="">Email Address</th>
-      </tr>
-      </thead>
-      <tbody>
-        <tr tal:repeat="cl context/refereereports">
-          <td> <a tal:attributes="href python:view.url(cl)">
-            <span tal:content="cl/r_id">RID</span></a></td>
-          <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td>
-          <td tal:content="cl/name">REFEREE</td>
-          <td tal:content="cl/email">EMAIL</td>
-        </tr>
-      </tbody>
-    </table>
-  </tal:refereereports>
-
-  <tal:payments condition="view/display_payments">
-    <br /><br />
-    <h3 i18n:translate="">
-        Payment Tickets
-    </h3>
-
-    <table i18n:domain="waeup.kofa" class="table table-condensed">
-      <thead>
-      <tr>
-        <th>&nbsp;</th>
-        <th i18n:translate="">Payment Id</th>
-        <th i18n:translate="">Creation Date</th>
-        <th i18n:translate="">Payment Date</th>
-        <th i18n:translate="">Category</th>
-        <th i18n:translate="">Item</th>
-        <th i18n:translate="">State</th>
-      </tr>
-      </thead>
-      <tbody>
-        <tr tal:repeat="cl context/payments">
-          <td>
-           <input type="checkbox"  name="val_id"
-           tal:attributes="value cl/__name__"
-           tal:condition="python: not view.unremovable(cl)" />
-          </td>
-          <td> <a tal:attributes="href python:view.url(cl)">
-          <span tal:content="cl/p_id">PID</span></a></td>
-          <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td>
-          <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td>
-          <td tal:content ="cl/category">CATEGORY</td>
-          <td tal:content ="cl/display_item">ITEM</td>
-          <td tal:content ="cl/p_state_title">STATE</td>
-        </tr>
-      </tbody>
-    </table>
-
-    <div tal:condition="view/availableActions">
-      <span tal:repeat="action view/actions"
-            tal:omit-tag="">
-        <input tal:condition="python:action.label in view.display_actions[1]"
-               tal:replace="structure action/render"/>
-      </span>
-    </div>
-    <br />
-    <p i18n:translate="" tal:condition="context/special">
-      <strong>Notice:</strong> If you need to pay for another service,
-      select the corresponding special application category above,
-      click 'Save' and then 'Add online payment ticket' again.
-    </p>
-  </tal:payments>
-</form>
Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py	(revision 15942)
+++ main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py	(revision 15947)
@@ -134,5 +134,5 @@
         pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
         pseudo_pdf = StringIO(pdf_content)
-        ctrl = self.browser.getControl(name='form.res_stat')
+        ctrl = self.browser.getControl(name='res_stat.pdf')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
@@ -167,5 +167,5 @@
         self.assertTrue(
             'zope.mgr - kofacustom.iuokada.applicants.browser.CustomApplicantManageFormPage'
-            ' - %s - saved: res_stat'
+            ' - %s - saved: res_stat.pdf'
             % (self.transapplicant.applicant_id)
             in logcontent)
Index: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/utils.py
===================================================================
--- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/utils.py	(revision 15942)
+++ main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/utils.py	(revision 15947)
@@ -30,7 +30,6 @@
     """
 
-    #: A tuple of names of files to be copied over
-    #: to students section.
-    FILENAMES = ('res_stat.pdf',)
+    ADDITIONAL_FILES = (('Statement of Result','res_stat.pdf'),
+                 ('JAMB Result','jamb.pdf'))
 
     APP_TYPES_DICT = {
