Changeset 6696 for main/waeup.sirp/trunk


Ignore:
Timestamp:
9 Sep 2011, 07:11:53 (13 years ago)
Author:
Henrik Bettermann
Message:

Add reg_number attribute which is needed for first-time login (admission checking).

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r6695 r6696  
    477477    grok.name('bedit')
    478478    grok.require('waeup.handleStudent')
    479     form_fields = grok.AutoFields(IStudentBaseEdit).omit('student_id')
     479    form_fields = grok.AutoFields(IStudentBaseEdit).omit(
     480        'student_id', 'reg_number')
    480481    grok.template('baseeditpage')
    481482    label = 'Change password'
  • main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py

    r6630 r6696  
    1818    student_id = index.Field(attribute='student_id')
    1919    name = index.Text(attribute='name')
    20     #history = index.Text(attribute='history')
    21     #state = index.Field(attribute='state')
     20    reg_number = index.Field(attribute='reg_number')
     21    state = index.Field(attribute='state')
    2222
    2323class StudentQueryResultItem(object):
     
    3232        self.student_id = context.student_id
    3333        self.name = context.name
    34         #self.history = context.history
    35         #self.state = context.state
     34        self.reg_number = context.reg_number
     35        self.state = context.state
    3636
    3737def search(query=None, searchtype=None, view=None):
     
    4040    #    view.flash('Empty search string.')
    4141    #    return
    42     if searchtype in ('history','name'):
     42    if searchtype in ('name',):
    4343        results = Query().searchResults(
    4444            Text(('students_catalog', searchtype), query))
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r6695 r6696  
    8080    password = schema.Password(
    8181        title = u'Password',
     82        required = False,
     83        )
     84
     85    reg_number = schema.TextLine(
     86        title = u'Registration Number',
     87        default = u'',
     88        required = True,
     89        readonly = False,
    8290        )
    8391
     
    144152        )
    145153
     154    password = schema.Password(
     155        title = u'Password',
     156        required = True,
     157        )
     158
    146159IStudentBaseEdit['name'].order =  IStudentBase['name'].order
    147160
Note: See TracChangeset for help on using the changeset viewer.