Changeset 7114 for main/waeup.sirp/trunk
- Timestamp:
- 15 Nov 2011, 11:13:38 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7108 r7114 1448 1448 # Pages for students only 1449 1449 1450 class Student BaseEditActionButton(ManageActionButton):1450 class StudentPasswordActionButton(ManageActionButton): 1451 1451 grok.order(1) 1452 1452 grok.context(IStudent) 1453 1453 grok.view(StudentBaseDisplayFormPage) 1454 1454 grok.require('waeup.handleStudent') 1455 icon = 'actionicon_key.png' 1455 1456 text = 'Change password' 1456 target = 'bedit' 1457 target = 'change_password' 1458 1459 class StudentPassportActionButton(ManageActionButton): 1460 grok.order(1) 1461 grok.context(IStudent) 1462 grok.view(StudentBaseDisplayFormPage) 1463 grok.require('waeup.handleStudent') 1464 icon = 'actionicon_portrait.png' 1465 text = 'Change portrait' 1466 target = 'change_portrait' 1457 1467 1458 1468 class StudentPasswordSetting(grok.Adapter): … … 1481 1491 password = property(getPassword, setPassword) 1482 1492 1483 class StudentBaseEditFormPage(WAeUPEditFormPage): 1484 """ View to edit student base data by student 1485 """ 1486 grok.context(IStudent) 1487 grok.name('bedit') 1488 grok.require('waeup.handleStudent') 1489 #form_fields = grok.AutoFields(IStudentBaseEdit).omit( 1490 # 'student_id', 'reg_number', 'matric_number') 1493 class StudentPasswordFormPage(WAeUPEditFormPage): 1494 """ View to edit the password by student 1495 """ 1496 grok.context(IStudent) 1497 grok.name('change_password') 1498 grok.require('waeup.handleStudent') 1491 1499 form_fields = grok.AutoFields(IStudentPasswordSetting) 1492 1500 grok.template('baseeditpage') … … 1496 1504 1497 1505 def update(self): 1498 super(Student BaseEditFormPage, self).update()1506 super(StudentPasswordFormPage, self).update() 1499 1507 self.wf_info = IWorkflowInfo(self.context) 1500 1508 return … … 1524 1532 return 1525 1533 1534 class StudentFilesUploadPage(WAeUPPage): 1535 """ View to upload files by student 1536 """ 1537 grok.context(IStudent) 1538 grok.name('change_portrait') 1539 grok.require('waeup.handleStudent') 1540 grok.template('filesuploadpage') 1541 label = 'Upload portrait' 1542 title = 'Base Data' 1543 pnav = 4 1544 1526 1545 class StudentClearanceStartActionButton(ManageActionButton): 1527 1546 grok.order(1) -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r7096 r7114 65 65 """Data needed for password setting. 66 66 """ 67 name = schema.TextLine(68 title = u'Full Name',69 default = u'Nobody',70 required = True,71 readonly = True72 )73 67 74 68 password = schema.Password( -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_authentication.py
r6818 r7114 5 5 ## $Id$ 6 6 ## 7 ## Copyright (C) 2011 Uli Fouquet 7 ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann 8 8 ## This program is free software; you can redistribute it and/or modify 9 9 ## it under the terms of the GNU General Public License as published by … … 173 173 self.assertRaises( 174 174 Unauthorized, 175 self.browser.open, self.student_path + '/ bedit')175 self.browser.open, self.student_path + '/change_password') 176 176 return -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7112 r7114 10 10 StudentClearanceDisplayFormPage, StudentClearanceManageFormPage, 11 11 write_log_message, StudentBaseManageFormPage, StudentBaseDisplayFormPage, 12 Student BaseEditFormPage)12 StudentFilesUploadPage) 13 13 from waeup.sirp.students.interfaces import IStudent, IStudentClearance 14 14 … … 325 325 """Passport upload viewlet for students. 326 326 """ 327 grok.view(Student BaseEditFormPage)327 grok.view(StudentFilesUploadPage) 328 328 grok.require('waeup.handleStudent') 329 329
Note: See TracChangeset for help on using the changeset viewer.