1 | ## $Id: browser.py 10788 2013-11-22 07:12:48Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2011 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 | """UI components for basic applicants and related components. |
---|
19 | """ |
---|
20 | import grok |
---|
21 | from waeup.kofa.applicants.browser import ( |
---|
22 | ApplicantRegistrationPage, ApplicantsContainerPage) |
---|
23 | from waeup.kofa.applicants.interfaces import IApplicant, IApplicantEdit |
---|
24 | from kofacustom.nigeria.applicants.browser import ( |
---|
25 | NigeriaApplicantDisplayFormPage, |
---|
26 | NigeriaPDFApplicationSlip, |
---|
27 | ApplicantDisplayFormPage, |
---|
28 | ApplicantManageFormPage, |
---|
29 | ApplicantEditFormPage) |
---|
30 | |
---|
31 | from kofacustom.ekodisco.interfaces import MessageFactory as _ |
---|
32 | |
---|
33 | class CustomApplicantDisplayFormPage(ApplicantDisplayFormPage): |
---|
34 | """A display view for applicant data. |
---|
35 | """ |
---|
36 | grok.template('applicantdisplaypage') |
---|
37 | |
---|
38 | form_fields = grok.AutoFields(IApplicant).omit( |
---|
39 | 'locked', 'course_admitted', 'password', 'suspended', |
---|
40 | 'course2', 'notice', 'student_id') |
---|
41 | |
---|
42 | class CustomApplicantManageFormPage(ApplicantManageFormPage): |
---|
43 | """A full edit view for applicant data. |
---|
44 | """ |
---|
45 | grok.template('applicanteditpage') |
---|
46 | |
---|
47 | form_fields = grok.AutoFields(IApplicant).omit('course2', 'notice', 'student_id') |
---|
48 | form_fields['applicant_id'].for_display = True |
---|
49 | |
---|
50 | class CustomApplicantEditFormPage(ApplicantEditFormPage): |
---|
51 | """An applicant-centered edit view for applicant data. |
---|
52 | """ |
---|
53 | grok.template('applicanteditpage') |
---|
54 | |
---|
55 | form_fields = grok.AutoFields(IApplicantEdit).omit( |
---|
56 | 'locked', 'course_admitted', 'student_id', |
---|
57 | 'suspended', 'course2', 'notice' |
---|
58 | ) |
---|
59 | form_fields['applicant_id'].for_display = True |
---|
60 | form_fields['reg_number'].for_display = True |
---|