Changeset 15489 for main


Ignore:
Timestamp:
9 Jul 2019, 06:09:29 (5 years ago)
Author:
Henrik Bettermann
Message:

Add disabilites field.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/interfaces.py

    r15472 r15489  
    3737from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    3838from kofacustom.nigeria.interfaces import (
    39     LGASource, high_qual, high_grade, exam_types, validate_jamb_reg_number)
     39    LGASource, DisabilitiesSource,
     40    high_qual, high_grade, exam_types, validate_jamb_reg_number)
    4041from kofacustom.nigeria.interfaces import MessageFactory as _
    4142from kofacustom.nigeria.payments.interfaces import INigeriaOnlinePayment
     
    270271    """
    271272
     273    disabilities = schema.Choice(
     274        title = _(u'Disabilities'),
     275        source = DisabilitiesSource(),
     276        required = False,
     277        )
    272278    nationality = schema.Choice(
    273279        source = nats_vocab,
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py

    r14093 r15489  
    411411        self.assertMatches(result,
    412412            'aggregate,applicant_id,bank_account_name,bank_account_number,'
    413             'bank_name,course1,course2,course_admitted,date_of_birth,email,'
     413            'bank_name,course1,course2,course_admitted,date_of_birth,'
     414            'disabilities,email,'
    414415            'emp2_end,emp2_position,emp2_reason,emp2_start,emp_end,'
    415416            'emp_position,emp_reason,emp_start,employer,employer2,'
     
    426427            'application_number,display_fullname,application_date\r\n'
    427428
    428             ',dp2011_654321,,,,CERT1,CERT1,CERT1,1981-02-04#,'
     429            ',dp2011_654321,,,,CERT1,CERT1,CERT1,1981-02-04#,,'
    429430            'anna@sample.com,,,,,,,,,,,Anna,,,,,,,,,,,,,,,Line 1++Line 2,'
    430431            '"[\'english_language\', \'fine_art\']",'
     
    442443            [
    443444            'aggregate','ignore_applicant_id','bank_account_name','bank_account_number',
    444             'bank_name','course1','course2','course_admitted','date_of_birth','email',
     445            'bank_name','course1','course2','course_admitted','date_of_birth',
     446            'disabilities','email',
    445447            'emp2_end','emp2_position','emp2_reason','emp2_start','emp_end',
    446448            'emp_position','emp_reason','emp_start','employer','employer2',
     
    472474            [
    473475            'aggregate','ignore_applicant_id','bank_account_name','bank_account_number',
    474             'bank_name','course1','course2','course_admitted','date_of_birth','email',
     476            'bank_name','course1','course2','course_admitted','date_of_birth',
     477            'disabilities', 'email',
    475478            'emp2_end','emp2_position','emp2_reason','emp2_start','emp_end',
    476479            'emp_position','emp_reason','emp_start','employer','employer2',
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interfaces.py

    r15046 r15489  
    2222from zc.sourcefactory.basic import BasicSourceFactory
    2323from waeup.kofa.interfaces import (SimpleKofaVocabulary,
    24     ISessionConfiguration, academic_sessions_vocab)
     24    ISessionConfiguration, academic_sessions_vocab,
     25    ContextualDictSourceFactoryBase)
    2526from kofacustom.nigeria.utils.lgas import LGAS
    2627
     
    107108            _('Invalid key: ${a}', mapping = {'a':value}))
    108109
     110class DisabilitiesSource(ContextualDictSourceFactoryBase):
     111    """A source for filtering groups of students
     112    """
     113    #: name of dict to deliver from kofa utils.
     114    DICT_NAME = 'DISABILITIES_DICT'
     115
     116
    109117class ICustomSessionConfiguration(ISessionConfiguration):
    110118    """A session configuration object.
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/utils/utils.py

    r15481 r15489  
    308308        }
    309309
     310    DISABILITIES_DICT = {
     311        'cripple': 'Paraplegia (cripple)',
     312        'deaf': 'Deaf',
     313        'dumb': 'Dumb',
     314        'blind': 'Blind',
     315        'others': 'Others',
     316        }
     317
    310318
    311319    @property
Note: See TracChangeset for help on using the changeset viewer.