Changeset 5851


Ignore:
Timestamp:
12 Mar 2011, 14:29:37 (14 years ago)
Author:
uli
Message:

Really remove the old manage page for applicants containers.

File:
1 edited

Legend:

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

    r5850 r5851  
    245245    text = 'Manage'
    246246
    247 class ApplicantsContainerEditPage(WAeUPPage):
    248     """Manage/edit a container for regular applicants.
    249     """
    250     grok.context(IApplicantsContainer)
    251     grok.name('manage2')
    252 
    253     @property
    254     def title(self):
    255         return "Manage applicants container: %s" % getattr(
    256             self.context, '__name__', 'unnamed')
    257    
    258     @property
    259     def label(self):
    260         return self.title
    261 
    262     pnav = 3
    263 
    264     def update(self, CANCEL=None, SAVE=None,
    265                title=None, description=None, startdate=None, enddate=None):
    266         datepicker.need()
    267 
    268         if CANCEL is not None:
    269             self.redirect(self.url(self.context))
    270             return
    271         if SAVE is None:
    272             return
    273         self.context.title = title
    274         self.context.description = description
    275         try:
    276             self.context.startdate = datetime.strptime(startdate, '%Y-%m-%d')
    277         except ValueError:
    278             pass
    279         try:
    280             self.context.enddate = datetime.strptime(enddate, '%Y-%m-%d')
    281         except ValueError:
    282             pass
    283         self.flash('Data saved.')
    284         return
    285 
    286     def getFormattedDates(self):
    287         """Returns a dict with formatted start- and enddate.
    288 
    289         Returns dates of form ``YYYY-MM-DD`` based on the start and
    290         enddates of the context container. The result dict has
    291         format::
    292 
    293           { 'start': '<YYYY-MM-DD>',
    294             'end': '<YYYY-MM-DD>'}
    295 
    296         Each value can also be ``''`` (empty string) if unset.
    297         """
    298         start = ''
    299         if self.context.startdate is not None:
    300             start = datetime.strftime(self.context.startdate, '%Y-%m-%d')
    301         end = ''
    302         if self.context.enddate is not None:
    303             end = datetime.strftime(self.context.enddate, '%Y-%m-%d')
    304         return {'start' : start, 'end' : end }
    305 
    306247
    307248class ManageApplicantsContainer(WAeUPEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.