Ignore:
Timestamp:
21 Mar 2015, 06:27:06 (10 years ago)
Author:
Henrik Bettermann
Message:

Use schema.Int for year.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py

    r12803 r12805  
    3737from ikobacustom.pcn.customers.schoolgrades import ResultEntryField
    3838
    39 def year_range():
    40     curr_year = datetime.now().year
    41     return range(curr_year - 20, curr_year + 2)
    4239
    4340class PracticeSource(BasicSourceFactory):
     
    113110        )
    114111
    115     qualification_year = schema.Choice(
     112    qualification_year = schema.Int(
    116113        title = _(u'Year of Qualification'),
    117         required = True,
    118         values = year_range(),
     114        required = False,
     115        min = 1990,
     116        max = 2050,
    119117        )
    120118
     
    961959        )
    962960
    963     supervisor_year = schema.TextLine(
     961    supervisor_year = schema.Int(
    964962        title = _(u'Year of Qualification'),
    965963        description= _('Enter year of qualification of supervisor.'),
    966964        required = False,
    967         readonly = False,
     965        min = 1990,
     966        max = 2050,
    968967        )
    969968
Note: See TracChangeset for help on using the changeset viewer.