Index: main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 9056)
+++ main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 9057)
@@ -18,211 +18,6 @@
 """UI components for basic applicants and related components.
 """
-import grok
-from zope.component import getUtility
-from zope.i18n import translate
-from zope.formlib.textwidgets import BytesDisplayWidget
-from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
-from waeup.kofa.students.interfaces import IStudentsUtils
-from waeup.kofa.applicants.interfaces import (
-    IApplicantRegisterUpdate, IApplicant, IApplicantEdit)
-from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
-    ExportPDFPage,
-    ApplicantManageFormPage, ApplicantEditFormPage,
-    ApplicantRegistrationPage, ApplicantAddFormPage,
-    OnlinePaymentDisplayFormPage, ApplicationFeePaymentAddPage,
-    OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage,
-    ApplicantBaseDisplayFormPage)
-from waeup.kofa.applicants.viewlets import (
-    PaymentReceiptActionButton, PDFActionButton)
-from waeup.kofa.applicants.pdf import PDFApplicationSlip
-from waeup.uniben.applicants.interfaces import (
-    ICustomPGApplicant, ICustomUGApplicant, ICustomPGApplicantEdit, ICustomUGApplicantEdit,
-    ICustomApplicantOnlinePayment, IPUTMEApplicantEdit,
-    UG_OMIT_DISPLAY_FIELDS,
-    UG_OMIT_PDF_FIELDS,
-    UG_OMIT_MANAGE_FIELDS,
-    UG_OMIT_EDIT_FIELDS,
-    PG_OMIT_DISPLAY_FIELDS,
-    PG_OMIT_PDF_FIELDS,
-    PG_OMIT_MANAGE_FIELDS,
-    PG_OMIT_EDIT_FIELDS,
-    PUTME_OMIT_DISPLAY_FIELDS,
-    PUTME_OMIT_PDF_FIELDS,
-    PUTME_OMIT_MANAGE_FIELDS,
-    PUTME_OMIT_EDIT_FIELDS,
-    PUTME_OMIT_RESULT_SLIP_FIELDS,
-    PUDE_OMIT_DISPLAY_FIELDS,
-    PUDE_OMIT_PDF_FIELDS,
-    PUDE_OMIT_MANAGE_FIELDS,
-    PUDE_OMIT_EDIT_FIELDS,
-    PUDE_OMIT_RESULT_SLIP_FIELDS,
-    )
-from waeup.uniben.interfaces import MessageFactory as _
+from waeup.kofa.applicants.browser import ApplicantRegistrationPage
 
