## $Id: interfaces.py 8072 2012-04-09 07:53:53Z henrik $ ## ## 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 ## from zope import schema from waeup.kofa.schema import TextLineChoice from waeup.kofa.interfaces import SimpleKofaVocabulary from waeup.kofa.students.vocabularies import nats_vocab from waeup.kofa.students.interfaces import ( IStudentBase,IUGStudentClearance,IPGStudentClearance, IStudentPersonal,IStudentNavigation, ) from waeup.kofa.students.vocabularies import ( nats_vocab, contextual_reg_num_source) from waeup.custom.interfaces import lgas_vocab from waeup.custom.interfaces import MessageFactory as _ class IStudentBase(IStudentBase): """Representation of student base data. """ reg_number = TextLineChoice( title = _(u'Registration Number'), required = False, readonly = False, source = contextual_reg_num_source, ) class IStudentPersonal(IStudentPersonal): """Student personal data. """ marit_stat = schema.Choice( title = u'Maritual Status', default = 'unmarried', required = False, vocabulary = SimpleKofaVocabulary( (_('Unmarried'), 'unmarried'), (_('Married'), 'married'),) ) class IUGStudentClearance(IUGStudentClearance): """Representation of ug student clearance data. """ date_of_birth = schema.Date( title = _(u'Date of Birth'), required = False, ) nationality = schema.Choice( source = nats_vocab, title = _(u'Nationality'), required = False, ) lga = schema.Choice( source = lgas_vocab, title = _(u'State/LGA (Nigerians only)'), required = False, ) class IPGStudentClearance(IUGStudentClearance): """Representation of pg student clearance data. """ class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,IStudentPersonal): """Representation of a student. """