Index: /main/kofacustom.nigeria/trunk/etc/paypal-testing.conf
===================================================================
--- /main/kofacustom.nigeria/trunk/etc/paypal-testing.conf	(revision 17811)
+++ /main/kofacustom.nigeria/trunk/etc/paypal-testing.conf	(revision 17811)
@@ -0,0 +1,9 @@
+# paypal credentials
+
+[rest-client]
+# id and secret you got from PayPal (long hex strings)
+id = invalid
+secret = invalid
+
+# valid values: sandbox, live
+mode = sandbox
Index: in/kofacustom.nigeria/trunk/etc/paypal-testing.conf-sample
===================================================================
--- /main/kofacustom.nigeria/trunk/etc/paypal-testing.conf-sample	(revision 17810)
+++ 	(revision )
@@ -1,9 +1,0 @@
-# paypal credentials
-
-[rest-client]
-# id and secret you got from PayPal (long hex strings)
-id = invalid
-secret = invalid
-
-# valid values: sandbox, live
-mode = sandbox
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py	(revision 17810)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py	(revision 17811)
@@ -248,22 +248,4 @@
         'flash_notice')
 
-class NigeriaStudentFilesUploadPage(StudentFilesUploadPage):
-    """ View to upload passport picture.
-
-    Students are not allowed to change the picture if they
-    passed the regular Kofa application.
-    """
-
-    def update(self):
-        # Passport pictures must not be editable if application slip
-        # exists.
-        slip = getUtility(IExtFileStore).getFileByContext(
-            self.context, 'application_slip')
-        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
-        if self.context.state not in PORTRAIT_CHANGE_STATES or slip is not None:
-            emit_lock_message(self)
-            return
-        return
-
 class ClearStudentFinancially(UtilityView, grok.View):
     """ Clear student financially by financial clearance officer
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py	(revision 17810)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/utils.py	(revision 17811)
@@ -17,4 +17,6 @@
 ##
 import grok
+from zope.component import getUtility
+from waeup.kofa.interfaces import IExtFileStore
 from waeup.kofa.students.utils import StudentsUtils
 from kofacustom.nigeria.interfaces import MessageFactory as _
@@ -41,2 +43,15 @@
     # Maximum size of upload files in kB
     MAX_KB = 250
+
+    def allowPortraitChange(self, student):
+        """Check if student is allowed to change the portrait file.
+        """
+        # Passport pictures must not be editable if application slip
+        # exists. Students are not allowed to change the picture if they passed
+        # the regular Kofa application.
+        slip = getUtility(IExtFileStore).getFileByContext(
+            student, 'application_slip')
+        if student.state not in self.PORTRAIT_CHANGE_STATES or slip is not None:
+            return False
+        return True
+
Index: /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/viewlets.py
===================================================================
--- /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/viewlets.py	(revision 17810)
+++ /main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/viewlets.py	(revision 17811)
@@ -41,17 +41,4 @@
     return False
 
-class StudentPassportActionButton(StudentPassportActionButton):
-
-    @property
-    def target_url(self):
-        # Passport pictures must not be editable if application slip
-        # exists.
-        slip = getUtility(IExtFileStore).getFileByContext(
-            self.context, 'application_slip')
-        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
-        if self.context.state not in PORTRAIT_CHANGE_STATES or slip is not None:
-            return ''
-        return self.view.url(self.view.context, self.target)
-
 class PaymentReceiptActionButton(PaymentReceiptActionButton):
     grok.order(4)
