Index: /main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser.py	(revision 6972)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser.py	(revision 6973)
@@ -17,4 +17,5 @@
 """
 import grok
+import sys
 from time import time
 from datetime import date, datetime
@@ -152,5 +153,6 @@
         hostel = Hostel()
         self.applyData(hostel, **data)
-        hostel.hostel_id = data['hostel_name'].lower().replace(' ','_')
+        hostel.hostel_id = data[
+            'hostel_name'].lower().replace(' ','-').replace('_','-')
         try:
             self.context.addHostel(hostel)
@@ -199,5 +201,7 @@
     pnav = 5
     taboneactions = ['Save']
-    tabtwoactions = ['Update beds']
+    tabtwoactions = ['Update all beds',
+        'Switch reservation of selected beds',
+        'Release selected beds']
 
     @property
@@ -217,5 +221,5 @@
         return
 
-    @grok.action('Update beds')
+    @grok.action('Update all beds')
     def updateBeds(self, **data):
         added, modified = self.context.updateBeds()
@@ -223,2 +227,55 @@
         self.redirect(self.url(self.context, '@@manage')+'#tab-2')
         return
+
+    @grok.action('Switch reservation of selected beds')
+    def switchReservation(self, **data):
+        form = self.request.form
+        if form.has_key('val_id'):
+            child_id = form['val_id']
+        else:
+            self.flash('No item selected.')
+            self.redirect(self.url(self.context, '@@manage')+'#tab-2')
+            return
+        if not isinstance(child_id, list):
+            child_id = [child_id]
+        switched = []
+        beds_for_fresh = getattr(self.context,'beds_for_fresh',[])
+        beds_for_pre = getattr(self.context,'beds_for_pre',[])
+        beds_for_returning = getattr(self.context,'beds_for_returning',[])
+        beds_for_final = getattr(self.context,'beds_for_final',[])
+        for bed_id in child_id:
+            try:
+                actual_type = self.context[bed_id].bed_type
+                sh, sex, bt = actual_type.split('_')
+                hostel_id, block, room_nr, bed = bed_id.split('_')
+                if bt == 'reserved':
+                    bt = 'all'
+                    if bed in beds_for_fresh:
+                        bt = 'fr'
+                    elif bed in beds_for_pre:
+                        bt = 'pr'
+                    elif bed in beds_for_final:
+                        bt = 'fi'
+                    elif bed in beds_for_returning:
+                        bt = 're'
+                    bt = u'%s_%s_%s' % (sh, sex, bt)
+                else:
+                    bt = u'%s_%s_reserved' % (sh, sex)
+                self.context[bed_id].bed_type = bt
+                switched.append(bed_id)
+            except:
+                self.flash('Could not switch %s: %s: %s' % (
+                        id, sys.exc_info()[0], sys.exc_info()[1]))
+                self.redirect(self.url(self.context, '@@manage')+'#tab-2')
+                return
+        if len(switched):
+            #import pdb; pdb.set_trace()
+            self.flash('Successfully switched: %s' % ', '.join(switched))
+            self.redirect(self.url(self.context, '@@manage')+'#tab-2')
+        return
+
+    @grok.action('Release selected beds')
+    def releaseBeds(self, **data):
+        #self.flash('%d released' % released)
+        self.redirect(self.url(self.context, '@@manage')+'#tab-2')
+        return
Index: /main/waeup.sirp/trunk/src/waeup/sirp/hostels/hostel.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/hostels/hostel.py	(revision 6972)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/hostels/hostel.py	(revision 6973)
@@ -81,8 +81,5 @@
                         elif bed in beds_for_returning:
                             bt = 're'
-                        # Hostels with special handling
-                        if self.special_handling != 'none':
-                            bt += "_" + self.special_handling
-                        bt = u'%(sex)s_%(bt)s' % vars()
+                        bt = u'%s_%s_%s' % (self.special_handling,sex,bt)
                         uid = u'%s_%s_%d_%s' % (self.hostel_id,block,room_nr,bed)
                         if self.has_key(uid):
Index: /main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py	(revision 6972)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py	(revision 6973)
@@ -100,11 +100,11 @@
         vocabulary = special_handling,
         required = True,
-        default = u'none',
+        default = u'regular',
         )
 
     reserved = schema.TextLine(
-        title = u'Reserved Rooms',
+        title = u'Reserved Beds',
         required = False,
-        default = u'',
+        readonly = True,
         )
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/hostels/tests.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/hostels/tests.py	(revision 6972)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/hostels/tests.py	(revision 6973)
@@ -94,5 +94,5 @@
         # Create a hostel
         hostel = Hostel()
-        hostel.hostel_id = u'hall_x'
+        hostel.hostel_id = u'hall-x'
         self.app['hostels'][hostel.hostel_id] = hostel
 
@@ -133,5 +133,5 @@
         results = [x for x in results] # Turn results generator into list
         assert len(results) == 1
-        assert results[0] is self.app['hostels']['hall_x']['xyz']
+        assert results[0] is self.app['hostels']['hall-x']['xyz']
 
 class HostelsUITests(HostelsFullSetup):
@@ -158,11 +158,11 @@
         self.assertTrue('Hostel created' in self.browser.contents)
         #import pdb; pdb.set_trace()
-        hall = self.app['hostels']['hall_1']
+        hall = self.app['hostels']['hall-1']
         hall.blocks_for_female = ['A','B']
-        self.browser.open(self.container_path + '/hall_1')
+        self.browser.open(self.container_path + '/hall-1')
         expected = '''...<ul id="form.blocks_for_female" ><li>Block A</li>
 <li>Block B</li></ul>...'''
         self.assertMatches(expected,self.browser.contents)
-        self.browser.open(self.container_path + '/hall_1/manage')
+        self.browser.open(self.container_path + '/hall-1/manage')
         self.browser.getControl(name="form.floors_per_block").value = '4'
         self.browser.getControl("Save").click()
Index: /main/waeup.sirp/trunk/src/waeup/sirp/hostels/vocabularies.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/hostels/vocabularies.py	(revision 6972)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/hostels/vocabularies.py	(revision 6973)
@@ -36,6 +36,6 @@
 
 special_handling = SimpleWAeUPVocabulary(
-    ('No special handling','none'),
-    ('Blocked','blocked'),
+    ('Regular Hostel','regular'),
+    ('Blocked Hostel','blocked'),
     ('Postgraduate Hostel','pg'),
     )
