Changeset 17807 for main/waeup.uniben/trunk/src
- Timestamp:
- 3 Jun 2024, 13:23:31 (7 months ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r17750 r17807 874 874 form_fields['email'].field.required = True 875 875 876 class CustomStudentFilesUploadPage(NigeriaStudentFilesUploadPage):877 """ View to upload passport picture.878 """879 880 def update(self):881 # Postgrad students should allowed to change their picture whenever they want.882 if self.context.is_postgrad:883 return884 if self.context.is_jupeb:885 emit_lock_message(self)886 return887 super(StudentFilesUploadPage, self).update()888 return889 890 876 891 877 -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r17743 r17807 817 817 #: A tuple containing the names of registration states in which changing of 818 818 #: passport pictures is allowed. 819 PORTRAIT_CHANGE_STATES = (CLEARANCE, REQUESTED) 819 PORTRAIT_CHANGE_STATES = (CLEARANCE, ADMITTED) 820 821 def allowPortraitChange(self, student): 822 """Check if student is allowed to change the portrait file. 823 """ 824 if student.is_jupeb: 825 return False 826 if student.state not in self.PORTRAIT_CHANGE_STATES: 827 return False 828 return True 820 829 821 830 #: A tuple containing the names of registration states in which changing of -
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r17542 r17807 53 53 grok.require('waeup.viewStudent') 54 54 55 class StudentPassportActionButton(StudentPassportActionButton):56 57 @property58 def target_url(self):59 if self.context.is_jupeb:60 return ''61 PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES62 if self.context.state not in PORTRAIT_CHANGE_STATES and not self.context.is_postgrad:63 return ''64 return self.view.url(self.view.context, self.target)65 55 66 56 class SwitchLibraryAccessActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.