Changeset 8071 for main/waeup.uniben/trunk
- Timestamp:
- 9 Apr 2012, 07:35:03 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8053 r8071 25 25 from waeup.kofa.schoolgrades import ResultEntryField 26 26 from waeup.kofa.interfaces import SimpleKofaVocabulary 27 from waeup.kofa.students.vocabularies import nats_vocab 28 from waeup.uniben.interfaces import lgas_vocab 27 29 from waeup.uniben.interfaces import MessageFactory as _ 28 30 … … 76 78 """ 77 79 80 nationality = schema.Choice( 81 source = nats_vocab, 82 title = _(u'Nationality'), 83 required = False, 84 ) 85 lga = schema.Choice( 86 source = lgas_vocab, 87 title = _(u'State/LGA (Nigerians only)'), 88 required = False, 89 ) 90 91 # This ordering doesn't work properly. 92 IUGApplicant[ 93 'nationality'].order = IApplicantBaseData['sex'].order 94 IUGApplicant[ 95 'lga'].order = IUGApplicant['nationality'].order 96 97 78 98 class IPGApplicant(IApplicantBaseData): 79 99 """A postgraduate applicant. … … 81 101 """ 82 102 103 nationality = schema.Choice( 104 source = nats_vocab, 105 title = _(u'Nationality'), 106 required = False, 107 ) 108 lga = schema.Choice( 109 source = lgas_vocab, 110 title = _(u'State/LGA (Nigerians only)'), 111 required = False, 112 ) 83 113 perm_address = schema.Text( 84 114 title = _(u'Permanent Address'), … … 206 236 207 237 238 # This ordering doesn't work properly. 239 IPGApplicant[ 240 'nationality'].order = IApplicantBaseData['sex'].order 241 IPGApplicant[ 242 'lga'].order = IPGApplicant['nationality'].order 208 243 IPGApplicant[ 209 244 'student_id'].order = IPGApplicant['notice'].order 245 210 246 211 247 class IApplicant(IUGApplicant,IPGApplicant): -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py
r8064 r8071 199 199 'emp_start,employer,employer2,firstname,history,hq_degree,hq_disc,' 200 200 'hq_matric_no,hq_school,hq_session,hq_type,lastname,lga,locked,' 201 'middlename,n otice,password,perm_address,phone,pp_school,reg_number,'202 ' screening_score,screening_venue,sex,state,student_id'201 'middlename,nationality,notice,password,perm_address,phone,pp_school,' 202 'reg_number,screening_score,screening_venue,sex,state,student_id' 203 203 in result) 204 204 self.assertTrue( 205 'Application initialized by system\'],,,,,,,Tester, foreigner,0,M.,'205 'Application initialized by system\'],,,,,,,Tester,,0,M.,,' 206 206 '"Some notice\nin lines.",any password,,+234-123-12345,,123456,98,' 207 207 'Exam Room,f,initialized,' in result) -
main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
r8020 r8071 19 19 import zope.i18nmessageid 20 20 from zope import schema 21 from waeup.kofa.interfaces import ( 21 from waeup.kofa.interfaces import (SimpleKofaVocabulary, 22 22 ISessionConfiguration, academic_sessions_vocab) 23 from waeup.uniben.utils.lgas import LGAS 23 24 24 25 _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.uniben') 26 27 lgas_vocab = SimpleKofaVocabulary( 28 *sorted([(x[1],x[0]) for x in LGAS])) 25 29 26 30 # It's recommended to replicate all fields from the base package here. -
main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py
r7995 r8071 19 19 from waeup.kofa.schema import TextLineChoice 20 20 from waeup.kofa.interfaces import SimpleKofaVocabulary 21 from waeup.kofa.students.vocabularies import nats_vocab 21 22 from waeup.kofa.students.interfaces import ( 22 23 IStudentBase,IUGStudentClearance,IPGStudentClearance, … … 24 25 ) 25 26 from waeup.kofa.students.vocabularies import ( 26 lgas_vocab, nats_vocab, contextual_reg_num_source) 27 nats_vocab, contextual_reg_num_source) 28 from waeup.uniben.interfaces import lgas_vocab 29 from waeup.uniben.interfaces import MessageFactory as _ 27 30 28 31 class IStudentBase(IStudentBase): … … 32 35 33 36 reg_number = TextLineChoice( 34 title = u'Registration Number',37 title = _(u'Registration Number'), 35 38 required = False, 36 39 readonly = False, … … 48 51 required = False, 49 52 vocabulary = SimpleKofaVocabulary( 50 ( 'Unmarried', 'unmarried'),51 ( 'Married', 'married'),)53 (_('Unmarried'), 'unmarried'), 54 (_('Married'), 'married'),) 52 55 ) 53 56 … … 57 60 """ 58 61 date_of_birth = schema.Date( 59 title = u'Date of Birth',62 title = _(u'Date of Birth'), 60 63 required = False, 61 64 ) … … 63 66 nationality = schema.Choice( 64 67 source = nats_vocab, 65 title = u'Nationality', 66 default = 'nigeria', 68 title = _(u'Nationality'), 67 69 required = False, 68 70 ) … … 70 72 lga = schema.Choice( 71 73 source = lgas_vocab, 72 title = u'State/LGA',74 title = _(u'State/LGA (Nigerians only)'), 73 75 required = False, 74 76 )
Note: See TracChangeset for help on using the changeset viewer.