-class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb):
-    """A breadcrumb for payments.
-    """
-    grok.context(ICustomApplicantOnlinePayment)
-
-class PaymentReceiptActionButton(PaymentReceiptActionButton):
-    grok.order(4)
-    grok.context(ICustomApplicantOnlinePayment)
-
-class PDFActionButton(PDFActionButton):
-
-    @property
-    def text(self):
-        if getattr(self.context, 'result_uploaded', False):
-            return _('Download result slip')
-        return _('Download application slip')
-
-
-class CustomApplicantDisplayFormPage(ApplicantDisplayFormPage):
-    """A display view for applicant data.
-    """
-
-    @property
-    def form_fields(self):
-        target = getattr(self.context.__parent__, 'prefix', None)
-        if target is not None and target.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGApplicant)
-            for field in PG_OMIT_DISPLAY_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('putme'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in PUTME_OMIT_DISPLAY_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('pude'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in PUDE_OMIT_DISPLAY_FIELDS:
-                form_fields = form_fields.omit(field)
-        else:
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in UG_OMIT_DISPLAY_FIELDS:
-                form_fields = form_fields.omit(field)
-        form_fields['perm_address'].custom_widget = BytesDisplayWidget
-        form_fields['notice'].custom_widget = BytesDisplayWidget
-        return form_fields
-
-class CustomPDFApplicationSlip(PDFApplicationSlip):
-
-    def _reduced_slip(self):
-        return getattr(self.context, 'result_uploaded', False)
-
-    @property
-    def note(self):
-        target = getattr(self.context.__parent__, 'prefix', None)
-        if target is not None and not target.startswith('pg') \
-            and not self._reduced_slip():
-            return _(u'<br /><br /><br />'
-                      'Comfirm your exam venue 72 hours to the exam.')
-        return
-
-    @property
-    def form_fields(self):
-        target = getattr(self.context.__parent__, 'prefix', None)
-        if target is not None and target.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGApplicant)
-            for field in PG_OMIT_PDF_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('putme'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            if self._reduced_slip():
-                for field in PUTME_OMIT_RESULT_SLIP_FIELDS:
-                    form_fields = form_fields.omit(field)
-            else:
-                for field in PUTME_OMIT_PDF_FIELDS:
-                    form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('pude'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            if self._reduced_slip():
-                for field in PUDE_OMIT_RESULT_SLIP_FIELDS:
-                    form_fields = form_fields.omit(field)
-            else:
-                for field in PUDE_OMIT_PDF_FIELDS:
-                    form_fields = form_fields.omit(field)
-        else:
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in UG_OMIT_PDF_FIELDS:
-                form_fields = form_fields.omit(field)
-        if not getattr(self.context, 'student_id'):
-            form_fields = form_fields.omit('student_id')
-        return form_fields
-
-class CustomApplicantManageFormPage(ApplicantManageFormPage):
-    """A full edit view for applicant data.
-    """
-    
-    @property
-    def form_fields(self):
-        target = getattr(self.context.__parent__, 'prefix', None)
-        if target is not None and target.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGApplicant)
-            for field in PG_OMIT_MANAGE_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('putme'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in PUTME_OMIT_MANAGE_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('pude'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in PUDE_OMIT_MANAGE_FIELDS:
-                form_fields = form_fields.omit(field)
-        else:
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in UG_OMIT_MANAGE_FIELDS:
-                form_fields = form_fields.omit(field)
-        form_fields['student_id'].for_display = True
-        form_fields['applicant_id'].for_display = True
-        return form_fields
-
-class CustomApplicantEditFormPage(ApplicantEditFormPage):
-    """An applicant-centered edit view for applicant data.
-    """
-
-    @property
-    def form_fields(self):
-        target = getattr(self.context.__parent__, 'prefix', None)
-        if target is not None and target.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGApplicantEdit)
-            for field in PG_OMIT_EDIT_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('putme'):
-            form_fields = grok.AutoFields(IPUTMEApplicantEdit)
-            for field in PUTME_OMIT_EDIT_FIELDS:
-                form_fields = form_fields.omit(field)
-        elif target is not None and target.startswith('pude'):
-            form_fields = grok.AutoFields(ICustomUGApplicant)
-            for field in PUDE_OMIT_EDIT_FIELDS:
-                form_fields = form_fields.omit(field)
-        else:
-            form_fields = grok.AutoFields(ICustomUGApplicantEdit)
-            for field in UG_OMIT_EDIT_FIELDS:
-                form_fields = form_fields.omit(field)
-        form_fields['applicant_id'].for_display = True
-        form_fields['reg_number'].for_display = True
-        return form_fields
-
-class CustomOnlinePaymentDisplayFormPage(OnlinePaymentDisplayFormPage):
-    """ Page to view an online payment ticket
-    """
-    grok.context(ICustomApplicantOnlinePayment)
-    # We temporarily omit r_company since this attribute was not set in 2012
-    form_fields = grok.AutoFields(ICustomApplicantOnlinePayment).omit(
-        'ac', 'r_company')
-    form_fields[
-        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-    form_fields[
-        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-
-class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
-    """Deliver a PDF slip of the context.
-    """
-    grok.context(ICustomApplicantOnlinePayment)
-    # We temporarily omit r_company since this attribute was not set in 2012
-    form_fields = grok.AutoFields(ICustomApplicantOnlinePayment).omit(
-        'ac', 'r_company')
-    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
 
 class CustomApplicantRegistrationPage(ApplicantRegistrationPage):
Index: main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py	(revision 9056)
+++ main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py	(revision 9057)
@@ -36,22 +36,4 @@
     INigeriaApplicantUpdateByRegNo,
     IPUTMEApplicantEdit,
-    UG_OMIT_DISPLAY_FIELDS,
-    UG_OMIT_PDF_FIELDS,
-    UG_OMIT_MANAGE_FIELDS,
-    UG_OMIT_EDIT_FIELDS,
-    PG_OMIT_DISPLAY_FIELDS,
-    PG_OMIT_PDF_FIELDS,
-    PG_OMIT_MANAGE_FIELDS,
-    PG_OMIT_EDIT_FIELDS,
-    PUTME_OMIT_DISPLAY_FIELDS,
-    PUTME_OMIT_PDF_FIELDS,
-    PUTME_OMIT_MANAGE_FIELDS,
-    PUTME_OMIT_EDIT_FIELDS,
-    PUTME_OMIT_RESULT_SLIP_FIELDS,
-    PUDE_OMIT_DISPLAY_FIELDS,
-    PUDE_OMIT_PDF_FIELDS,
-    PUDE_OMIT_MANAGE_FIELDS,
-    PUDE_OMIT_EDIT_FIELDS,
-    PUDE_OMIT_RESULT_SLIP_FIELDS,
     )
 from waeup.uniben.interfaces import MessageFactory as _
