Changeset 7330 for main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Timestamp:
- 11 Dec 2011, 14:03:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7322 r7330 39 39 from waeup.sirp.browser.layout import NullValidator 40 40 from waeup.sirp.browser.pages import add_local_role, del_local_roles 41 from waeup.sirp.browser.resources import datepicker, tabs, datatable 41 from waeup.sirp.browser.resources import datepicker, tabs, datatable, warning 42 42 from waeup.sirp.browser.viewlets import ManageActionButton, PrimaryNavTab 43 from waeup.sirp.browser.layout import jsaction, JSAction 43 44 from waeup.sirp.interfaces import ( 44 45 ISIRPObject, ILocalRolesAssignable, IExtFileStore, … … 57 58 MAX_UPLOAD_SIZE, IApplicantOnlinePayment, 58 59 ) 59 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED, PAID 60 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED 60 61 from waeup.sirp.students.viewlets import PrimaryStudentNavTab 61 62 from waeup.sirp.students.interfaces import IStudentsUtils … … 98 99 tabs.need() 99 100 datatable.need() 101 warning.need() 100 102 return super(ApplicantsRootManageFormPage, self).update() 101 103 … … 114 116 return get_users_with_local_roles(self.context) 115 117 116 # ToDo: Show warning message before deletion 117 @grok.action('Remove selected') 118 @jsaction('Remove selected') 118 119 def delApplicantsContainers(self, **data): 119 120 form = self.request.form … … 339 340 datepicker.need() # Enable jQuery datepicker in date fields. 340 341 tabs.need() 342 warning.need() 341 343 datatable.need() # Enable jQurey datatables for contents listing 342 344 return super(ApplicantsContainerManageFormPage, self).update() … … 362 364 return 363 365 364 # ToDo: Show warning message before deletion 365 @grok.action('Remove selected') 366 @jsaction('Remove selected') 366 367 def delApplicant(self, **data): 367 368 form = self.request.form … … 820 821 def update(self): 821 822 datepicker.need() # Enable jQuery datepicker in date fields. 823 warning.need() 822 824 super(ApplicantManageFormPage, self).update() 823 825 self.wf_info = IWorkflowInfo(self.context) … … 888 890 889 891 def unremovable(self, ticket): 890 usertype = getattr(self.request.principal, 'user_type', None) 891 if not usertype: 892 return False 893 return self.request.principal.user_type == 'applicant' and ticket.r_code 892 return False 894 893 895 894 # This method is also used by the ApplicantEditFormPage … … 928 927 return 929 928 930 @ grok.action('Remove selected tickets')929 @jsaction('Remove selected tickets') 931 930 def removePaymentTickets(self, **data): 932 931 self.delPaymentTickets(**data) … … 964 963 return actions 965 964 965 def unremovable(self, ticket): 966 state = IWorkflowState(self.context).getState() 967 return ticket.r_code or state in (INITIALIZED, SUBMITTED) 968 966 969 def emit_lock_message(self): 967 970 self.flash('The requested form is locked (read-only).') … … 973 976 self.emit_lock_message() 974 977 return 975 datepicker.need() # Enable jQuery datepicker in date fields.976 978 super(ApplicantEditFormPage, self).update() 977 979 return … … 993 995 return 994 996 995 @ grok.action('Remove selected tickets')997 @jsaction('Remove selected tickets') 996 998 def removePaymentTickets(self, **data): 997 999 self.delPaymentTickets(**data) … … 1001 1003 @grok.action('Save') 1002 1004 def save(self, **data): 1003 #import pdb; pdb.set_trace()1004 1005 if self.passport_changed is False: # False is not None! 1005 1006 return # error during image upload. Ignore other values
Note: See TracChangeset for help on using the changeset viewer.