Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 5836)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 5837)
@@ -24,4 +24,7 @@
 import grok
 
+from datetime import datetime
+from hurry.jquery import jquery
+from hurry.jqueryui import jqueryui
 from zope.component import getUtility, getAllUtilitiesRegisteredFor
 from zope.formlib.widgets import FileWidget
@@ -31,4 +34,5 @@
 from waeup.sirp.browser.pages import LoginPage
 from waeup.sirp.interfaces import IWAeUPObject
+from waeup.sirp.browser.resources import datepicker
 from waeup.sirp.browser.viewlets import (
     AddActionButton, ManageActionButton, PrimaryNavTab,
@@ -204,6 +208,12 @@
     grok.name('index')
 
-    title = 'Applicants Container'
-    label = 'Applicants Container'
+    @property
+    def title(self):
+        return "Applicants Container: %s" % getattr(
+            self.context, '__name__', 'unnamed')
+
+    @property
+    def label(self):
+        return self.title
     pnav = 2
 
@@ -214,12 +224,86 @@
 
 class ApplicantsContainerEditPage(WAeUPPage):
+    """Manage/edit a container for regular applicants.
+    """
     grok.context(IApplicantsContainer)
     grok.name('manage')
 
-    title = 'Manage Applicants Container'
-    label = 'Manage Applicants Container'
-    pnav = 2
-
-
+    @property
+    def title(self):
+        return "Manage applicants container: %s" % getattr(
+            self.context, '__name__', 'unnamed')
+    
+    @property
+    def label(self):
+        return self.title
+
+    pnav = 2
+
+    def update(self, CANCEL=None, SAVE=None,
+               title=None, description=None, startdate=None, enddate=None):
+        datepicker.need()
+
+        if CANCEL is not None:
+            self.redirect(self.url(self.context))
+            return
+        if SAVE is None:
+            return
+        self.context.title = title
+        self.context.description = description
+        try:
+            self.context.startdate = datetime.strptime(startdate, '%Y-%m-%d')
+        except ValueError:
+            pass
+        try:
+            self.context.enddate = datetime.strptime(enddate, '%Y-%m-%d')
+        except ValueError:
+            pass
+        self.flash('Data saved.')
+        return
+
+    def getFormattedDates(self):
+        """Returns a dict with formatted start- and enddate.
+
+        Returns dates of form ``YYYY-MM-DD`` based on the start and
+        enddates of the context container. The result dict has
+        format::
+
+          { 'start': '<YYYY-MM-DD>',
+            'end': '<YYYY-MM-DD>'}
+
+        Each value can also be ``''`` (empty string) if unset.
+        """
+        start = ''
+        if self.context.startdate is not None:
+            start = datetime.strftime(self.context.startdate, '%Y-%m-%d')
+        end = ''
+        if self.context.enddate is not None:
+            end = datetime.strftime(self.context.enddate, '%Y-%m-%d')
+        return {'start' : start, 'end' : end }
+
+
+class ManageApplicantsContainer(WAeUPEditFormPage):
+    grok.context(IApplicantsContainer)
+    grok.name('edit')
+    form_fields = grok.AutoFields(IApplicantsContainer)
+    label = 'Edit container'
+    title = label
+    pnav = 2
+
+    def update(self):
+        datepicker.need()
+        return super(ManageApplicantsContainer, self).update()
+
+    @grok.action('Apply')
+    def apply(self, **data):
+        self.applyData(self.context, **data)
+        self.flash('Data saved.')
+        return
+        
+    @grok.action('Back')
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
+        return
+    
 #class AddApplicant(WAeUPAddFormPage):
 #    grok.context(IApplicantContainer)
