- Timestamp:
- 3 Jan 2023, 17:40:18 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r17142 r17255 881 881 return super(StudentMedicalHistoryEditFormPage, self).update() 882 882 883 883 884 class ExportPDFMedicalHistorySlip(grok.View): 884 885 """Deliver a PDF slip of the context. … … 893 894 'adm_code', 'date_of_birth', 894 895 'flash_notice', 'current_mode', 'entry_mode', 895 'entry_session', 'parents_email', 'study_course',896 'entry_session', 'parents_email', 896 897 'current_level', 'reg_number', 'sex', 897 898 'certificate') … … 919 920 omit_fields=self.omit_fields,) 920 921 922 class ExportPDFTishipSlip(grok.View): 923 """Deliver a PDF slip of the context. 924 """ 925 grok.context(ICustomStudent) 926 grok.name('tiship_slip.pdf') 927 grok.require('waeup.viewStudent') 928 prefix = 'form' 929 form_fields = grok.AutoFields(IMedicalHistory).select( 930 'genotype', 'bloodgroup') 931 title = '' 932 933 omit_fields = ('password', 'suspended', 'suspended_comment', 934 'adm_code', 935 'flash_notice', 'current_mode', 'entry_mode', 936 'parents_email', 937 ) 938 939 @property 940 def label(self): 941 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 942 return translate(_('TISHIP Registration Slip of'), 943 'waeup.kofa', target_language=portal_language) \ 944 + ' %s' % self.context.display_fullname 945 946 947 def _sigsInFooter(self): 948 return (_('Year of Graduation'), 949 _('Signature'), 950 _('Date'), 951 ) 952 953 def render(self): 954 studentview = StudentBasePDFFormPage(self.context.student, 955 self.request, self.omit_fields) 956 students_utils = getUtility(IStudentsUtils) 957 return students_utils.renderPDF( 958 self, 'tiship_slip.pdf', 959 self.context.student, studentview, 960 sigs_in_footer=self._sigsInFooter(), 961 omit_fields=self.omit_fields,) 962 921 963 class PlagTestInfoPage(KofaPage): 922 964 "Landing page after plagiation test payment"
Note: See TracChangeset for help on using the changeset viewer.