- Timestamp:
- 28 Sep 2020, 17:37:18 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16241 r16249 21 21 from zope.schema.interfaces import ConstraintNotSatisfied 22 22 from zope.component import getUtility 23 from zope.formlib.textwidgets import BytesDisplayWidget 23 24 from hurry.workflow.interfaces import IWorkflowInfo 24 25 from waeup.kofa.interfaces import (REQUESTED, IExtFileStore, IKofaUtils, … … 51 52 NigeriaAccommodationManageFormPage, 52 53 NigeriaAccommodationDisplayFormPage, 54 NigeriaStudentPersonalManageFormPage, 55 NigeriaStudentPersonalEditFormPage, 56 NigeriaStudentPersonalDisplayFormPage 53 57 ) 54 55 58 from kofacustom.iuokada.students.interfaces import ( 56 59 ICustomStudentOnlinePayment, ICustomStudentStudyCourse, 57 ICustomStudentStudyLevel, ICustomStudentBase, ICustomStudent) 60 ICustomStudentStudyLevel, ICustomStudentBase, ICustomStudent, 61 ICustomStudentPersonal, ICustomStudentPersonalEdit) 58 62 from kofacustom.iuokada.interfaces import MessageFactory as _ 59 63 … … 97 101 # ) 98 102 # return () 103 104 class CustomStudentPersonalDisplayFormPage(NigeriaStudentPersonalDisplayFormPage): 105 """ Page to display student personal data 106 """ 107 form_fields = grok.AutoFields(ICustomStudentPersonal) 108 form_fields['perm_address'].custom_widget = BytesDisplayWidget 109 form_fields['postal_address'].custom_widget = BytesDisplayWidget 110 form_fields['hostel_address'].custom_widget = BytesDisplayWidget 111 form_fields['father_address'].custom_widget = BytesDisplayWidget 112 form_fields['mother_address'].custom_widget = BytesDisplayWidget 113 form_fields['guardian_address'].custom_widget = BytesDisplayWidget 114 form_fields[ 115 'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le') 116 117 118 class CustomStudentPersonalEditFormPage(NigeriaStudentPersonalEditFormPage): 119 """ Page to edit personal data 120 """ 121 form_fields = grok.AutoFields(ICustomStudentPersonalEdit).omit('personal_updated') 122 123 class CustomStudentPersonalManageFormPage(NigeriaStudentPersonalManageFormPage): 124 """ Page to edit personal data 125 """ 126 form_fields = grok.AutoFields(ICustomStudentPersonal) 127 form_fields['personal_updated'].for_display = True 128 form_fields[ 129 'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le') 99 130 100 131 class CustomAccommodationDisplayFormPage(NigeriaAccommodationDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.