Changeset 5886 for main/waeup.sirp/trunk


Ignore:
Timestamp:
29 Mar 2011, 09:59:00 (14 years ago)
Author:
uli
Message:

Add an applicant login view for regular applicants containers.
This is not finished yet. We will proceed step by step, adding tests
and functionality.

File:
1 edited

Legend:

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

    r5861 r5886  
    279279        self.redirect(self.url(self.context))
    280280        return
    281    
     281
     282class LoginApplicant(WAeUPPage):
     283    grok.context(IApplicantsContainer)
     284    grok.name('login')
     285    grok.require('zope.Public')
     286
     287    title = u'Login'
     288   
     289    @property
     290    def label(self):
     291        return self.title
     292
     293    pnav = 3
     294    prefix = u'APP'
     295   
     296    def update(self, ac_series=None, ac_number=None, SUBMIT=None):
     297        self.ac_series = ac_series
     298        self.ac_number = ac_number
     299        if SUBMIT is None:
     300            return
     301
     302        if self.request.principal.id != 'zope.anybody':
     303            print self.request.principal
     304            # If record does not exist: create
     305            # Then: redirect to record...
     306            return
     307        return
     308
    282309#class AddApplicant(WAeUPAddFormPage):
    283310#    grok.context(IApplicantsContainer)
Note: See TracChangeset for help on using the changeset viewer.