Changeset 5951 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 15 Apr 2011, 14:07:35 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/interfaces.py
r5950 r5951 6 6 IWAeUPObject, IUniversity, IUserContainer, IDataCenter) 7 7 from waeup.sirp.university.interfaces import ( 8 IFacultyContainer, IFaculty, I Department, ICourseContainer, ICourse,9 IC ertificateContainer, ICertificate, ICertificateCourse, CourseSource)10 8 IFacultyContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd, 9 ICourseContainer, ICourse, ICourseAdd, ICertificateContainer, 10 ICertificate, ICertificateAdd, ICertificateCourse, ICertificateCourseAdd) 11 11 class IBreadcrumb(Interface): 12 12 """Provide breadcrumbs. … … 55 55 """Get the list of breadcrumbs as real Python list. 56 56 """ 57 58 class ICertificateCourseAdd(ICertificateCourse):59 """A certificatecourse is a course referenced by a certificate, which60 provides some own attributes.61 """62 course = schema.Choice(63 title = u'Course to be referenced',64 source = CourseSource(),65 readonly = False,66 )67 68 level = schema.Int(69 title = u'Level of this course',70 required = True,71 default = 100,72 readonly = False,73 )74 57 75 core_or_elective = schema.Bool(76 title = u'Is mandatory course (not elective)',77 required = True,78 default = True79 ) -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r5950 r5951 33 33 WAeUPDisplayFormPage, NullValidator) 34 34 from waeup.sirp.browser.interfaces import ( 35 IUniversity, IFacultyContainer, IFaculty, IDepartment, ICourse, 36 ICertificate, ICertificateCourse, ICertificateCourseAdd) 35 IUniversity, IFacultyContainer, IFaculty, IFacultyAdd, 36 IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate, 37 ICertificateAdd, ICertificateCourse, ICertificateCourseAdd) 37 38 from waeup.sirp.catalog import search_context 38 39 from waeup.sirp.interfaces import( … … 864 865 label = '' 865 866 title = 'Add faculty' 866 pnav = 1 867 868 # We need a deepcopy here, because otherwise also all other 869 # IFaculty forms would be affected. 870 form_fields = copy.deepcopy(grok.AutoFields(IFaculty)) 871 form_fields.get('code').field.readonly = False 867 form_fields = grok.AutoFields(IFacultyAdd) 868 pnav = 1 872 869 873 870 @grok.action('Add faculty') … … 929 926 title = 'Add department' 930 927 label = '' 931 pnav = 1 932 933 # We need a deepcopy here, because otherwise also all other 934 # IDepartment forms would be affected. 935 form_fields = copy.deepcopy(grok.AutoFields(IDepartment)) 936 form_fields.get('code').field.readonly = False 928 form_fields = grok.AutoFields(IDepartmentAdd) 929 pnav = 1 937 930 938 931 @grok.action('Add department') … … 1055 1048 grok.require('waeup.manageUniversity') 1056 1049 title = u'Add course' 1057 pnav = 1 1058 1059 # We need a deepcopy here, because otherwise also all other 1060 # ICourse forms would be affected. 1061 form_fields = copy.deepcopy(grok.AutoFields(ICourse)) 1062 form_fields.get('code').field.readonly = False 1063 1050 form_fields = grok.AutoFields(ICourseAdd) 1051 pnav = 1 1052 1064 1053 @grok.action('Add course') 1065 1054 def addCourse(self, **data): … … 1090 1079 grok.require('waeup.manageUniversity') 1091 1080 title = u'Add certificate' 1092 pnav = 1 1093 1094 # We need a deepcopy here, because otherwise also all other 1095 # ICertificate forms would be affected. 1096 form_fields = copy.deepcopy(grok.AutoFields(ICertificate)) 1097 form_fields.get('code').field.readonly = False 1081 form_fields = grok.AutoFields(ICertificateAdd) 1082 pnav = 1 1083 1098 1084 1099 1085 @grok.action('Add certificate')
Note: See TracChangeset for help on using the changeset viewer.