Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 8685)
@@ -38,4 +38,5 @@
 from waeup.kofa.hostels.interfaces import (
     IHostelsContainer, IHostel, IBed, IBedAllocateStudent)
+from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
 
 def write_log_message(view, message):
@@ -105,4 +106,9 @@
     label = _('Accommodation Section')
     pnav = 5
+    form_fields = grok.AutoFields(IHostelsContainer)
+    form_fields[
+        'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
+    form_fields[
+        'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
 
 class HostelsContainerManageActionButton(ManageActionButton):
@@ -113,5 +119,5 @@
     text = _('Manage accommodation section')
 
-class HostelsContainerManagePage(KofaDisplayFormPage):
+class HostelsContainerManagePage(KofaEditFormPage):
     """The manage page for hostel containers.
     """
@@ -122,7 +128,17 @@
     pnav = 5
     label = _('Manage accommodation section')
+    form_fields = grok.AutoFields(IHostelsContainer)
+    taboneactions = [_('Save')]
+    tabtwoactions = [_('Add hostel'), _('Remove selected')]
 
     def update(self):
+        tabs.need()
+        self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''
+        qs = self.request.get('QUERY_STRING', '')
+        if not qs:
+            qs = 'tab1'
+        setattr(self, qs, 'active')
         warning.need()
+        datatable.need()
         return super(HostelsContainerManagePage, self).update()
 
@@ -146,4 +162,10 @@
     def addSubunit(self, **data):
         self.redirect(self.url(self.context, 'addhostel'))
+        return
+
+    @action(_('Save'), style='primary')
+    def save(self, **data):
+        self.applyData(self.context, **data)
+        self.flash(_('Settings have been saved.'))
         return
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt	(revision 8685)
@@ -2,28 +2,59 @@
     i18n:domain="waeup.kofa"
     method="POST" enctype="multipart/form-data">
-  <table>
-    <thead>
-      <tr>
-        <th>&nbsp;
-        </th>
-        <th i18n:translate="">Id
-        </th>
-        <th i18n:translate="">Name
-        </th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr tal:repeat="hostel context/values"> <td>
-          <input type="checkbox" name="val_id" tal:attributes="value hostel/hostel_id" /> </td> <td>
-          <a tal:attributes="href python: view.url(hostel)" tal:content="hostel/__name__"> ID</a> </td> <td>
-          <span tal:content="hostel/hostel_name">ID
-          </span> </td>
-      </tr>
-    </tbody>
-  </table>
-  <div tal:condition="view/availableActions">
-    <span tal:repeat="action view/actions" tal:omit-tag="">
-      <input tal:replace="structure action/render"/>
-    </span>
+
+
+  <ul class="tabs" data-tabs="tabs">
+    <li tal:attributes="class view/tab1">
+    <a href="#tab-1">
+      <span i18n:translate="">Settings
+      </span></a>
+    </li>
+    <li tal:attributes="class view/tab2">
+    <a href="#tab-2" i18n:translate="">Hostels</a>
+    </li>
+  </ul>
+
+  <div class="tab-content">
+    <div id="tab-1" tal:attributes="class view/tab1">
+      <table class="form-table">
+        <tbody>
+          <tal:widgets content="structure provider:widgets" />
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.taboneactions"
+            tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
+    <div id="tab-2" tal:attributes="class view/tab2"> <br />
+      <table class="display dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th i18n:translate="">Id
+            </th>
+            <th i18n:translate="">Name
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="hostel context/values"> <td>
+              <input type="checkbox" name="val_id" tal:attributes="value hostel/hostel_id" /> </td> <td>
+              <a tal:attributes="href python: view.url(hostel)" tal:content="hostel/__name__"> ID</a> </td> <td>
+              <span tal:content="hostel/hostel_name">ID
+              </span> </td>
+          </tr>
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabtwoactions"
+            tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
   </div>
 </form>
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt	(revision 8685)
@@ -1,6 +1,18 @@
-<div i18n:domain="waeup.kofa"
-   i18n:translate="" tal:condition="python: not len(context.keys())">
-There no subobjects registered yet.
-</div>
+<table class="form-table" i18n:domain="waeup.kofa">
+  <tbody>
+    <tal:block repeat="widget view/widgets">
+      <tr>
+        <td class="fieldname">
+          <span tal:content="widget/label">LABEL</span>:
+        </td>
+        <td>
+          <span tal:content="structure widget">
+            <input type="text" />
+          </span>
+        </td>
+      </tr>
+    </tal:block>
+  </tbody>
+</table>
 
 <table i18n:domain="waeup.kofa">
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/container.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/container.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/container.py	(revision 8685)
@@ -22,4 +22,5 @@
 from waeup.kofa.hostels.interfaces import IHostelsContainer, IHostel
 from waeup.kofa.utils.logger import Logger
+from waeup.kofa.utils.helpers import attrs_to_fields
 
 class HostelsContainer(grok.Container, Logger):
@@ -61,2 +62,4 @@
         target = self.__name__
         return self.logger_info(ob_class,target,comment)
+
+HostelsContainer = attrs_to_fields(HostelsContainer)
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 8685)
@@ -202,5 +202,5 @@
             notify(grok.ObjectModifiedEvent(self))
             accommodation_session = grok.getSite()[
-                'configuration'].accommodation_session
+                'hostels'].accommodation_session
             try:
                 bedticket = grok.getSite()['students'][old_owner][
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py	(revision 8685)
@@ -16,7 +16,9 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##
+from datetime import datetime
 from zope.interface import invariant, Invalid
 from zope import schema
-from waeup.kofa.interfaces import IKofaObject
+from waeup.kofa.interfaces import (
+    IKofaObject, academic_sessions_vocab, registration_states_vocab)
 from waeup.kofa.interfaces import MessageFactory as _
 from waeup.kofa.hostels.vocabularies import (
@@ -27,4 +29,32 @@
 
     """
+
+    startdate = schema.Datetime(
+        title = _(u'Hostel Allocation Start Date'),
+        required = False,
+        description = _('Example:') + u'2011-12-01 18:30:00+01:00',
+        )
+
+    enddate = schema.Datetime(
+        title = _(u'Hostel Allocation Closing Date'),
+        required = False,
+        description = _('Example:') + u'2011-12-31 23:59:59+01:00',
+        )
+
+    accommodation_session = schema.Choice(
+        title = _(u'Booking Session'),
+        source = academic_sessions_vocab,
+        default = datetime.now().year,
+        required = False,
+        readonly = False,
+        )
+
+    accommodation_states = schema.List(
+        title = _(u'Allowed States'),
+        value_type = schema.Choice(
+            vocabulary = registration_states_vocab,
+            ),
+        default = [],
+        )
 
 class IHostel(IKofaObject):
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 8685)
@@ -124,5 +124,5 @@
 
         # Set accommodation_session
-        self.app['configuration'].accommodation_session = 2004
+        self.app['hostels'].accommodation_session = 2004
 
         # Create a hostel
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py	(revision 8234)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py	(revision 8685)
@@ -33,5 +33,5 @@
     def acco_students(self, context):
         catalog = getUtility(ICatalog, name='students_catalog')
-        accommodation_session = getSite()['configuration'].accommodation_session
+        accommodation_session = getSite()['hostels'].accommodation_session
         students = catalog.searchResults(current_session=(
             accommodation_session,accommodation_session))
