Changeset 14460


Ignore:
Timestamp:
25 Jan 2017, 21:22:01 (8 years ago)
Author:
Henrik Bettermann
Message:

Show different reg_number title for transcript and certificate applications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py

    r14371 r14460  
    3131from waeup.kofa.applicants.workflow import STARTED, PAID
    3232from waeup.kofa.applicants.viewlets import PDFActionButton
     33from waeup.kofa.applicants.interfaces import IApplicantRegisterUpdate
    3334from waeup.kofa.browser.layout import UtilityView
    3435from waeup.kofa.students.interfaces import IStudentsUtils
     
    445446    """
    446447
     448    @property
     449    def form_fields(self):
     450        form_fields = None
     451        if self.context.mode == 'update':
     452            form_fields = grok.AutoFields(IApplicantRegisterUpdate).select(
     453                'lastname','reg_number','email')
     454            target = getattr(self.context.__parent__, 'prefix', None)
     455            if target in ('trans', 'cert'):
     456                form_fields.get('reg_number').field.title = u'Matriculation Number'
     457        else: #if self.context.mode == 'create':
     458            form_fields = grok.AutoFields(ICustomUGApplicantEdit).select(
     459                'firstname', 'middlename', 'lastname', 'email', 'phone')
     460        return form_fields
     461
    447462    def _redirect(self, email, password, applicant_id):
    448463        # Forward email and credentials to landing page.
Note: See TracChangeset for help on using the changeset viewer.