Ignore:
Timestamp:
14 Sep 2011, 01:56:26 (13 years ago)
Author:
uli
Message:

Use more simple form names, fix nesting errors, etc.

File:
1 edited

Legend:

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

    r6756 r6758  
    151151    title = ''
    152152    label = 'Set password for first-time login'
    153     acprefix = 'PWD'
     153    ac_prefix = 'PWD'
    154154    pnav = 0
    155155
    156156    def update(self, SUBMIT=None):
    157         self.reg_number = self.request.form.get('form.reg_number', None)
    158         # We must not use form.ac_series and form.ac_number in forms since these
    159         # are interpreted as applicant credentials in the applicants package
    160         self.acseries = self.request.form.get('form.acseries', None)
    161         self.acnumber = self.request.form.get('form.acnumber', None)
     157        self.reg_number = self.request.form.get('reg_number', None)
     158        self.ac_series = self.request.form.get('ac_series', None)
     159        self.ac_number = self.request.form.get('ac_number', None)
    162160
    163161        if SUBMIT is None:
     
    174172        self.student_id = student.student_id
    175173        student_pw = student.password
    176         pin = '%s-%s-%s' % (self.acprefix,self.acseries,self.acnumber)
     174        pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number)
    177175        code = get_access_code(pin)
    178176        if not code:
     
    197195            #import pdb; pdb.set_trace()
    198196            invalidate_accesscode(pin,comment)
    199             IUserAccount(student).setPassword(self.acnumber)
     197            IUserAccount(student).setPassword(self.ac_number)
    200198        self.flash('Password has been set. Your Student Id is %s'
    201199            % self.student_id)
     
    657655    form_fields = grok.AutoFields(
    658656        IStudentClearanceEdit).omit('clearance_locked')
    659     #grok.template('clearanceeditpage')
    660657    label = 'Edit clearance data'
    661658    title = 'Clearance Data'
Note: See TracChangeset for help on using the changeset viewer.