Changeset 17597


Ignore:
Timestamp:
28 Sep 2023, 07:36:15 (15 months ago)
Author:
Henrik Bettermann
Message:

Set required fields in views not in interfaces.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r17538 r17597  
    572572            form_fields['courier_tno'].for_display = True
    573573            form_fields['proc_date'].for_display = True
    574             for field in TRANS_OMIT_EDIT_FIELDS:
    575                 form_fields = form_fields.omit(field)
    576574            if state == PAID:
    577575                form_fields['order'].for_display = True
    578576            form_fields = form_fields.omit('locked')
     577
     578            form_fields['date_of_birth'].field.required = True
     579            #form_fields['nationality'].field.required = True
     580            form_fields['email'].field.required = True
     581            form_fields['phone'].field.required = True
     582            form_fields['dispatch_address'].field.required = True
     583            form_fields['entry_mode'].field.required = True
     584            form_fields['entry_session'].field.required = True
     585            form_fields['end_session'].field.required = True
     586            form_fields['course_studied'].field.required = True
     587            form_fields['collected'].field.required = True
     588            form_fields['order'].field.required = True
     589            form_fields['charge'].field.required = True
     590            form_fields['no_copies'].field.required = True
     591
     592            for field in TRANS_OMIT_EDIT_FIELDS:
     593                form_fields = form_fields.omit(field)
    579594            return form_fields
    580595        if self.target is not None and self.target == 'tscs':
     
    582597            form_fields['courier_tno'].for_display = True
    583598            form_fields['proc_date'].for_display = True
     599
     600            form_fields['date_of_birth'].field.required = True
     601            #form_fields['nationality'].field.required = True
     602            form_fields['email'].field.required = True
     603            form_fields['phone'].field.required = True
     604            form_fields['dispatch_address'].field.required = True
     605            form_fields['entry_mode'].field.required = True
     606            form_fields['entry_session'].field.required = True
     607            form_fields['end_session'].field.required = True
     608            form_fields['course_studied'].field.required = True
     609            form_fields['collected'].field.required = True
     610            form_fields['order'].field.required = True
     611            form_fields['charge'].field.required = True
     612            form_fields['no_copies'].field.required = True
     613
    584614            for field in TRANS_SHORT_OMIT_EDIT_FIELDS:
    585615                form_fields = form_fields.omit(field)
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r17593 r17597  
    335335    date_of_birth = FormattedDate(
    336336        title = _(u'Date of Birth'),
    337         required = True,
     337        required = False,
    338338        #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
    339339        show_year = True,
     
    373373        title = _(u'Have you collected transcript before?'),
    374374        default = False,
    375         required = True,
     375        required = False,
    376376        )
    377377
     
    379379        title = _(u'Academic Session of Entry'),
    380380        source = academic_sessions_vocab,
    381         required = True,
     381        required = False,
    382382        readonly = False,
    383383        )
     
    386386        title = _(u'Academic Session of Graduation'),
    387387        source = academic_sessions_vocab,
    388         required = True,
     388        required = False,
    389389        readonly = False,
    390390        )
     
    393393        title = _(u'Mode of Entry'),
    394394        source = StudyModeSource(),
    395         required = True,
     395        required = False,
    396396        readonly = False,
    397397        )
     
    429429        source = OrderSource(),
    430430        title = _(u'Type of Order'),
    431         required = True,
     431        required = False,
    432432        )
    433433
     
    444444        title = _(u'Transcript Charge'),
    445445        source = DestinationCostSource(),
    446         required = True,
     446        required = False,
    447447        readonly = False,
    448448        )
     
    452452        description = u'Must correspond with the number of dispatch addresses above.',
    453453        values=[1, 2, 3, 4],
    454         required = True,
     454        required = False,
    455455        readonly = False,
    456456        default = 1,
Note: See TracChangeset for help on using the changeset viewer.