Changeset 10705 for main


Ignore:
Timestamp:
6 Nov 2013, 08:59:15 (11 years ago)
Author:
Henrik Bettermann
Message:

Add personal data fields.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students
Files:
4 edited

Legend:

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

    r10703 r10705  
    211211    """
    212212    grok.context(ICustomStudent)
    213     grok.name('registration_form.pdf')
     213    grok.name('registration_slip.pdf')
    214214    grok.require('waeup.viewStudent')
    215215    prefix = 'form'
    216216    omit_fields = (
    217217        'suspended', 'phone',
    218         'adm_code', 'suspended_comment', 'email', 'sex',
    219         'current_mode', 'matric_number')
    220     title = ''
    221     label = 'Registration Form'
     218        'adm_code', 'suspended_comment', 'email',
     219        'current_mode', 'matric_number', 'date_of_birth')
     220    title = 'Clearance and Personal Data'
     221    label = 'Profile Registration Slip'
    222222
    223223    form_fields = grok.AutoFields(ICustomStudent).select(
    224         'marit_stat', 'lga', 'nationality',
    225         'perm_address',)
     224        'date_of_birth', 'lga', 'nationality',
     225        'perm_address', 'corr_address',
     226        'marit_stat', 'sponsor_name', 'sponsor_address',
     227        )
    226228
    227229    def render(self):
     
    230232        students_utils = getUtility(IStudentsUtils)
    231233        return students_utils.renderPDF(
    232             self, 'registration_form.pdf',
     234            self, 'registration_slip.pdf',
    233235            self.context.student, studentview, signatures=([_('Bursar')],),
    234236            omit_fields=self.omit_fields,
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/interfaces.py

    r9542 r10705  
    3636
    3737    """
     38
     39    perm_address = schema.Text(
     40        title = _(u'Home Address'),
     41        required = False,
     42        )
     43
     44    corr_address = schema.Text(
     45        title = _(u'Correspondence Address'),
     46        required = False,
     47        )
     48
     49    sponsor_name = schema.TextLine(
     50        title = _(u'Sponsor\'s Name'),
     51        required = False,
     52        readonly = False,
     53        )
     54
     55    sponsor_address = schema.Text(
     56        title = _(u'Sponsor\'s Address'),
     57        required = False,
     58        readonly = False,
     59        )
    3860
    3961class ICustomUGStudentClearance(INigeriaUGStudentClearance):
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py

    r10695 r10705  
    413413        self.assertEqual(self.browser.headers['Content-Type'],
    414414                         'application/pdf')
    415         path = os.path.join(samples_dir(), 'registration_form.pdf')
     415        path = os.path.join(samples_dir(), 'registration_slip.pdf')
    416416        open(path, 'wb').write(self.browser.contents)
    417417        print "Sample PDF registration_form.pdf written to %s" % path
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py

    r10695 r10705  
    7171        return self.view.url(self.view.context, self.target)
    7272
    73 class RegistrationFormActionButton(ManageActionButton):
     73class RegistrationSlipActionButton(ManageActionButton):
    7474    grok.order(4)
    7575    grok.context(IStudent)
     
    7878    icon = 'actionicon_pdf.png'
    7979    text = _('Download registration form')
    80     target = 'registration_form.pdf'
     80    target = 'registration_slip.pdf'
    8181
    8282    @property
Note: See TracChangeset for help on using the changeset viewer.