Changeset 9563 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 6 Nov 2012, 20:29:35 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9557 r9563 52 52 IStudentsContainer, IStudent, 53 53 IUGStudentClearance,IPGStudentClearance, 54 IStudentPersonal, IStudent Base, IStudentStudyCourse,54 IStudentPersonal, IStudentPersonalEdit, IStudentBase, IStudentStudyCourse, 55 55 IStudentStudyCourseTransfer, 56 56 IStudentAccommodation, IStudentStudyLevel, … … 791 791 grok.name('edit_personal') 792 792 grok.require('waeup.handleStudent') 793 form_fields = grok.AutoFields(IStudentPersonal ).omit('personal_updated')793 form_fields = grok.AutoFields(IStudentPersonalEdit).omit('personal_updated') 794 794 label = _('Edit personal data') 795 795 pnav = 4 -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9543 r9563 310 310 """ 311 311 312 class IStudentPersonalEdit(IStudentPersonal): 313 """Interface for editing personal data by students. 314 315 Here we can repeat the fields from IStudentPersonal and set the 316 `required` if necessary. 317 """ 318 319 perm_address = schema.Text( 320 title = _(u'Permanent Address'), 321 required = True, 322 ) 323 312 324 class IStudentUpdateByRegNo(IStudent): 313 325 """Representation of a student. Skip regular reg_number validation. -
main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
r9545 r9563 41 41 from waeup.kofa.students.export import EXPORTER_NAMES 42 42 from waeup.kofa.students.interfaces import ( 43 IStudent, IStudentNavigation, I CSVStudentExporter)43 IStudent, IStudentNavigation, IStudentPersonalEdit, ICSVStudentExporter) 44 44 from waeup.kofa.students.payments import StudentPaymentsContainer 45 45 from waeup.kofa.students.utils import generate_student_id … … 52 52 owned by students. 53 53 """ 54 grok.implements(IStudent, IStudentNavigation )54 grok.implements(IStudent, IStudentNavigation, IStudentPersonalEdit) 55 55 grok.provides(IStudent) 56 56 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9559 r9563 488 488 self.assertEqual(self.browser.headers['Status'], '200 Ok') 489 489 self.assertEqual(self.browser.url, self.edit_personal_path) 490 self.browser.getControl("Save").click() 491 # perm_address is required in IStudentPersonalEdit 492 self.assertMatches('...Required input is missing...', 493 self.browser.contents) 494 self.browser.getControl(name="form.perm_address").value = 'My address!' 490 495 self.browser.getControl("Save").click() 491 496 self.assertMatches('...Form has been saved...',
Note: See TracChangeset for help on using the changeset viewer.