[10770] | 1 | ## $Id: browser.py 10804 2013-11-28 16:14:39Z henrik $ |
---|
| 2 | ## |
---|
| 3 | ## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
| 18 | import grok |
---|
| 19 | from zope.i18n import translate |
---|
| 20 | from zope.schema.interfaces import ConstraintNotSatisfied |
---|
| 21 | from zope.component import getUtility |
---|
| 22 | from hurry.workflow.interfaces import IWorkflowInfo |
---|
| 23 | from waeup.kofa.interfaces import REQUESTED, IExtFileStore, IKofaUtils |
---|
| 24 | from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget |
---|
| 25 | from waeup.kofa.browser.layout import KofaEditFormPage |
---|
| 26 | from waeup.kofa.browser.layout import action, jsaction |
---|
| 27 | from waeup.kofa.students.browser import ( |
---|
| 28 | StudyLevelEditFormPage, StudyLevelDisplayFormPage, |
---|
| 29 | StudentBasePDFFormPage, ExportPDFCourseRegistrationSlipPage, |
---|
| 30 | CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage, |
---|
[10804] | 31 | msave, emit_lock_message, StudyCourseDisplayFormPage, |
---|
| 32 | StudyCourseManageFormPage) |
---|
| 33 | from waeup.kofa.students.interfaces import ( |
---|
| 34 | IStudentsUtils, ICourseTicket) |
---|
[10770] | 35 | from waeup.kofa.students.workflow import FORBIDDEN_POSTGRAD_TRANS |
---|
| 36 | from kofacustom.nigeria.students.browser import ( |
---|
| 37 | NigeriaOnlinePaymentDisplayFormPage, |
---|
| 38 | NigeriaStudentBaseManageFormPage, |
---|
| 39 | NigeriaStudentClearanceEditFormPage, |
---|
| 40 | NigeriaOnlinePaymentAddFormPage, |
---|
| 41 | NigeriaExportPDFPaymentSlipPage, |
---|
| 42 | NigeriaExportPDFClearanceSlipPage, |
---|
| 43 | ) |
---|
| 44 | |
---|
| 45 | from kofacustom.ekodisco.students.interfaces import ( |
---|
| 46 | ICustomStudentOnlinePayment, ICustomStudentStudyCourse, |
---|
[10804] | 47 | ICustomStudentStudyLevel, ICustomStudentStudyCourse, |
---|
| 48 | ICustomStudentStudyCourse) |
---|
[10770] | 49 | from kofacustom.ekodisco.interfaces import MessageFactory as _ |
---|
| 50 | |
---|
[10804] | 51 | |
---|
| 52 | class CustomStudyCourseDisplayFormPage(StudyCourseDisplayFormPage): |
---|
| 53 | """ Page to display the student study course data |
---|
| 54 | """ |
---|
| 55 | grok.context(ICustomStudentStudyCourse) |
---|
| 56 | grok.template('studycoursepage') |
---|
| 57 | |
---|
| 58 | form_fields = grok.AutoFields(ICustomStudentStudyCourse).select( |
---|
| 59 | 'certificate', 'entry_session', 'current_session') |
---|
| 60 | |
---|
| 61 | class CustomStudyCourseManageFormPage(StudyCourseManageFormPage): |
---|
| 62 | """ Page to edit the student study course data |
---|
| 63 | """ |
---|
| 64 | grok.context(ICustomStudentStudyCourse) |
---|
| 65 | grok.template('studycoursemanagepage') |
---|
| 66 | |
---|
| 67 | form_fields = grok.AutoFields(ICustomStudentStudyCourse).select( |
---|
| 68 | 'certificate', 'entry_session', 'current_session') |
---|