Changeset 4492 for waeup/branches
- Timestamp:
- 31 Jul 2009, 08:05:45 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/department.py
r4491 r4492 1 1 """University departments. 2 2 """ 3 import copy 3 4 import grok 4 5 from zope.component import createObject … … 133 134 class AddCourseForm(grok.AddForm): 134 135 grok.context(IDepartment) 135 form_fields = grok.AutoFields(ICourse) 136 form_fields = copy.deepcopy(grok.AutoFields(ICourse)) 137 form_fields.get('code').field.readonly = False 136 138 label = 'Add a course' 137 139 … … 148 150 self.redirect(self.url(self.context)) 149 151 152 @grok.action('Cancel') 153 def cancel(self, **data): 154 self.redirect(self.url(self.context)) 155 return 156 157 150 158 class AddCourse(FormWrapMixin, grok.Viewlet): 151 159 """A viewlet that wraps the `AddFacultyForm`.
Note: See TracChangeset for help on using the changeset viewer.