- Timestamp:
- 28 Aug 2020, 08:04:20 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r16217 r16218 1107 1107 dict(name=x, title=y) for x, y in allowed_transitions] 1108 1108 1109 def saveCourses(self , changed_fields):1109 def saveCourses(self): 1110 1110 """In custom packages we needed to customize the certificate 1111 1111 select widget. We just save course1 and course2 if these customized 1112 1112 fields appear in the form. 1113 1113 """ 1114 error = None 1115 return error, changed_fields 1114 return None, [] 1116 1115 1117 1116 @action(_('Save'), style='primary') … … 1135 1134 else: 1136 1135 changed_fields = [] 1137 error, changed_ fields = self.saveCourses(changed_fields)1136 error, changed_courses = self.saveCourses() 1138 1137 if error: 1139 self.flash(error) 1140 return 1138 self.flash(error, type='danger') 1139 return 1140 changed_fields += changed_courses 1141 1141 if password: 1142 1142 # Now we know that the form has no errors and can set password ... … … 1297 1297 return 1298 1298 1299 def saveCourses(self):1300 """In custom packages we needed to customize the certificate1301 select widget. We just save course1 and course2 if these customized1302 fields appear in the form.1303 """1304 return1305 1306 1299 @action(_('Save'), style='primary') 1307 1300 def save(self, **data): … … 1310 1303 return 1311 1304 self.applyData(self.context, **data) 1312 error = self.saveCourses()1305 error, dummy = self.saveCourses() 1313 1306 if error: 1314 self.flash(error )1307 self.flash(error, type='danger') 1315 1308 return 1316 1309 self.flash(_('Form has been saved.')) … … 1359 1352 return 1360 1353 self.applyData(self.context, **data) 1354 error, dummy = self.saveCourses() 1355 if error: 1356 self.flash(error, type='danger') 1357 return 1361 1358 state = IWorkflowState(self.context).getState() 1362 1359 # This shouldn't happen, but the application officer
Note: See TracChangeset for help on using the changeset viewer.