Ignore:
Timestamp:
21 Nov 2012, 15:18:31 (12 years ago)
Author:
Henrik Bettermann
Message:

Add field 'suspended_comment'. This attribute will be used to render flash messages for deactivated students. The field is only displayed on the student manage page.

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

Legend:

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

    r9701 r9702  
    356356    grok.require('waeup.viewStudent')
    357357    grok.template('basepage')
    358     form_fields = grok.AutoFields(IStudentBase).omit('password', 'suspended')
     358    form_fields = grok.AutoFields(IStudentBase).omit(
     359        'password', 'suspended', 'suspended_comment')
    359360    pnav = 4
    360361
     
    610611    grok.require('waeup.viewStudent')
    611612    prefix = 'form'
    612     omit_fields = ('password', 'suspended', 'phone', 'adm_code')
     613    omit_fields = (
     614        'password', 'suspended', 'phone',
     615        'adm_code', 'suspended_comment')
    613616
    614617    @property
     
    10471050        'validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    10481051    prefix = 'form'
    1049     omit_fields = ('password', 'suspended', 'phone', 'adm_code', 'sex')
     1052    omit_fields = (
     1053        'password', 'suspended', 'phone',
     1054        'adm_code', 'sex', 'suspended_comment')
    10501055
    10511056    @property
     
    15011506    prefix = 'form'
    15021507    note = None
    1503     omit_fields = ('password', 'suspended', 'phone', 'adm_code', 'sex')
     1508    omit_fields = (
     1509        'password', 'suspended', 'phone',
     1510        'adm_code', 'sex', 'suspended_comment')
    15041511
    15051512    @property
     
    17441751    form_fields['booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    17451752    prefix = 'form'
    1746     omit_fields = ('password', 'suspended', 'phone', 'adm_code')
     1753    omit_fields = (
     1754        'password', 'suspended', 'phone', 'adm_code', 'suspended_comment')
    17471755
    17481756    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r9698 r9702  
    169169        )
    170170
     171    suspended_comment = schema.Text(
     172        title = _(u"Reasons for Deactivation"),
     173        required = False,
     174        description = _(
     175            u'This message will be shown if and only if deactivated '
     176            'students try to login.'),
     177        )
     178
    171179    student_id = schema.TextLine(
    172180        title = _(u'Student Id'),
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9690 r9702  
    5252            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    5353            'perm_address,personal_updated,'
    54             'phone,reg_number,sex,student_id,suspended,password,'
     54            'phone,reg_number,sex,student_id,suspended,suspended_comment,password,'
    5555            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    5656
    5757            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    5858            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    59             '+234-123-12345#,123,f,A111111,0,,created'
     59            '+234-123-12345#,123,f,A111111,0,,,created'
    6060            in result
    6161            )
     
    7373            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    7474            'perm_address,personal_updated'
    75             ',phone,reg_number,sex,student_id,suspended,password,'
     75            ',phone,reg_number,sex,student_id,suspended,suspended_comment,password,'
    7676            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    7777
    7878            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    7979            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    80             '+234-123-12345#,123,f,A111111,0,,created'
     80            '+234-123-12345#,123,f,A111111,0,,,created'
    8181            in result
    8282            )
     
    9393            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    9494            'perm_address,personal_updated'
    95             ',phone,reg_number,sex,student_id,suspended,password,'
     95            ',phone,reg_number,sex,student_id,suspended,suspended_comment,password,'
    9696            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    9797
    9898            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    9999            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    100             '+234-123-12345#,123,f,A111111,0,,created'
     100            '+234-123-12345#,123,f,A111111,0,,,created'
    101101            in result
    102102            )
Note: See TracChangeset for help on using the changeset viewer.