Changeset 5776 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 22 Feb 2011, 09:03:15 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/browser.py
r5758 r5776 62 62 list_results_display_widget = CustomWidgetFactory( 63 63 MultiListDisplayWidget, subwidget=results_display_widget) 64 65 #class ApplicationsPage(WAeUPPage):66 # grok.context(IApplicantContainer)67 # grok.name('index')68 # title = 'Applications'69 # pnav = 170 #71 # def getApplications(self):72 # """Get a list of all stored applications.73 # """74 # for key, val in self.context.items():75 # url = self.url(val)76 # yield(dict(url=url, name=key))77 78 #class AddApplicant(WAeUPAddFormPage):79 # grok.context(IApplicantContainer)80 # grok.name('add')81 # form_fields = grok.AutoFields(IApplicant)82 # form_fields['fst_sit_results'].custom_widget = list_results_widget83 # form_fields['passport'].custom_widget = EncodingImageFileWidget84 # label = 'Add Applicant'85 # title = 'Add Applicant'86 # pnav = 187 #88 # @grok.action('Add applicant')89 # def addApplicant(self, **data):90 # from waeup.sirp.jambtables.applicants import Applicant91 # applicant = Applicant()92 # self.applyData(applicant, **data)93 # # XXX: temporarily disabled.94 # #self.context[applicant.reg_no] = applicant95 # try:96 # self.context[applicant.access_code] = applicant97 # except KeyError:98 # self.flash('The given access code is already in use!')99 # return100 # self.redirect(self.url(self.context))101 102 class DisplayApplicant(WAeUPDisplayFormPage):103 grok.context(IApplicant)104 grok.name('index')105 form_fields = grok.AutoFields(IApplicant)106 form_fields['fst_sit_results'].custom_widget = list_results_display_widget107 #form_fields['passport'].custom_widget = PassportDisplayWidget108 form_fields['passport'].custom_widget = ThumbnailWidget109 label = 'Applicant'110 title = 'Applicant'111 pnav = 1112 113 class EditApplicant(WAeUPEditFormPage):114 grok.context(IApplicant)115 grok.name('edit')116 form_fields = grok.AutoFields(IApplicantPDEEditData)117 #form_fields['passport'].custom_widget = FileWidget118 #form_fields['passport'].custom_widget = PassportWidget119 form_fields['passport'].custom_widget = EncodingImageFileWidget120 grok.template('form_edit_pde')121 122 def update(self):123 super(EditApplicant, self).update()124 print self.request.form125 return126 127 @property128 def label(self):129 # XXX: Use current/upcoming session130 return 'Apply for Post UDE Screening Test (2009/2010)'131 title = 'Edit Application'132 pnav = 1133 134 @grok.action('Save')135 def save(self, **data):136 self.applyData(self.context, **data)137 self.context._p_changed = True138 return139 140 @grok.action('Final Submit')141 def finalsubmit(self, **data):142 self.applyData(self.context, **data)143 self.context._p_changed = True144 # XXX: Lock the form for editing...145 return146 64 147 65 class Login_PDE(LoginPage):
Note: See TracChangeset for help on using the changeset viewer.