Ignore:
Timestamp:
17 Jun 2021, 15:20:46 (3 years ago)
Author:
Henrik Bettermann
Message:

Make all fields required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py

    r16306 r16511  
    9696        vocabulary = sponsors_vocab,
    9797        required = False,
    98         readonly = True,
    9998        )
    10099
     
    135134        description = u'',
    136135        required = False,
    137         readonly = False,
    138136        )
    139137
     
    142140        description = u'',
    143141        required = False,
    144         readonly = False,
    145142        )
    146143
     
    149146        description = u'',
    150147        required = False,
    151         readonly = False,
    152148        )
    153149
     
    185181    """
    186182
     183    # Duplicated fields from the ICustomStudentPersonal:
     184    # All fields are required!
     185
     186    email = schema.ASCIILine(
     187        title = _(u'Email'),
     188        required = True,
     189        constraint=validate_email,
     190        )
     191
     192    email2 = schema.ASCIILine(
     193        title = _(u'Second Email'),
     194        required = True,
     195        constraint=validate_email,
     196        )
     197
     198    phone = PhoneNumber(
     199        title = _(u'Phone'),
     200        required = True,
     201        )
     202
     203    parents_email = schema.ASCIILine(
     204        title = _(u"Parents' Email"),
     205        required = True,
     206        constraint=validate_email,
     207        )
     208
     209    sponsor = schema.Choice(
     210        title = _(u'Sponsor'),
     211        vocabulary = sponsors_vocab,
     212        required = True,
     213        )
     214
     215    # New fields
     216
     217    perm_address = schema.Text(
     218        title = _(u'Home Address'),
     219        required = True,
     220        )
     221
     222    postal_address = schema.Text(
     223        title = _(u'Postal Address'),
     224        required = True,
     225        )
     226
     227    hostel_address = schema.Text(
     228        title = _(u'Hostel Address'),
     229        required = True,
     230        )
     231
     232    father_address = schema.Text(
     233        title = _(u'Father\'s Address'),
     234        required = True,
     235        )
     236
     237    mother_address = schema.Text(
     238        title = _(u'Mother\'s Address'),
     239        required = True,
     240        )
     241
     242    guardian_address = schema.Text(
     243        title = _(u'Guardian/Sponsor\'s Address'),
     244        required = True,
     245        )
     246
     247    father_phone = PhoneNumber(
     248        title = _(u'Father\'s Mobile Phone Number'),
     249        description = u'',
     250        required = True,
     251        )
     252
     253    mother_phone = PhoneNumber(
     254        title = _(u'Mother\'s Mobile Phone Number'),
     255        description = u'',
     256        required = True,
     257        )
     258
     259    guardian_phone = PhoneNumber(
     260        title = _(u'Guardian\'s Mobile Phone Number'),
     261        description = u'',
     262        required = True,
     263        )
     264
     265    marit_stat = schema.Choice(
     266        title = u'Marital Status',
     267        default = 'unmarried',
     268        required = True,
     269        vocabulary = SimpleKofaVocabulary(
     270            (_('Unmarried'), 'unmarried'),
     271            (_('Married'), 'married'),)
     272        )
     273
     274    religion = schema.Choice(
     275        title = u'Religion',
     276        default = 'no_say',
     277        required = True,
     278        vocabulary = SimpleKofaVocabulary(
     279            (_('Muslim'), 'muslim'),
     280            (_('Christian'), 'christian'),
     281            (_('Others'), 'others'),
     282            (_('Prefer not to say'), 'no_say'),)
     283        )
     284
     285    disabled = schema.Bool(
     286        title = u'Disabled',
     287        default = False,
     288        required = True,
     289        )
     290
    187291class ICustomUGStudentClearance(INigeriaUGStudentClearance):
    188292    """Representation of ug student clearance data.
Note: See TracChangeset for help on using the changeset viewer.