Changeset 13349 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 26 Oct 2015, 14:35:35 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13344 r13349 2314 2314 @property 2315 2315 def all_required_fields_filled(self): 2316 if self.context.email and self.context.phone: 2317 return True 2318 return False 2316 if not self.context.email: 2317 return _("Email address is missing.") 2318 if not self.context.phone: 2319 return _("Phone number is missing.") 2320 return 2319 2321 2320 2322 @property … … 2334 2336 self.redirect(self.url(self.context, 'change_portrait')) 2335 2337 return 2336 if not self.all_required_fields_filled: 2337 self.flash(_("Not all required fields filled."), type="warning") 2338 arf_warning = self.all_required_fields_filled 2339 if arf_warning: 2340 self.flash(arf_warning, type="warning") 2338 2341 self.redirect(self.url(self.context, 'edit_base')) 2339 2342 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13345 r13349 2413 2413 # Uups, we forgot to fill the phone fields 2414 2414 self.browser.getControl("Start clearance").click() 2415 self.assertMatches('... Not all required fields filled...',2415 self.assertMatches('...Phone number is missing...', 2416 2416 self.browser.contents) 2417 2417 self.browser.open(self.student_path + '/edit_base')
Note: See TracChangeset for help on using the changeset viewer.