Ignore:
Timestamp:
14 May 2011, 00:47:59 (14 years ago)
Author:
uli
Message:

Remove trash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r6078 r6080  
    2727from hurry.jquery import jquery
    2828from hurry.jqueryui import jqueryui
    29 from zope.component import getUtility, getAllUtilitiesRegisteredFor, createObject
     29from zope.component import getUtility, createObject
    3030from zope.formlib.widgets import FileWidget, DateWidget
    3131from zope.securitypolicy.interfaces import IPrincipalRoleManager
     
    5454from waeup.sirp.widgets.restwidget import ReSTWidget
    5555
    56 #from zope.formlib.objectwidget import ObjectWidget
    5756from zope.formlib.sequencewidget import ListSequenceWidget, SequenceDisplayWidget
    5857from zope.formlib.widget import CustomWidgetFactory
     
    7170results_display_widget = CustomWidgetFactory(
    7271    WAeUPObjectDisplayWidget, ResultEntry)
    73 
    74 #list_results_widget = CustomWidgetFactory(
    75 #    ListSequenceWidget, subwidget=results_widget)
    7672
    7773list_results_widget = CustomWidgetFactory(
     
    187183        self.redirect(self.url(self.context))
    188184
    189     #def getContainerProviders(self):
    190     #    """Get a list of applicants container providers.
    191     #
    192     #    Applicants container providers are named utilities that help
    193     #    to create applicants containers of different types
    194     #    (JAMB-based, non-JAMB-based, etc.).
    195     #
    196     #    The list returned contains dicts::
    197     #
    198     #      {'name': <utility_name>,
    199     #       'provider': <provider instance>}
    200     #
    201     #    where `utility_name` is the name under which the respective
    202     #    provider utility is registered and `provider` is the real
    203     #    provider instance.
    204     #
    205     #    The `utility_name` can be used to lookup the utility anew (for
    206     #    instance after submitting a form) and the `provider` instance
    207     #    can be used to create new instances of the respective
    208     #    applicants container type.
    209     #    """
    210     #    providers = getAllUtilitiesRegisteredFor(IApplicantsContainerProvider)
    211     #    result = [
    212     #        {'name': getattr(x, 'grokcore.component.directive.name'),
    213     #         'provider': x}
    214     #         for x in providers
    215     #        ]
    216     #    return result
    217 
    218185class ApplicantsRootBreadcrumb(Breadcrumb):
    219186    """A breadcrumb for applicantsroot.
     
    359326        self.redirect(self.url(self.context[pin], 'edit'))
    360327        return
    361 
    362 #class AddApplicant(WAeUPAddFormPage):
    363 #    grok.context(IApplicantsContainer)
    364 #    grok.name('add')
    365 #    form_fields = grok.AutoFields(IApplicant)
    366 #    form_fields['fst_sit_results'].custom_widget = list_results_widget
    367 #    form_fields['passport'].custom_widget = EncodingImageFileWidget
    368 #    label = 'Add Applicant'
    369 #    title = 'Add Applicant'
    370 #    pnav = 1
    371 #
    372 #    @grok.action('Add applicant')
    373 #    def addApplicant(self, **data):
    374 #        from waeup.sirp.jambtables.applicants import Applicant
    375 #        applicant = Applicant()
    376 #        self.applyData(applicant, **data)
    377 #        # XXX: temporarily disabled.
    378 #        #self.context[applicant.reg_no] = applicant
    379 #        try:
    380 #            self.context[applicant.access_code] = applicant
    381 #        except KeyError:
    382 #            self.flash('The given access code is already in use!')
    383 #            return
    384 #        self.redirect(self.url(self.context))
    385328
    386329class DisplayApplicant(WAeUPDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.