Changeset 9141 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 1 Sep 2012, 07:15:42 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r9078 r9141 545 545 grok.name('base') 546 546 form_fields = grok.AutoFields(IApplicant).select( 547 'applicant_id', 'firstname', 'lastname','email', 'course1')547 'applicant_id','email', 'course1') 548 548 549 549 class CreateStudentPage(UtilityView, grok.View): -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9140 r9141 316 316 return _('unset') 317 317 318 class StudentBasePDFFormPage(KofaDisplayFormPage): 319 """ Page to display student base data in pdf files. 320 """ 321 form_fields = grok.AutoFields(IStudentBase).omit( 322 'password', 'suspended', 'phone', 'adm_code', 'sex') 323 318 324 class ContactStudentForm(ContactAdminForm): 319 325 grok.context(IStudent) … … 525 531 526 532 def render(self): 527 studentview = StudentBase DisplayFormPage(self.context.student,533 studentview = StudentBasePDFFormPage(self.context.student, 528 534 self.request) 529 535 students_utils = getUtility(IStudentsUtils) … … 913 919 Mand = translate(_('Mand.'), 'waeup.kofa', target_language=portal_language) 914 920 Score = translate(_('Score'), 'waeup.kofa', target_language=portal_language) 915 studentview = StudentBase DisplayFormPage(self.context.student,921 studentview = StudentBasePDFFormPage(self.context.student, 916 922 self.request) 917 923 students_utils = getUtility(IStudentsUtils) … … 1304 1310 # self.redirect(self.url(self.context)) 1305 1311 # return 1306 studentview = StudentBase DisplayFormPage(self.context.student,1312 studentview = StudentBasePDFFormPage(self.context.student, 1307 1313 self.request) 1308 1314 students_utils = getUtility(IStudentsUtils) … … 1524 1530 1525 1531 def render(self): 1526 studentview = StudentBase DisplayFormPage(self.context.student,1532 studentview = StudentBasePDFFormPage(self.context.student, 1527 1533 self.request) 1528 1534 students_utils = getUtility(IStudentsUtils) -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9069 r9141 117 117 #data.append([Spacer(1, 12)]) 118 118 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 119 120 f_label = formatted_label(size=12) % _('Name') 121 f_label = Paragraph(f_label, style["Normal"]) 122 f_text = formatted_text(studentview.context.display_fullname, size=12) 123 f_text = Paragraph(f_text, style["Normal"]) 124 data_right.append([f_label,f_text]) 125 119 126 for widget in studentview.widgets: 120 if widget.name == 'form.adm_code':127 if 'name' in widget.name: 121 128 continue 122 129 f_label = formatted_label(size=12) % translate( … … 127 134 f_text = Paragraph(f_text, style["Normal"]) 128 135 data_right.append([f_label,f_text]) 136 137 if hasattr(studentview.context, 'certcode'): 138 f_label = formatted_label(size=12) % _('Study Course') 139 f_label = Paragraph(f_label, style["Normal"]) 140 f_text = formatted_text(studentview.context.certcode, size=12) 141 f_text = Paragraph(f_text, style["Normal"]) 142 data_right.append([f_label,f_text]) 143 129 144 table_left = Table(data_left,style=SLIP_STYLE) 130 145 table_right = Table(data_right,style=SLIP_STYLE, colWidths=[5*cm, 6*cm])
Note: See TracChangeset for help on using the changeset viewer.