- Timestamp:
- 28 Sep 2020, 17:37:18 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py
r16233 r16249 18 18 19 19 from zope import schema 20 from zope.interface import Attribute, invariant, Invalid 20 21 from waeup.kofa.students.vocabularies import StudyLevelSource 21 from waeup.kofa.interfaces import validate_email 22 from waeup.kofa.interfaces import validate_email, SimpleKofaVocabulary 23 from waeup.kofa.students.interfaces import IStudentPersonal 24 from waeup.kofa.schema import FormattedDate, PhoneNumber 22 25 from kofacustom.nigeria.students.interfaces import ( 23 26 INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance, … … 51 54 'email'].order 52 55 53 class ICustomStudentPersonal(INigeriaStudentPersonal): 54 """Student personal data. 55 56 """ 56 class ICustomStudentPersonal(IStudentPersonal): 57 """Student bio data. 58 59 """ 60 61 is_foreigner = Attribute('True if student is non-Nigerian') 62 63 perm_address = schema.Text( 64 title = _(u'Home Address'), 65 required = False, 66 ) 67 68 postal_address = schema.Text( 69 title = _(u'Postal Address'), 70 required = False, 71 ) 72 73 hostel_address = schema.Text( 74 title = _(u'Hostel Address'), 75 required = False, 76 ) 77 78 father_address = schema.Text( 79 title = _(u'Father\'s Address'), 80 required = False, 81 ) 82 83 mother_address = schema.Text( 84 title = _(u'Mother\'s Address'), 85 required = False, 86 ) 87 88 guardian_address = schema.Text( 89 title = _(u'Guardian/Sponsor\'s Address'), 90 required = False, 91 ) 92 93 father_phone = PhoneNumber( 94 title = _(u'Father\'s Mobile Phone Number'), 95 description = u'', 96 required = False, 97 readonly = False, 98 ) 99 100 mother_phone = PhoneNumber( 101 title = _(u'Mother\'s Mobile Phone Number'), 102 description = u'', 103 required = False, 104 readonly = False, 105 ) 106 107 guardian_phone = PhoneNumber( 108 title = _(u'Guardian\'s Mobile Phone Number'), 109 description = u'', 110 required = False, 111 readonly = False, 112 ) 113 114 marit_stat = schema.Choice( 115 title = u'Marital Status', 116 default = 'unmarried', 117 required = False, 118 vocabulary = SimpleKofaVocabulary( 119 (_('Unmarried'), 'unmarried'), 120 (_('Married'), 'married'),) 121 ) 122 123 religion = schema.Choice( 124 title = u'Religion', 125 default = 'no_say', 126 required = False, 127 vocabulary = SimpleKofaVocabulary( 128 (_('Muslim'), 'muslim'), 129 (_('Christian'), 'christian'), 130 (_('Others'), 'others'), 131 (_('Prefer not to say'), 'no_say'),) 132 ) 133 134 disabled = schema.Bool( 135 title = u'Disabled', 136 default = False, 137 required = False, 138 ) 139 140 class ICustomStudentPersonalEdit(ICustomStudentPersonal): 141 """Interface for editing personal data by students. 142 143 Here we can repeat the fields from IStudentPersonal and set the 144 `required` if necessary. 145 """ 146 57 147 58 148 class ICustomUGStudentClearance(INigeriaUGStudentClearance): … … 68 158 69 159 class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance, 70 ICustomPGStudentClearance, ICustomStudentPersonal):160 ICustomPGStudentClearance, ICustomStudentPersonal): 71 161 """Representation of a student. 72 162
Note: See TracChangeset for help on using the changeset viewer.