Changeset 5948 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 14 Apr 2011, 21:25:35 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r5946 r5948 862 862 grok.require('waeup.manageUniversity') 863 863 grok.name('add') 864 form_fields = grok.AutoFields(IFaculty)865 864 label = '' 866 865 title = 'Add faculty' 867 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 868 872 869 873 @grok.action('Add faculty') … … 923 927 grok.name('add') 924 928 grok.require('waeup.manageUniversity') 925 form_fields = grok.AutoFields(IDepartment)926 929 title = 'Add department' 927 930 label = '' 928 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 929 937 930 938 @grok.action('Add department') … … 954 962 grok.name('manage') 955 963 grok.require('waeup.manageUniversity') 964 title = 'Edit faculty' 965 pnav = 1 966 956 967 form_fields = grok.AutoFields(IFaculty) 957 title = 'Edit faculty'958 pnav = 1959 968 960 969 @grok.action('Save') … … 1082 1091 title = u'Add certificate' 1083 1092 pnav = 1 1084 form_fields = grok.AutoFields(ICertificate) 1085 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 1098 1086 1099 @grok.action('Add certificate') 1087 1100 def addCertificate(self, **data): … … 1220 1233 grok.name('manage') 1221 1234 grok.require('waeup.manageUniversity') 1222 # We omit 'code' field from original schema and set prepend a new 1223 # one with 'readonly' set to True. 1224 form_fields = grok.Fields( 1225 code = schema.TextLine( 1226 title = u'Code', readonly=True 1227 ) 1228 ) + grok.AutoFields(ICertificate).omit('code') 1229 pnav = 1 1235 pnav = 1 1236 1237 form_fields = grok.AutoFields(ICertificate) 1230 1238 1231 1239 @property
Note: See TracChangeset for help on using the changeset viewer.