Changeset 12805


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

Use schema.Int for year.

Location:
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn
Files:
2 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
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/interfaces.py

    r12803 r12805  
    2727
    2828    contract_year = schema.Int(
    29         title=u'Year of License',
    30         description=_(u'Enter 4-digit license year.'),
    31         required=False,
    32         min=1990,
    33         max=2050,
     29        title = u'Year of License',
     30        description = _(u'Enter 4-digit license year.'),
     31        required = False,
     32        min = 1990,
     33        max = 2050,
    3434        )
    3535
Note: See TracChangeset for help on using the changeset viewer.