Changeset 10705 for main/waeup.kwarapoly/trunk
- Timestamp:
- 6 Nov 2013, 08:59:15 (11 years ago)
- 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 211 211 """ 212 212 grok.context(ICustomStudent) 213 grok.name('registration_ form.pdf')213 grok.name('registration_slip.pdf') 214 214 grok.require('waeup.viewStudent') 215 215 prefix = 'form' 216 216 omit_fields = ( 217 217 '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' 222 222 223 223 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 ) 226 228 227 229 def render(self): … … 230 232 students_utils = getUtility(IStudentsUtils) 231 233 return students_utils.renderPDF( 232 self, 'registration_ form.pdf',234 self, 'registration_slip.pdf', 233 235 self.context.student, studentview, signatures=([_('Bursar')],), 234 236 omit_fields=self.omit_fields, -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/interfaces.py
r9542 r10705 36 36 37 37 """ 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 ) 38 60 39 61 class ICustomUGStudentClearance(INigeriaUGStudentClearance): -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r10695 r10705 413 413 self.assertEqual(self.browser.headers['Content-Type'], 414 414 'application/pdf') 415 path = os.path.join(samples_dir(), 'registration_ form.pdf')415 path = os.path.join(samples_dir(), 'registration_slip.pdf') 416 416 open(path, 'wb').write(self.browser.contents) 417 417 print "Sample PDF registration_form.pdf written to %s" % path -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py
r10695 r10705 71 71 return self.view.url(self.view.context, self.target) 72 72 73 class Registration FormActionButton(ManageActionButton):73 class RegistrationSlipActionButton(ManageActionButton): 74 74 grok.order(4) 75 75 grok.context(IStudent) … … 78 78 icon = 'actionicon_pdf.png' 79 79 text = _('Download registration form') 80 target = 'registration_ form.pdf'80 target = 'registration_slip.pdf' 81 81 82 82 @property
Note: See TracChangeset for help on using the changeset viewer.