Changeset 5776 for main


Ignore:
Timestamp:
22 Feb 2011, 09:03:15 (14 years ago)
Author:
uli
Message:

Remove views not specific for jambtables and respective page templates.

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  
    6262list_results_display_widget = CustomWidgetFactory(
    6363    MultiListDisplayWidget, subwidget=results_display_widget)
    64 
    65 #class ApplicationsPage(WAeUPPage):
    66 #    grok.context(IApplicantContainer)
    67 #    grok.name('index')
    68 #    title = 'Applications'
    69 #    pnav = 1
    70 #   
    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_widget
    83 #    form_fields['passport'].custom_widget = EncodingImageFileWidget
    84 #    label = 'Add Applicant'
    85 #    title = 'Add Applicant'
    86 #    pnav = 1
    87 #
    88 #    @grok.action('Add applicant')
    89 #    def addApplicant(self, **data):
    90 #        from waeup.sirp.jambtables.applicants import Applicant
    91 #        applicant = Applicant()
    92 #        self.applyData(applicant, **data)
    93 #        # XXX: temporarily disabled.
    94 #        #self.context[applicant.reg_no] = applicant
    95 #        try:
    96 #            self.context[applicant.access_code] = applicant
    97 #        except KeyError:
    98 #            self.flash('The given access code is already in use!')
    99 #            return
    100 #        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_widget
    107     #form_fields['passport'].custom_widget = PassportDisplayWidget
    108     form_fields['passport'].custom_widget = ThumbnailWidget
    109     label = 'Applicant'
    110     title = 'Applicant'
    111     pnav = 1
    112 
    113 class EditApplicant(WAeUPEditFormPage):
    114     grok.context(IApplicant)
    115     grok.name('edit')
    116     form_fields = grok.AutoFields(IApplicantPDEEditData)
    117     #form_fields['passport'].custom_widget = FileWidget
    118     #form_fields['passport'].custom_widget = PassportWidget
    119     form_fields['passport'].custom_widget = EncodingImageFileWidget
    120     grok.template('form_edit_pde')
    121 
    122     def update(self):
    123         super(EditApplicant, self).update()
    124         print self.request.form
    125         return
    126    
    127     @property
    128     def label(self):
    129         # XXX: Use current/upcoming session
    130         return 'Apply for Post UDE Screening Test (2009/2010)'
    131     title = 'Edit Application'
    132     pnav = 1
    133 
    134     @grok.action('Save')
    135     def save(self, **data):
    136         self.applyData(self.context, **data)
    137         self.context._p_changed = True
    138         return
    139 
    140     @grok.action('Final Submit')
    141     def finalsubmit(self, **data):
    142         self.applyData(self.context, **data)
    143         self.context._p_changed = True
    144         # XXX: Lock the form for editing...
    145         return
    14664
    14765class Login_PDE(LoginPage):
Note: See TracChangeset for help on using the changeset viewer.