Index: in/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 8899)
+++ 	(revision )
@@ -1,212 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-import grok
-from zope.formlib.textwidgets import BytesDisplayWidget
-from zope.component import getUtility
-from zope.i18n import translate
-from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
-from waeup.kofa.interfaces import IExtFileStore
-from waeup.kofa.browser.layout import action
-from waeup.kofa.students.browser import (
-    StudentPersonalDisplayFormPage,
-    StudentClearanceManageFormPage, StudentClearanceEditFormPage,
-    StudentClearanceDisplayFormPage, OnlinePaymentFakeApprovePage,
-    ExportPDFClearanceSlipPage, StudentBaseManageFormPage,
-    StudentBaseEditFormPage, StudentPersonalEditFormPage,
-    OnlinePaymentDisplayFormPage, OnlinePaymentAddFormPage,
-    OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage,
-    StudentFilesUploadPage, emit_lock_message)
-from waeup.kofa.students.viewlets import (
-    PaymentReceiptActionButton, StudentPassportActionButton)
-from waeup.uniben.students.interfaces import (
-    ICustomStudentBase, ICustomStudent, ICustomStudentPersonal,
-    ICustomUGStudentClearance,ICustomPGStudentClearance,
-    ICustomStudentOnlinePayment,
-    )
-from waeup.kofa.students.workflow import ADMITTED
-from waeup.uniben.interfaces import MessageFactory as _
-
-class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb):
-    """A breadcrumb for payments.
-    """
-    grok.context(ICustomStudentOnlinePayment)
-
-class PaymentReceiptActionButton(PaymentReceiptActionButton):
-    grok.order(4)
-    grok.context(ICustomStudentOnlinePayment)
-
-class CustomStudentBaseManageFormPage(StudentBaseManageFormPage):
-    """ View to manage student base data
-    """
-    form_fields = grok.AutoFields(ICustomStudentBase).omit('student_id')
-
-class CustomStudentBaseEditFormPage(StudentBaseEditFormPage):
-    """ View to edit student base data
-    """
-    form_fields = grok.AutoFields(ICustomStudentBase).select(
-        'email', 'phone')
-
-
-class CustomStudentPersonalDisplayFormPage(StudentPersonalDisplayFormPage):
-    """ Page to display student personal data
-    """
-    grok.context(ICustomStudent)
-    form_fields = grok.AutoFields(ICustomStudentPersonal)
-    form_fields['perm_address'].custom_widget = BytesDisplayWidget
-
-
-class CustomStudentPersonalEditFormPage(StudentPersonalEditFormPage):
-    """ Page to edit personal data
-    """
-    form_fields = grok.AutoFields(ICustomStudentPersonal)
-
-
-class CustomStudentClearanceDisplayFormPage(StudentClearanceDisplayFormPage):
-    """ Page to display student clearance data
-    """
-    grok.context(ICustomStudent)
-
-    @property
-    def form_fields(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            form_fields = grok.AutoFields(
-                ICustomPGStudentClearance).omit('clearance_locked')
-        else:
-            form_fields = grok.AutoFields(
-                ICustomUGStudentClearance).omit('clearance_locked')
-        return form_fields
-
-class CustomExportPDFClearanceSlipPage(ExportPDFClearanceSlipPage):
-    """Deliver a PDF slip of the context.
-    """
-    grok.context(ICustomStudent)
-
-    @property
-    def form_fields(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            form_fields = grok.AutoFields(
-                ICustomPGStudentClearance).omit('clearance_locked')
-        else:
-            form_fields = grok.AutoFields(
-                ICustomUGStudentClearance).omit('clearance_locked')
-        return form_fields
-
-class CustomStudentClearanceManageFormPage(StudentClearanceManageFormPage):
-    """ Page to edit student clearance data
-    """
-    grok.context(ICustomStudent)
-
-    @property
-    def form_fields(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGStudentClearance)
-        else:
-            form_fields = grok.AutoFields(ICustomUGStudentClearance)
-        return form_fields
-
-class CustomStudentClearanceEditFormPage(StudentClearanceEditFormPage):
-    """ View to edit student clearance data by student
-    """
-    grok.context(ICustomStudent)
-
-    @property
-    def form_fields(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            form_fields = grok.AutoFields(ICustomPGStudentClearance).omit('clearance_locked')
-        else:
-            form_fields = grok.AutoFields(ICustomUGStudentClearance).omit('clearance_locked')
-        return form_fields
-
-    def dataNotComplete(self):
-        store = getUtility(IExtFileStore)
-        if not store.getFileByContext(self.context, attr=u'birth_certicicate.jpg'):
-            return _('No birth certificate uploaded.')
-        if not store.getFileByContext(self.context, attr=u'ref_let.jpg'):
-            return _('No referee letter uploaded.')
-        if not store.getFileByContext(self.context, attr=u'acc_let.jpg'):
-            return _('No acceptance letter uploaded.')
-        if not store.getFileByContext(self.context, attr=u'fst_sit_scan.jpg'):
-            return _('No first sitting result uploaded.')
-        return False
-
-class CustomOnlinePaymentDisplayFormPage(OnlinePaymentDisplayFormPage):
-    """ Page to view an online payment ticket
-    """
-    grok.context(ICustomStudentOnlinePayment)
-    form_fields = grok.AutoFields(ICustomStudentOnlinePayment)
-    form_fields[
-        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-    form_fields[
-        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-
-class CustomOnlinePaymentAddFormPage(OnlinePaymentAddFormPage):
-    """ Page to add an online payment ticket
-    """
-    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).select(
-        'p_category')
-
-class CustomOnlinePaymentFakeApprovePage(OnlinePaymentFakeApprovePage):
-    """ Disable payment approval view for students.
-
-    This view is used for browser tests only and
-    has to be neutralized here!
-    """
-
-    grok.name('fake_approve')
-    grok.require('waeup.managePortal')
-
-    def update(self):
-        return
-
-class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
-    """Deliver a PDF slip of the context.
-    """
-    grok.context(ICustomStudentOnlinePayment)
-    form_fields = grok.AutoFields(ICustomStudentOnlinePayment)
-    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
-
-class StudentPassportActionButton(StudentPassportActionButton):
-
-    @property
-    def target_url(self):
-        slip = getUtility(IExtFileStore).getFileByContext(
-            self.context, 'application_slip')
-        if self.context.state != ADMITTED or slip is not None:
-            return ''
-        return self.view.url(self.view.context, self.target)
-
-class CustomStudentFilesUploadPage(StudentFilesUploadPage):
-    """ View to upload passport picture.
-
-    Students are not allowed to change the picture if they
-    passed the regular Kofa application.
-    """
-
-    def update(self):
-        slip = getUtility(IExtFileStore).getFileByContext(
-            self.context, 'application_slip')
-        if self.context.state != ADMITTED or slip is not None:
-            emit_lock_message(self)
-            return
-        super(StudentFilesUploadPage, self).update()
-        return
Index: in/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 8899)
+++ 	(revision )
@@ -1,514 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-
-import grok
-from waeup.kofa.students.viewlets import (
-    FileDisplay, FileUpload, Image)
-from waeup.kofa.students.browser import ExportPDFClearanceSlipPage
-
-from waeup.uniben.interfaces import MessageFactory as _
-
-# LGA Identification
-
-class LGAIdentificationDisplay(FileDisplay):
-    """LGA Identification display viewlet.
-    """
-    grok.order(1)
-    label = _(u'LGA Identification')
-    title = _(u'LGA Identification Scan')
-    download_name = u'lga_ident'
-
-class LGAIdentificationSlip(LGAIdentificationDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class LGAIdentificationUpload(FileUpload):
-    """LGA Identification upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'LGA Identification')
-    title = _(u'LGA Identification Scan')
-    mus = 1024 * 150
-    download_name = u'lga_ident'
-
-class LGAIdentificationImage(Image):
-    """Renders LGA Identification scan.
-    """
-    grok.name('lga_ident')
-    download_name = u'lga_ident'
-
-# First Sitting Result
-
-class FirstSittingResultDisplay(FileDisplay):
-    """First Sitting Result display viewlet.
-    """
-    grok.order(1)
-    label = _(u'First Sitting Result')
-    title = _(u'First Sitting Result')
-    download_name = u'fst_sit_scan'
-
-class FirstSittingResultSlip(FirstSittingResultDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class FirstSittingResultUpload(FileUpload):
-    """First Sitting Result upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'First Sitting Result')
-    title = _(u'First Sitting Result Scan')
-    mus = 1024 * 150
-    download_name = u'fst_sit_scan'
-
-class FirstSittingResultImage(Image):
-    """Renders First Sitting Result scan.
-    """
-    grok.name('fst_sit_scan')
-    download_name = u'fst_sit_scan'
-
-# Second Sitting Result
-
-class SecondSittingResultDisplay(FileDisplay):
-    """Second Sitting Result display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Second Sitting Result')
-    title = _(u'Second Sitting Result')
-    download_name = u'scd_sit_scan'
-
-class SecondSittingResultSlip(SecondSittingResultDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class SecondSittingResultUpload(FileUpload):
-    """Second Sitting Result upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Second Sitting Result')
-    title = _(u'Second Sitting Result Scan')
-    mus = 1024 * 150
-    download_name = u'scd_sit_scan'
-
-class SecondSittingResultImage(Image):
-    """Renders Second Sitting Result scan.
-    """
-    grok.name('scd_sit_scan')
-    download_name = u'scd_sit_scan'
-
-# Higher Qualification Result
-
-class HigherQualificationResultDisplay(FileDisplay):
-    """Higher Qualification Result display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Higher Qualification Result')
-    title = _(u'Higher Qualification Result')
-    download_name = u'hq_scan'
-
-class HigherQualificationResultSlip(HigherQualificationResultDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class HigherQualificationResultUpload(FileUpload):
-    """Higher Qualification Result upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Higher Qualification Result')
-    title = _(u'Higher Qualification Result Scan')
-    mus = 1024 * 150
-    download_name = u'hq_scan'
-
-class HigherQualificationResultImage(Image):
-    """Renders Higher Qualification Result scan.
-    """
-    grok.name('hq_scan')
-    download_name = u'hq_scan'
-
-# 2nd Higher Qualification Result (PG Students only)
-
-class SecondHigherQualificationResultDisplay(FileDisplay):
-    """Second Higher Qualification Result display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Second Higher Qualification Result')
-    title = _(u'Second Higher Qualification Result')
-    download_name = u'hq_scan2'
-
-class SecondHigherQualificationResultSlip(SecondHigherQualificationResultDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class SecondHigherQualificationResultUpload(FileUpload):
-    """Second Higher Qualification Result upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Second Higher Qualification Result')
-    title = _(u'Second Higher Qualification Result Scan')
-    mus = 1024 * 150
-    download_name = u'hq_scan2'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class SecondHigherQualificationResultImage(Image):
-    """Renders Second Higher Qualification Result scan.
-    """
-    grok.name('hq_scan2')
-    download_name = u'hq_scan2'
-
-# Advanced Level Result
-
-class AdvancedLevelResultDisplay(FileDisplay):
-    """Advanced Level Result display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Advanced Level Result')
-    title = _(u'Advanced Level Result')
-    download_name = u'alr_scan'
-
-class AdvancedLevelResultSlip(AdvancedLevelResultDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class AdvancedLevelResultUpload(FileUpload):
-    """Advanced Level Result upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Advanced Level Result')
-    title = _(u'Advanced Level Result Scan')
-    mus = 1024 * 150
-    download_name = u'alr_scan'
-
-class AdvancedLevelResultImage(Image):
-    """Renders Advanced Level Result scan.
-    """
-    grok.name('alr_scan')
-    download_name = u'alr_scan'
-
-# Certificate 
-
-class CertificateDisplay(FileDisplay):
-    """Certificate display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Certificate')
-    title = _(u'Certificate')
-    download_name = u'certificate'
-
-class CertificateSlip(CertificateDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class CertificateUpload(FileUpload):
-    """Certificate upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Certificate')
-    title = _(u'Certificate Scan')
-    mus = 1024 * 150
-    download_name = u'certificate'
-
-class CertificateImage(Image):
-    """Renders Certificate scan.
-    """
-    grok.name('certificate')
-    download_name = u'certificate'
-
-# Second Certificate (PG Students only)
-
-class SecondCertificateDisplay(FileDisplay):
-    """ Second Certificate display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Second Certificate')
-    title = _(u'Second Certificate')
-    download_name = u'certificate2'
-
-class SecondCertificateSlip(SecondCertificateDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class SecondCertificateUpload(FileUpload):
-    """Second Certificate upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Second Certificate')
-    title = _(u'Second Certificate Scan')
-    mus = 1024 * 150
-    download_name = u'certificate2'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class CertificateImage(Image):
-    """Renders Second Certificate scan.
-    """
-    grok.name('certificate2')
-    download_name = u'certificate2'
-
-# Third Certificate (PG Students only)
-
-class ThirdCertificateDisplay(FileDisplay):
-    """ Third Certificate display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Third Certificate')
-    title = _(u'Third Certificate')
-    download_name = u'certificate3'
-
-class ThirdCertificateSlip(ThirdCertificateDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class ThirdCertificateUpload(FileUpload):
-    """Third Certificate upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Third Certificate')
-    title = _(u'Third Certificate Scan')
-    mus = 1024 * 150
-    download_name = u'certificate3'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class CertificateImage(Image):
-    """Renders Third Certificate scan.
-    """
-    grok.name('certificate3')
-    download_name = u'certificate3'
-
-# Evidence of Name
-
-class EvidenceNameDisplay(FileDisplay):
-    """Evidence of Name display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Evidence of Name')
-    title = _(u'Evidence of Name')
-    download_name = u'evid'
-
-class EvidenceNameSlip(EvidenceNameDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class EvidenceNameUpload(FileUpload):
-    """Evidence of Name upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Evidence of Name')
-    title = _(u'Evidence of Name Scan')
-    mus = 1024 * 150
-    download_name = u'evid'
-
-class EvidenceNameImage(Image):
-    """Renders Evidence of Name scan.
-    """
-    grok.name('evid')
-    download_name = u'evid'
-
-# Result Statement
-
-class ResultStatementDisplay(FileDisplay):
-    """Result Statement display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Result Statement')
-    title = _(u'Result Statement')
-    download_name = u'res_stat'
-
-class ResultStatementSlip(ResultStatementDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class ResultStatementUpload(FileUpload):
-    """Result Statement upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Result Statement')
-    title = _(u'Result Statement Scan')
-    mus = 1024 * 150
-    download_name = u'res_stat'
-
-class ResultStatementImage(Image):
-    """Renders Result Statement scan.
-    """
-    grok.name('res_stat')
-    download_name = u'res_stat'
-
-# Referee Letter
-
-class RefereeLetterDisplay(FileDisplay):
-    """Referee Letter display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Referee Letter')
-    title = _(u'Referee Letter')
-    download_name = u'ref_let'
-
-class RefereeLetterSlip(RefereeLetterDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class RefereeLetterUpload(FileUpload):
-    """Referee Letter upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Referee Letter')
-    title = _(u'Referee Letter Scan')
-    mus = 1024 * 150
-    download_name = u'ref_let'
-
-class RefereeLetterImage(Image):
-    """Renders Referee Letter scan.
-    """
-    grok.name('ref_let')
-    download_name = u'ref_let'
-
-# Second Referee Letter (PG Students only)
-
-class SecondRefereeLetterDisplay(FileDisplay):
-    """Second Referee Letter display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Second Referee Letter')
-    title = _(u'Second Referee Letter')
-    download_name = u'ref_let2'
-
-class SecondRefereeLetterSlip(SecondRefereeLetterDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class SecondRefereeLetterUpload(FileUpload):
-    """Referee Letter upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Second Referee Letter')
-    title = _(u'Second Referee Letter Scan')
-    mus = 1024 * 150
-    download_name = u'ref_let2'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class SecondRefereeLetterImage(Image):
-    """Renders Referee Letter scan.
-    """
-    grok.name('ref_let2')
-    download_name = u'ref_let2'
-
-# Third Referee Letter (PG Students only)
-
-class ThirdRefereeLetterDisplay(FileDisplay):
-    """Third Referee Letter display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Third Referee Letter')
-    title = _(u'Third Referee Letter')
-    download_name = u'ref_let3'
-
-class ThirdRefereeLetterSlip(ThirdRefereeLetterDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class ThirdRefereeLetterUpload(FileUpload):
-    """Referee Letter upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Third Referee Letter')
-    title = _(u'Third Referee Letter Scan')
-    mus = 1024 * 150
-    download_name = u'ref_let3'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class ThirdRefereeLetterImage(Image):
-    """Renders Referee Letter scan.
-    """
-    grok.name('ref_let3')
-    download_name = u'ref_let3'
-
-# Statutory Declaration of Good Conduct
-
-class StatutoryDeclarationDisplay(FileDisplay):
-    """Statutory Declaration of Good Conduct display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Statutory Declaration of Good Conduct')
-    title = _(u'Statutory Declaration of Good Conduct')
-    download_name = u'stat_dec'
-
-class StatutoryDeclarationSlip(StatutoryDeclarationDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class StatutoryDeclarationUpload(FileUpload):
-    """Statutory Declaration of Good Conduct upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Statutory Declaration of Good Conduct')
-    title = _(u'Statutory Declaration of Good Conduct Scan')
-    mus = 1024 * 150
-    download_name = u'stat_dec'
-
-class StatutoryDeclarationImage(Image):
-    """Renders Statutory Declaration of Good Conduct scan.
-    """
-    grok.name('stat_dec')
-    download_name = u'stat_dec'
-
-# Letter of Admission (PG Students only)
-
-class LetterAdmissionDisplay(FileDisplay):
-    """Letter of Admission display viewlet.
-    """
-    grok.order(1)
-    label = _(u'Letter of Admission')
-    title = _(u'Letter of Admission')
-    download_name = u'admission_let'
-
-class LetterAdmissionSlip(LetterAdmissionDisplay):
-    grok.view(ExportPDFClearanceSlipPage)
-
-class LetterAdmissionUpload(FileUpload):
-    """Letter of Admission upload viewlet.
-    """
-    grok.order(2)
-    label = _(u'Letter of Admission')
-    title = _(u'Letter of Admission Scan')
-    mus = 1024 * 150
-    download_name = u'admission_let'
-
-    @property
-    def show_viewlet(self):
-        cm = getattr(self.context,'current_mode', None)
-        if cm is not None and cm.startswith('pg'):
-            return True
-        return False
-
-class LetterAdmissionImage(Image):
-    """Renders Letter of Admission scan.
-    """
-    grok.name('admission_let')
-    download_name = u'admission_let'
