- Timestamp:
- 26 Jun 2012, 07:46:32 (12 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue
- Property svn:mergeinfo changed
/main/waeup.uniben/trunk/src/waeup/uniben merged: 8803-8804
- Property svn:mergeinfo changed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r8711 r8805 33 33 ApplicantBaseDisplayFormPage) 34 34 from waeup.kofa.applicants.viewlets import ( 35 PaymentReceiptActionButton )35 PaymentReceiptActionButton, PDFActionButton) 36 36 from waeup.kofa.applicants.pdf import PDFApplicationSlip 37 37 from waeup.aaue.applicants.interfaces import ( … … 41 41 UG_OMIT_PDF_FIELDS, PG_OMIT_PDF_FIELDS, 42 42 UG_OMIT_MANAGE_FIELDS, PG_OMIT_MANAGE_FIELDS, 43 UG_OMIT_EDIT_FIELDS, PG_OMIT_EDIT_FIELDS, PUTME_OMIT_EDIT_FIELDS) 43 UG_OMIT_EDIT_FIELDS, PG_OMIT_EDIT_FIELDS, PUTME_OMIT_EDIT_FIELDS, 44 UG_OMIT_RESULT_SLIP_FIELDS) 44 45 from waeup.aaue.interfaces import MessageFactory as _ 45 46 … … 63 64 grok.context(ICustomApplicantOnlinePayment) 64 65 66 class PDFActionButton(PDFActionButton): 67 68 @property 69 def text(self): 70 if getattr(self.context, 'result_uploaded', False): 71 return _('Download result slip') 72 return _('Download application slip') 73 74 65 75 class CustomPDFApplicationSlip(PDFApplicationSlip): 66 76 67 note = _(u'<br /><br /><br />' 68 'Comfirm your exam venue 72 hours to the exam.') 77 def _reduced_slip(self): 78 return getattr(self.context, 'result_uploaded', False) 79 80 @property 81 def note(self): 82 target = getattr(self.context.__parent__, 'prefix', None) 83 if target is not None and not target.startswith('pg') \ 84 and not self._reduced_slip(): 85 return _(u'<br /><br /><br />' 86 'Comfirm your exam venue 72 hours to the exam.') 87 return 69 88 70 89 @property … … 77 96 else: 78 97 form_fields = grok.AutoFields(IUGApplicant) 79 for field in UG_OMIT_PDF_FIELDS: 80 form_fields = form_fields.omit(field) 98 if self._reduced_slip(): 99 for field in UG_OMIT_RESULT_SLIP_FIELDS: 100 form_fields = form_fields.omit(field) 101 else: 102 for field in UG_OMIT_PDF_FIELDS: 103 form_fields = form_fields.omit(field) 104 if not getattr(self.context, 'student_id'): 105 form_fields = form_fields.omit('student_id') 81 106 return form_fields 82 107
Note: See TracChangeset for help on using the changeset viewer.