Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 17884)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 17885)
@@ -1167,5 +1167,66 @@
     grok.require('waeup.uploadStudentFile')
     grok.template('affidavituploadpage')
-    label = _('Upload affidavit of good behavior')
+    label = _('Upload affidavit of good conduct')
     deletion_warning = _('Are you sure?')
     pnav = 4
+
+class ExportPDFAffidavitSlip(UtilityView, grok.View):
+    """Deliver a affidavit PDF template.
+    """
+    grok.context(ICustomStudent)
+    grok.name('affidavit_good_conduct.pdf')
+    grok.require('waeup.viewStudent')
+    prefix = 'form'
+
+    omit_fields = ('date_of_birth', 'current_level', 'certificate',
+        'current_mode', 'entry_session')
+
+    form_fields = grok.AutoFields(ICustomStudentBase).select('student_id', 'matric_number')
+
+    pre_text = ' '
+
+    post_text = '''
+To undertake as follows:
+
+(i) to abide by the arrangement(s) put in place by the University Management for the
+supply, distribution and utilization of electricity on the campuses of the
+University of Benin;
+
+(ii) to pay outstanding school charges upon resumption as eligibility for examinations
+will henceforth be strictly based on presentation of evidence of payment of approved
+school charges;
+
+(iii) not to bring any prohibited appliances, such as hot plate, ring boiler,
+gas cooker etc into the Halls of Residence, as violation of this rule shall attract
+rustication of such a Student;
+
+(iv) not to be involved in any unruly conduct that is against the Rules and
+Regulations of the University; and
+
+(v) to be of good conduct, and not to sponsor or participate in any unauthorized
+assembly or demonstration within the campuses and their precincts.
+
+
+
+
+
+________________________________
+Student Signature
+
+'''
+
+    @property
+    def label(self):
+        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+        return 'Affidavit of Undertaking to be of Good Conduct'
+            
+    def render(self):
+        students_utils = getUtility(IStudentsUtils)
+        letterhead_path = os.path.join(
+            os.path.dirname(__file__), 'static', 'letterhead.jpg')
+        if not os.path.exists(letterhead_path):
+            letterhead_path = None
+        return students_utils.renderPDFAdmissionLetter(self,
+            self.context.student, omit_fields=self.omit_fields,
+            letterhead_path=letterhead_path,
+            pre_text=self.pre_text, post_text=self.post_text)
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/affidavituploadpage.pt
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/affidavituploadpage.pt	(revision 17884)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/affidavituploadpage.pt	(revision 17885)
@@ -1,5 +1,6 @@
 <form action="." tal:attributes="action request/URL" method="post"
       enctype="multipart/form-data" i18n:domain="waeup.kofa">
-  <p></p>
+  <p>Download your personal 'Affidavit of Good Conduct' form,
+  scan the signed form into a pdf file and re-upload here.</p>
   <table class="form-table">
     <tbody>
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 17884)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 17885)
@@ -1298,2 +1298,16 @@
         print "Sample PDF fee_payment_history.pdf written to %s" % path
         return
+
+    def test_affidavit_slip(self):
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.getLink("Base Data").click()
+        self.browser.getLink("Upload affidavit of good conduct").click()
+        self.browser.getLink("Download affidavit of good conduct form").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'affidavit_good_conduct.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF affidavit_good_conduct.pdf written to %s" % path
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 17884)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 17885)
@@ -39,5 +39,6 @@
 
 from waeup.uniben.students.browser import (
-    StudentMedicalHistoryEditFormPage, StudentAffidavitUploadPage)
+    StudentMedicalHistoryEditFormPage, StudentAffidavitUploadPage,
+    StudentAffidavitUploadPage)
 
 from kofacustom.nigeria.interfaces import MessageFactory as _
@@ -271,5 +272,5 @@
     grok.require('waeup.handleStudent')
     icon = 'actionicon_signature.png'
-    text = _('Upload affidavit of good behavior')
+    text = _('Upload affidavit of good conduct')
     target = 'affidavit_upload'
 
@@ -281,6 +282,15 @@
     grok.view(StudentBaseDisplayFormPage)
     grok.require('waeup.viewStudent')
-    label = _(u'Scanned Affidavit of Good Behavior')
+    label = _(u'Scanned Affidavit of Good Conduct')
     download_name = u'affidavit.pdf'
+
+class AffidavitSlipActionButton(ManageActionButton):
+    grok.order(1)
+    grok.context(ICustomStudent)
+    grok.view(StudentAffidavitUploadPage)
+    grok.require('waeup.viewStudent')
+    icon = 'actionicon_pdf.png'
+    text = _('Download affidavit of good conduct form')
+    target = 'affidavit_good_conduct.pdf'
 
 class AffidavitUploadManage(StudentFileUpload):
@@ -291,14 +301,14 @@
     grok.view(StudentBaseManageFormPage)
     grok.require('waeup.manageStudent')
-    label = _(u'Scanned Affidavit of Good Behavior (pdf only)')
+    label = _(u'Scanned Affidavit of Good Conduct (pdf only)')
     download_name = u'affidavit.pdf'
 
 class AffidavitUploadEdit(AffidavitUploadManage):
-    """Affidavit of Good Behavior upload viewlet for students.
+    """Affidavit of Good Conduct upload viewlet for students.
     """
     grok.view(StudentAffidavitUploadPage)
     grok.require('waeup.uploadStudentFile')
 
-class AffidavitGoodBehavior(StudentImage):
+class AffidavitGoodConduct(StudentImage):
     """Renders pdf slip.
     """
