Changeset 16726 for main/kofacustom.dspg


Ignore:
Timestamp:
25 Nov 2021, 22:26:32 (3 years ago)
Author:
Henrik Bettermann
Message:

Change carryover_courses_1 and carryover_courses_2 fields.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/browser.py

    r16026 r16726  
    238238    @property
    239239    def form_fields(self):
    240         if self.target in ('conv', 'special', 'hndfincl', 'ndfincl'):
     240        if self.context.special:
     241            return grok.AutoFields(ICustomSpecialApplicant)
     242        if self.target in ('conv', 'hndfincl', 'ndfincl'):
    241243            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    242244            form_fields = form_fields.omit(
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/interfaces.py

    r15602 r16726  
    2929from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
    3030from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
     31from waeup.kofa.university.vocabularies import CourseSource
    3132from waeup.kofa.applicants.interfaces import (
    3233    contextual_reg_num_source, ISpecialApplicant)
     
    302303        )
    303304
    304     carryover_courses_1 = schema.Text(
    305         title = _(u'1st Semseter Carry-Over Courses'),
    306         required = False,
    307         )
    308 
    309     carryover_courses_2 = schema.Text(
     305    carryover_courses_1 = schema.List(
     306        title = _(u'1st Semester Carry-Over Courses'),
     307        value_type = schema.Choice(
     308            #title = _(u'YYY'),
     309            source = CourseSource(),
     310            required = True,
     311            ),
     312        required = False,
     313        readonly = False,
     314        defaultFactory=list,
     315        )
     316
     317    carryover_courses_2 = schema.List(
    310318        title = _(u'2nd Semester Carry-Over Courses'),
    311         required = False,
    312         )
     319        value_type = schema.Choice(
     320            #title = _(u'YYY'),
     321            source = CourseSource(),
     322            required = True,
     323            ),
     324        required = False,
     325        readonly = False,
     326        defaultFactory=list,
     327        )
     328
     329    #carryover_courses_1 = schema.Text(
     330    #    title = _(u'1st Semseter Carry-Over Courses'),
     331    #    required = False,
     332    #    )
     333
     334    #carryover_courses_2 = schema.Text(
     335    #    title = _(u'2nd Semester Carry-Over Courses'),
     336    #    required = False,
     337    #    )
    313338
    314339class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
Note: See TracChangeset for help on using the changeset viewer.