fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13876] fixing forms


From: Saul
Subject: [Fmsystem-commits] [13876] fixing forms
Date: Thu, 10 Sep 2015 23:59:51 +0000

Revision: 13876
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13876
Author:   psaul
Date:     2015-09-10 23:59:50 +0000 (Thu, 10 Sep 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
    branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
    branches/dev-syncromind/booking/inc/class.uibooking.inc.php
    branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
    branches/dev-syncromind/booking/inc/class.uidocument.inc.php
    branches/dev-syncromind/booking/inc/class.uievent.inc.php
    branches/dev-syncromind/booking/inc/class.uipermission.inc.php
    branches/dev-syncromind/booking/inc/class.uiresource.inc.php
    branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
    branches/dev-syncromind/booking/templates/base/application_edit.xsl
    branches/dev-syncromind/booking/templates/base/application_new.xsl
    branches/dev-syncromind/booking/templates/base/booking_edit.xsl
    branches/dev-syncromind/booking/templates/base/building.xsl
    branches/dev-syncromind/booking/templates/base/building_form.xsl
    branches/dev-syncromind/booking/templates/base/document_form.xsl
    branches/dev-syncromind/booking/templates/base/event_edit.xsl
    branches/dev-syncromind/booking/templates/base/event_new.xsl
    branches/dev-syncromind/booking/templates/base/permission_form.xsl
    branches/dev-syncromind/booking/templates/base/resource_form.xsl

Added Paths:
-----------
    branches/dev-syncromind/booking/js/booking/adddatetimepicker.js

Removed Paths:
-------------
    branches/dev-syncromind/booking/js/booking/applicationnew.js

Modified: branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-09-10 23:59:50 UTC (rev 13876)
@@ -458,7 +458,7 @@
                        $allocation['building'] = 
$this->building_bo->so->read_single($allocation['building_id']);
                        $allocation['building_name'] = 
$allocation['building']['name'];
                        $errors = array();
-            $tabs = array();
+                        $tabs = array();
                        $tabs['generic']        = array('label' => 
lang('Allocations Edit'), 'link' => '#allocations_edit');
                        $active_tab = 'generic';
             
@@ -485,9 +485,9 @@
                        $allocation['resources_json'] = 
json_encode(array_map('intval', $allocation['resources']));
                        $allocation['cancel_link'] = 
self::link(array('menuaction' => 'booking.uiallocation.show', 'id' => 
$allocation['id']));
                        $allocation['application_link'] = 
self::link(array('menuaction' => 'booking.uiapplication.show', 'id' => 
$allocation['application_id']));
-            $allocation['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $allocation['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
-            $GLOBALS['phpgw']->jqcal->add_listener('field_from', 'datetime');
+                        $GLOBALS['phpgw']->jqcal->add_listener('field_from', 
'datetime');
                        $GLOBALS['phpgw']->jqcal->add_listener('field_to', 
'datetime');
             
                        self::render_template_xsl('allocation_edit', 
array('allocation' => $allocation));

Modified: branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiapplication.inc.php     
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uiapplication.inc.php     
2015-09-10 23:59:50 UTC (rev 13876)
@@ -740,7 +740,7 @@
                        array_set_default($application, 'dates', 
$default_dates);
                        
                        $this->flash_form_errors($errors);
-//                     self::add_javascript('booking', 'booking', 
'applicationnew.js');
+//                     self::add_javascript('booking', 'booking', 
'adddatetimepicker.js');
                        $application['resources_json'] = 
json_encode(array_map('intval', $application['resources']));
                        $application['accepted_documents_json'] = 
json_encode($application['accepted_documents']);
                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'booking')
@@ -787,7 +787,7 @@
                         $active_tab = 'generic';
 
                         $application['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
-                        self::add_javascript('booking', 'booking', 
'applicationnew.js');
+                        self::add_javascript('booking', 'booking', 
'adddatetimepicker.js');
                        
                        self::render_template_xsl('application_new', 
array('application' => $application, 'activities' => $activities, 'agegroups' 
=> $agegroups, 'audience' => $audience,'config' => $application_text));
                }
@@ -803,7 +803,7 @@
                        $application['building_id'] = $building_info['id'];
                        $application['building_name'] = $building_info['name'];
             
-            $tabs = array();
+                        $tabs = array();
                        $tabs['generic']        = array('label' => 
lang('Application Edit'), 'link' => '#application_edit');
                        $active_tab = 'generic';
             
@@ -847,7 +847,7 @@
                        }
                        $this->flash_form_errors($errors);
 //                     self::add_javascript('booking', 'booking', 
'application.js');
-                       self::add_javascript('booking', 'booking', 
'applicationnew.js');
+                       self::add_javascript('booking', 'booking', 
'adddatetimepicker.js');
                        $this->set_case_officer($application);
                        
                        $application['resources_json'] = 
json_encode(array_map('intval', $application['resources']));

Modified: branches/dev-syncromind/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-09-10 
13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-09-10 
23:59:50 UTC (rev 13876)
@@ -318,10 +318,10 @@
                        }       
                        $booking['building_id'] = phpgw::get_var('building_id', 
'int', 'GET');
                        $booking['resources'] = phpgw::get_var('resources', 
'int', 'GET');
-            #The string replace is a workaround for a problem at Bergen 
Kommune 
+                        #The string replace is a workaround for a problem at 
Bergen Kommune 
 
-            $booking['from_'] = str_replace('%3A',':',phpgw::get_var('from_', 
'str', 'GET'));
-            $booking['to_'] = str_replace('%3A',':',phpgw::get_var('to_', 
'str', 'GET'));
+                        $booking['from_'] = 
str_replace('%3A',':',phpgw::get_var('from_', 'str', 'GET'));
+                        $booking['to_'] = 
str_replace('%3A',':',phpgw::get_var('to_', 'str', 'GET'));
                        $time_from = explode(" ",phpgw::get_var('from_', 'str', 
'GET'));
                        $time_to = explode(" ",phpgw::get_var('to_', 'str', 
'GET'));
 
@@ -341,13 +341,13 @@
                                array_set_default($booking, 'resources', 
array(get_var('resource', int, 'GET')));
                                $booking['organization_id'] = 
$allocation['organization_id'];
                                $booking['organization_name'] = 
$allocation['organization_name'];
-                $noallocation = False;
+                                $noallocation = False;
                        } else {
                                $season = 
$this->season_bo->read_single($_POST['season_id']);
                                $booking['organization_id'] = 
$_POST['organization_id'];
                                $booking['organization_name'] = 
$_POST['organization_name'];
-                $noallocation = True;
-            }
+                                $noallocation = True;
+                        }
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
                                $today = getdate();
@@ -402,29 +402,29 @@
 
                                if (!$errors && $_POST['recurring'] != 'on' && 
$_POST['outseason'] != 'on')
                                {
-                    if($noallocation) {
-                        $allocation['resources'] = $booking['resources'];
-                        $allocation['cost'] = $booking['cost'];
-                        $allocation['building_id'] = $booking['building_id'];
-                        $allocation['building_name'] = 
$booking['building_name'];
-                        $allocation['season_id'] = $booking['season_id'];
-                        $allocation['organization_id'] = 
$booking['organization_id'];
-                        $allocation['organization_name'] = 
$booking['organization_name'];
-                                               if ($application_id != '0') {
-                                   $allocation['application_id'] = 
$application_id;
-                                               }
-                        $allocation['from_'] = $booking['from_'];
-                        $allocation['to_'] = $booking['to_'];
-                                       $allocation['active'] = '1';
-                                       $allocation['completed'] = '0';
-                        $receipt = $this->allocation_bo->add($allocation);
-                        $booking['allocation_id'] = $receipt['id'];
-                        $booking['secret'] = $this->generate_secret();
-                        $receipt = $this->bo->add($booking);
-                    } else {
-                        $booking['secret'] = $this->generate_secret();
-                        $receipt = $this->bo->add($booking);
-                    }
+                                        if($noallocation) {
+                                            $allocation['resources'] = 
$booking['resources'];
+                                            $allocation['cost'] = 
$booking['cost'];
+                                            $allocation['building_id'] = 
$booking['building_id'];
+                                            $allocation['building_name'] = 
$booking['building_name'];
+                                            $allocation['season_id'] = 
$booking['season_id'];
+                                            $allocation['organization_id'] = 
$booking['organization_id'];
+                                            $allocation['organization_name'] = 
$booking['organization_name'];
+                                                                    if 
($application_id != '0') {
+                                                        
$allocation['application_id'] = $application_id;
+                                                                    }
+                                            $allocation['from_'] = 
$booking['from_'];
+                                            $allocation['to_'] = 
$booking['to_'];
+                                                            
$allocation['active'] = '1';
+                                                            
$allocation['completed'] = '0';
+                                            $receipt = 
$this->allocation_bo->add($allocation);
+                                            $booking['allocation_id'] = 
$receipt['id'];
+                                            $booking['secret'] = 
$this->generate_secret();
+                                            $receipt = 
$this->bo->add($booking);
+                                        } else {
+                                            $booking['secret'] = 
$this->generate_secret();
+                                            $receipt = 
$this->bo->add($booking);
+                                        }
                                        $this->redirect(array('menuaction' => 
'booking.uimassbooking.schedule', 'id'=>$booking['building_id']));
                                }
                                else if ( ($_POST['recurring'] == 'on' || 
$_POST['outseason'] == 'on')  && !$errors && $step > 1)
@@ -464,37 +464,37 @@
                                                        $valid_dates[$i]['to_'] 
= $todate;
                                                        if ($step == 3)
                                                        {
-                                if( $noallocation ) {
-                                    $allocation['resources'] = 
$booking['resources'];
-                                    $allocation['cost'] = $booking['cost'];
-                                    $allocation['building_id'] = 
$booking['building_id'];
-                                    $allocation['building_name'] = 
$booking['building_name'];
-                                    $allocation['season_id'] = 
$booking['season_id'];
-                                    $allocation['organization_id'] = 
$booking['organization_id'];
-                                    $allocation['organization_name'] = 
$booking['organization_name'];
-                                                                       if 
($application_id != '0') {
-                                                       
$allocation['application_id'] = $application_id;
-                                                                       }
-                                    $allocation['from_'] = $booking['from_'];
-                                    $allocation['to_'] = $booking['to_'];
-                                                       $allocation['active'] = 
'1';
-                                               $allocation['completed'] = '0';
-                                    $receipt = 
$this->allocation_bo->add($allocation);
-                                    $booking['allocation_id'] = $receipt['id'];
-                                                                       if 
($application_id != '0') {
-                                                                               
$booking['application_id'] = $application_id;
-                                                                       }
-                                                               
$booking['secret'] = $this->generate_secret();
-                                                               $receipt = 
$this->bo->add($booking);
-                                    $booking['allocation_id'] = '';
-                                    
$this->allocation_bo->so->update_id_string();
-                                } else {
-                                                                       if 
($application_id != '0') {
-                                                                               
$booking['application_id'] = $application_id;
-                                                                       }
-                                                               
$booking['secret'] = $this->generate_secret();
-                                                               $receipt = 
$this->bo->add($booking);
-                                }
+                                                                if( 
$noallocation ) {
+                                                                    
$allocation['resources'] = $booking['resources'];
+                                                                    
$allocation['cost'] = $booking['cost'];
+                                                                    
$allocation['building_id'] = $booking['building_id'];
+                                                                    
$allocation['building_name'] = $booking['building_name'];
+                                                                    
$allocation['season_id'] = $booking['season_id'];
+                                                                    
$allocation['organization_id'] = $booking['organization_id'];
+                                                                    
$allocation['organization_name'] = $booking['organization_name'];
+                                                                               
                         if ($application_id != '0') {
+                                                                               
         $allocation['application_id'] = $application_id;
+                                                                               
                         }
+                                                                    
$allocation['from_'] = $booking['from_'];
+                                                                    
$allocation['to_'] = $booking['to_'];
+                                                                               
 $allocation['active'] = '1';
+                                                                               
 $allocation['completed'] = '0';
+                                                                    $receipt = 
$this->allocation_bo->add($allocation);
+                                                                    
$booking['allocation_id'] = $receipt['id'];
+                                                                               
                         if ($application_id != '0') {
+                                                                               
                                 $booking['application_id'] = $application_id;
+                                                                               
                         }
+                                                                               
                 $booking['secret'] = $this->generate_secret();
+                                                                               
                 $receipt = $this->bo->add($booking);
+                                                                    
$booking['allocation_id'] = '';
+                                                                    
$this->allocation_bo->so->update_id_string();
+                                                                } else {
+                                                                               
                         if ($application_id != '0') {
+                                                                               
                                 $booking['application_id'] = $application_id;
+                                                                               
                         }
+                                                                               
                 $booking['secret'] = $this->generate_secret();
+                                                                               
                 $receipt = $this->bo->add($booking);
+                                                                }
                                                        }
                                                }
                                                $i++;
@@ -530,16 +530,16 @@
 
                        $resouces_full = 
$this->resource_bo->so->read(array('filters'=>array('id'=>$booking['resources']),
 'sort'=>'name'));
             
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Booking New'), 'link' => 
'#booking_new');
-            $active_tab = 'generic';
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Booking 
New'), 'link' => '#booking_new');
+                        $active_tab = 'generic';
+
+                        $GLOBALS['phpgw']->jqcal->add_listener('start', 
'datetime');
+                        $GLOBALS['phpgw']->jqcal->add_listener('start_date', 
'datetime');
+                                    
$GLOBALS['phpgw']->jqcal->add_listener('end_date', 'datetime');
+
+                        $booking['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
-            $GLOBALS['phpgw']->jqcal->add_listener('start', 'datetime');
-            $GLOBALS['phpgw']->jqcal->add_listener('start_date', 'datetime');
-                       $GLOBALS['phpgw']->jqcal->add_listener('end_date', 
'datetime');
-            
-            $booking['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
-            
                        if ($step < 2) 
                        {
                                self::render_template_xsl('booking_new', 
array('booking' => $booking, 
@@ -620,7 +620,7 @@
                        $booking['building_name'] = 
$booking['building']['name'];
                        $errors = array();
             
-            $tabs = array();
+                        $tabs = array();
                        $tabs['generic']        = array('label' => 
lang('Booking Edit'), 'link' => '#booking_edit');
                        $active_tab = 'generic';
             
@@ -655,10 +655,10 @@
                        $activities = $this->activity_bo->fetch_activities();
                        $activities = $activities['results'];
             
-            $GLOBALS['phpgw']->jqcal->add_listener('field_from', 'datetime');
+                        $GLOBALS['phpgw']->jqcal->add_listener('field_from', 
'datetime');
                        $GLOBALS['phpgw']->jqcal->add_listener('field_to', 
'datetime');
                     
-            $booking['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $booking['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
                        self::render_template_xsl('booking_edit', 
array('booking' => $booking, 'activities' => $activities, 'agegroups' => 
$agegroups, 'audience' => $audience));
                }

Modified: branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibuilding.inc.php        
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uibuilding.inc.php        
2015-09-10 23:59:50 UTC (rev 13876)
@@ -163,11 +163,11 @@
                        $building['cancel_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.index'));
 //                     $this->use_yui_editor();
             
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Building New'), 'link' 
=> '#building_new');
-            $active_tab = 'generic';
-        
-            $building['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Building 
New'), 'link' => '#building_form');
+                        $active_tab = 'generic';
+
+                        $building['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
                        self::render_template_xsl('building_form', 
array('building' => $building, 'new_form' => true));
                }
@@ -183,11 +183,11 @@
                        $config = CreateObject('phpgwapi.config','booking');
                        $config->read();
             
-            if ($config->config_data['extra_schedule'] == 'yes') {
-                $building['extra'] = 1;
-            } else {
-                $building['extra'] = 0;
-            }
+                        if ($config->config_data['extra_schedule'] == 'yes') {
+                            $building['extra'] = 1;
+                        } else {
+                            $building['extra'] = 0;
+                        }
 
                        $errors = array();
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
@@ -203,11 +203,11 @@
                        }
                        $this->flash_form_errors($errors);
 //                     $this->use_yui_editor();
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Building Edit'), 'link' 
=> '#building');
-            $active_tab = 'generic';
-        
-            $building['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Building 
Edit'), 'link' => '#building_form');
+                        $active_tab = 'generic';
+
+                        $building['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
                        self::render_template_xsl('building_form', 
array('building' => $building));
                }
@@ -227,11 +227,11 @@
                                $building['homepage'] = 
'http://'.$building['homepage'];
                        }
             
-            $tabs = array();
+                        $tabs = array();
                        $tabs['generic']        = array('label' => 
lang('Building Show'), 'link' => '#building_show');
                        $active_tab = 'generic';
             
-             $building['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $building['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
                        self::render_template_xsl('building', array('building' 
=> $building));
                }

Modified: branches/dev-syncromind/booking/inc/class.uidocument.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uidocument.inc.php        
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uidocument.inc.php        
2015-09-10 23:59:50 UTC (rev 13876)
@@ -348,11 +348,11 @@
                        
                        $this->flash_form_errors($errors);
             
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Document New'), 'link' 
=> '#document');
-            $active_tab = 'generic';
-        
-            $document['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Document 
New'), 'link' => '#document');
+                        $active_tab = 'generic';
+
+                        $document['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
                        self::render_template_xsl('document_form', 
array('document' => $document));
                }

Modified: branches/dev-syncromind/booking/inc/class.uievent.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uievent.inc.php   2015-09-10 
13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uievent.inc.php   2015-09-10 
23:59:50 UTC (rev 13876)
@@ -508,7 +508,7 @@
                        $this->flash_form_errors($errors);
                }
 
-               self::add_javascript('booking', 'booking', 'event.js');
+//             self::add_javascript('booking', 'booking', 'event.js');
                array_set_default($event, 'resources', array());
                $event['resources_json'] = json_encode(array_map('intval', 
$event['resources']));
                $event['cancel_link'] = self::link(array('menuaction' => 
'booking.uievent.index'));
@@ -530,6 +530,7 @@
         $active_tab = 'generic';
         
         $event['tabs'] = phpgwapi_jquery::tabview_generate($tabs, $active_tab);
+        self::add_javascript('booking', 'booking', 'adddatetimepicker.js');
         
                $this->add_template_helpers();
                self::render_template_xsl('event_new', array('event' => $event, 
'activities' => $activities, 'agegroups' => $agegroups, 'audience' => 
$audience));

Modified: branches/dev-syncromind/booking/inc/class.uipermission.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uipermission.inc.php      
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uipermission.inc.php      
2015-09-10 23:59:50 UTC (rev 13876)
@@ -303,12 +303,12 @@
                        
                        $this->flash_form_errors($errors);
 
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Permission Edit'), 
'link' => '#permission');
-            $active_tab = 'generic';
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Permission 
Edit'), 'link' => '#permission');
+                        $active_tab = 'generic';
+
+                        $permission['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
-            $permission['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
-            
                        self::render_template_xsl('permission_form', 
array('permission' => $permission));
                }
                

Modified: branches/dev-syncromind/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiresource.inc.php        
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/inc/class.uiresource.inc.php        
2015-09-10 23:59:50 UTC (rev 13876)
@@ -156,12 +156,12 @@
                        $resource['types'] = $this->resource_types();
                        $resource['cancel_link'] = 
self::link(array('menuaction' => 'booking.uiresource.index'));
 //                     $this->use_yui_editor();
-            $tabs = array();
-            $tabs['generic'] = array('label' => lang('Permission Edit'), 
'link' => '#resource');
-            $active_tab = 'generic';
+                        $tabs = array();
+                        $tabs['generic'] = array('label' => lang('Permission 
Edit'), 'link' => '#resource');
+                        $active_tab = 'generic';
+
+                        $resource['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
             
-            $resource['tabs'] = phpgwapi_jquery::tabview_generate($tabs, 
$active_tab);
-            
                        self::render_template_xsl('resource_form', 
array('resource' => $resource, 'activitydata' => $activity_data, 'new_form' => 
true));
                }
                

Copied: branches/dev-syncromind/booking/js/booking/adddatetimepicker.js (from 
rev 13875, branches/dev-syncromind/booking/js/booking/applicationnew.js)
===================================================================
--- branches/dev-syncromind/booking/js/booking/adddatetimepicker.js             
                (rev 0)
+++ branches/dev-syncromind/booking/js/booking/adddatetimepicker.js     
2015-09-10 23:59:50 UTC (rev 13876)
@@ -0,0 +1,78 @@
+/* 
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+$(function() {
+    
+    $('#add-date-link').click(function(){
+        var add = $(this);
+        var html = '';
+        
+        if (!this.counter) { this.counter = 0; }
+                         
+        html = '<div class="date-container">'+
+                '<a class="close-btn btnclose" 
href="javascript:void(0);">-</a>'+
+                '<div class="pure-control-group">'+
+                        '<label 
for="start_date_'+this.counter+'"><h4>!from</h4></label>'+
+                        '<input class="time pure-input-2-3" 
id="start_date_'+this.counter+'" name="start_date_'+this.counter+'" 
type="text">'+
+                              // '<xsl:if test="activity/start_date != """>'+
+    //                                    '<xsl:attribute name="value">'+
+    //                                            '<xsl:value-of 
select="php:function("date", $datetime_format, number(activity/start_date))"/>'+
+    //                                    '</xsl:attribute>'+
+    //                            '</xsl:if>'+
+    //
+    //                            '<xsl:attribute name="data-validation">'+
+    //                                '<xsl:text>required</xsl:text>'+
+    //                            '</xsl:attribute>'+ 
+                        '</input>'+
+                '</div>'+
+                '<div class="pure-control-group">'+
+                        '<label 
for="end_date_'+this.counter+'"><h4>!to</h4></label>'+
+//                        <xsl:if test="activity/error_msg_array/end_date != 
''">
+//                                <xsl:variable name="error_msg">
+//                                        <xsl:value-of 
select="activity/error_msg_array/end_date" />
+//                                </xsl:variable>
+//                                <div class='input_error_msg'>
+//                                        <xsl:value-of 
select="php:function('lang', $error_msg)" />
+//                                </div>
+//                        </xsl:if>
+                        '<input class="time pure-input-2-3" 
id="end_date_'+this.counter+'" name="end_date_'+this.counter+'" type="text">'+
+//                                <xsl:if test="activity/end_date != ''">
+//                                        <xsl:attribute name="value">
+//                                                <xsl:value-of 
select="php:function('date', $datetime_format, number(activity/end_date))"/>
+//                                        </xsl:attribute>
+//                                </xsl:if>
+                        '</input>'+
+                '</div>'
+         '</div>';
+        
+       this.counter++;
+        
+        add.parent().parent().children('#dates-container').append(html);
+        
+        $( ".time" ).datetimepicker({ 
+                dateFormat: 'dd/mm/yy',
+                showWeek: true,
+                changeMonth: true,
+                changeYear: true,
+                showOn: "button",
+                showButtonPanel:true,
+                buttonImage: "/portico/phpgwapi/templates/base/images/cal.png",
+                buttonText: "Select date",
+                buttonImageOnly: true
+        });
+        
+    });
+    
+});
+
+$(document).on("click",".btnclose",function(){
+    var the = $(this);
+    RemoveDate(the);
+});
+
+RemoveDate = function(the){
+    the.parent().remove();
+}
+

Deleted: branches/dev-syncromind/booking/js/booking/applicationnew.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/applicationnew.js        
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/js/booking/applicationnew.js        
2015-09-10 23:59:50 UTC (rev 13876)
@@ -1,78 +0,0 @@
-/* 
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-$(function() {
-    
-    $('#add-date-link').click(function(){
-        var add = $(this);
-        var html = '';
-        
-        if (!this.counter) { this.counter = 0; }
-                         
-        html = '<div class="date-container">'+
-                '<a class="close-btn btnclose" 
href="javascript:void(0);">-</a>'+
-                '<div class="pure-control-group">'+
-                        '<label 
for="start_date_'+this.counter+'"><h4>!from</h4></label>'+
-                        '<input class="time pure-input-2-3" 
id="start_date_'+this.counter+'" name="start_date_'+this.counter+'" 
type="text">'+
-                              // '<xsl:if test="activity/start_date != """>'+
-    //                                    '<xsl:attribute name="value">'+
-    //                                            '<xsl:value-of 
select="php:function("date", $datetime_format, number(activity/start_date))"/>'+
-    //                                    '</xsl:attribute>'+
-    //                            '</xsl:if>'+
-    //
-    //                            '<xsl:attribute name="data-validation">'+
-    //                                '<xsl:text>required</xsl:text>'+
-    //                            '</xsl:attribute>'+ 
-                        '</input>'+
-                '</div>'+
-                '<div class="pure-control-group">'+
-                        '<label 
for="end_date_'+this.counter+'"><h4>!to</label></h4>'+
-//                        <xsl:if test="activity/error_msg_array/end_date != 
''">
-//                                <xsl:variable name="error_msg">
-//                                        <xsl:value-of 
select="activity/error_msg_array/end_date" />
-//                                </xsl:variable>
-//                                <div class='input_error_msg'>
-//                                        <xsl:value-of 
select="php:function('lang', $error_msg)" />
-//                                </div>
-//                        </xsl:if>
-                        '<input class="time pure-input-2-3" 
id="end_date_'+this.counter+'" name="end_date_'+this.counter+'" type="text">'+
-//                                <xsl:if test="activity/end_date != ''">
-//                                        <xsl:attribute name="value">
-//                                                <xsl:value-of 
select="php:function('date', $datetime_format, number(activity/end_date))"/>
-//                                        </xsl:attribute>
-//                                </xsl:if>
-                        '</input>'+
-                '</div>'
-         '</div>';
-        
-       this.counter++;
-        
-        add.parent().parent().children('#dates-container').append(html);
-        
-        $( ".time" ).datetimepicker({ 
-                dateFormat: 'dd/mm/yy',
-                showWeek: true,
-                changeMonth: true,
-                changeYear: true,
-                showOn: "button",
-                showButtonPanel:true,
-                buttonImage: "/portico/phpgwapi/templates/base/images/cal.png",
-                buttonText: "Select date",
-                buttonImageOnly: true
-        });
-        
-    });
-    
-});
-
-$(document).on("click",".btnclose",function(){
-    var the = $(this);
-    RemoveDate(the);
-});
-
-RemoveDate = function(the){
-    the.parent().remove();
-}
-

Modified: branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-09-10 23:59:50 UTC (rev 13876)
@@ -1,130 +1,128 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
     <!--div id="content"-->
 
-       <!--ul class="pathway">
-           <li><xsl:value-of select="php:function('lang', 'Allocations')" 
/></li>
-           <li>#<xsl:value-of select="allocation/id"/></li>
-       </ul-->
+    <!--ul class="pathway">
+        <li><xsl:value-of select="php:function('lang', 'Allocations')" /></li>
+        <li>#<xsl:value-of select="allocation/id"/></li>
+    </ul-->
     <xsl:call-template name="msgbox"/>
-       <!--xsl:call-template name="yui_booking_i18n"/-->
+    <!--xsl:call-template name="yui_booking_i18n"/-->
 
     <form action="" method="POST" id='form'  class="pure-form 
pure-form-aligned" name="form">
         <input type="hidden" name="tab" value=""/>
             <div id="tab-content">
                 <xsl:value-of disable-output-escaping="yes" 
select="allocation/tabs"/>
                 <div id="allocations_edit">
-                    <fieldset>
-                        
+                    <fieldset>                        
                         <h1>
                             #<xsl:value-of select="allocation/id"/>
-                        </h1>
-                        
+                        </h1>                        
                         <div class="pure-control-group">
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Application')"/>
+                                <h4><xsl:value-of select="php:function('lang', 
'Application')"/></h4>
                             </label>
-                                <xsl:if test="allocation/application_id!=''">
-                                        <a 
href="{allocation/application_link}">#<xsl:value-of 
select="allocation/application_id"/></a>
-                                </xsl:if>
+                            <xsl:if test="allocation/application_id!=''">
+                                <a 
href="{allocation/application_link}">#<xsl:value-of 
select="allocation/application_id"/></a>
+                            </xsl:if>
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'Building')" />
-                            </label>
-                                
-                                    <input id="field_building_id" 
name="building_id" type="hidden">
-                                        <xsl:attribute 
name="value"><xsl:value-of select="allocation/building_id"/></xsl:attribute>
-                                    </input>
-                                    <input id="field_building_name" 
name="building_name" type="text">
-                                        <xsl:attribute 
name="value"><xsl:value-of select="allocation/building_name"/></xsl:attribute>
-                                    </input>
-                                    <div id="building_container"/>
-                                
+                            <label for="field_building_name">
+                                <h4><xsl:value-of select="php:function('lang', 
'Building')" /></h4>
+                            </label>                                
+                            <input id="field_building_id" name="building_id" 
type="hidden">
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/building_id"/></xsl:attribute>
+                            </input>
+                            <input id="field_building_name" 
name="building_name" type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/building_name"/></xsl:attribute>
+                            </input>
+                            <div id="building_container"></div>
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'Active')"/>
+                            <label for="field_active">
+                                <h4><xsl:value-of select="php:function('lang', 
'Active')"/></h4>
                             </label>
-                                <select id="field_active" name="active">
-                                    <option value="1">
-                                        <xsl:if test="allocation/active=1">
-                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                        </xsl:if>
-                                        <xsl:value-of 
select="php:function('lang', 'Active')"/>
-                                    </option>
-                                    <option value="0">
-                                        <xsl:if test="allocation/active=0">
-                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                        </xsl:if>
-                                        <xsl:value-of 
select="php:function('lang', 'Inactive')"/>
-                                    </option>
-                                </select>
+                            <select id="field_active" name="active">
+                                <option value="1">
+                                    <xsl:if test="allocation/active=1">
+                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'Active')"/>
+                                </option>
+                                <option value="0">
+                                    <xsl:if test="allocation/active=0">
+                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="php:function('lang', 
'Inactive')"/>
+                                </option>
+                            </select>
                         </div>
                         <div class="pure-control-group">
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Season')" />
+                                <h4><xsl:value-of select="php:function('lang', 
'Season')" /></h4>
                             </label>
-                                <xsl:value-of select="php:function('lang', 
'Select a building first')" />
+                            <xsl:value-of select="php:function('lang', 'Select 
a building first')" />
                         </div>
                         <div class="pure-control-group">    
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Resources')" />
+                                <h4><xsl:value-of select="php:function('lang', 
'Resources')" /></h4>
                             </label>
-                                <xsl:value-of select="php:function('lang', 
'Select a building first')" />
+                            <xsl:value-of select="php:function('lang', 'Select 
a building first')" />
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'Organization')" />
+                            <label for="field_org_name">
+                                <h4><xsl:value-of select="php:function('lang', 
'Organization')" /></h4>
                             </label>
-                                    <input id="field_org_id" 
name="organization_id" type="hidden">
-                                        <xsl:attribute 
name="value"><xsl:value-of select="allocation/organization_id"/></xsl:attribute>
-                                    </input>
-                                    <input id="field_org_name" 
name="organization_name" type="text">
-                                        <xsl:attribute 
name="value"><xsl:value-of 
select="allocation/organization_name"/></xsl:attribute>
-                                    </input>
-                                    <div id="org_container"/>
+                            <input id="field_org_id" name="organization_id" 
type="hidden">
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/organization_id"/></xsl:attribute>
+                            </input>
+                            <input id="field_org_name" 
name="organization_name" type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/organization_name"/></xsl:attribute>
+                            </input>
+                            <div id="org_container"></div>
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'From')" />
+                            <label for="field_from">
+                                <h4><xsl:value-of select="php:function('lang', 
'From')" /></h4>
                             </label>
-                                <input class="datetime" id="field_from" 
name="from_" type="text">
-                                <!--input id="field_from" name="from_" 
type="text"-->
-                                    <xsl:attribute name="value"><xsl:value-of 
select="allocation/from_"/></xsl:attribute>
-                                </input>
+                            <input class="datetime" id="field_from" 
name="from_" type="text">
+                            <!--input id="field_from" name="from_" 
type="text"-->
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/from_"/></xsl:attribute>
+                            </input>
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'To')" />
+                            <label for="field_to">
+                                <h4><xsl:value-of select="php:function('lang', 
'To')" /></h4>
                             </label>
-                                <input class="datetime" id="field_to" 
name="to_" type="text">
-                                <!--input id="field_to" name="to_" 
type="text"-->
-                                    <xsl:attribute name="value"><xsl:value-of 
select="allocation/to_"/></xsl:attribute>
-                                </input>
+                            <input class="datetime" id="field_to" name="to_" 
type="text">
+                            <!--input id="field_to" name="to_" type="text"-->
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/to_"/></xsl:attribute>
+                            </input>
                         </div>
                         <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'Cost')" />
+                            <label for="field_cost">
+                                <h4><xsl:value-of select="php:function('lang', 
'Cost')" /></h4>
                             </label>
-                                <input id="field_cost" name="cost" type="text">
-                                    <xsl:attribute name="value"><xsl:value-of 
select="allocation/cost"/></xsl:attribute>
-                                </input>
+                            <input id="field_cost" name="cost" type="text">
+                                <xsl:attribute name="value"><xsl:value-of 
select="allocation/cost"/></xsl:attribute>
+                            </input>
                         </div>
-               <div style="clear: both" />
+
                         <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Inform contact persons')" />
-                                </label>
-                                        <xsl:value-of 
select="php:function('lang', 'Text written in the text area below will be sent 
as an email to all registered contact persons.')" />
-                                        <textarea id="field_mail" name="mail" 
class="full-width"></textarea>
+                            <label for="field_mail">
+                                <h4><xsl:value-of select="php:function('lang', 
'Inform contact persons')" /></h4>
+                            </label>
+                            <p style="display: inline-block;">
+                                <span><xsl:value-of 
select="php:function('lang', 'Text written in the text area below will be sent 
as an email to all registered contact persons.')" /></span>
+                                <textarea id="field_mail" name="mail" 
class="full-width" style="display: block;"></textarea>
+                            </p>
                         </div>
                     </fieldset>
                 </div>
             </div>
-            <div class="form-buttons">
+            <div class="pure-control-group form-buttons">
                 <input type="submit" class="pure-button pure-button-primary">
-                            <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Save')"/></xsl:attribute>
-                            </input>
+                    <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Save')"/></xsl:attribute>
+                </input>
                 <a class="cancel">
                     <xsl:attribute name="href"><xsl:value-of 
select="allocation/cancel_link"/></xsl:attribute>
                     <xsl:value-of select="php:function('lang', 'Cancel')" />

Modified: branches/dev-syncromind/booking/templates/base/application_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-09-10 23:59:50 UTC (rev 13876)
@@ -1,22 +1,6 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
     <style type="text/css">
-        
-        .date-container {
-            width: 31%;
-        }
-        
-        .date-container .close-btn {
-            background: transparent 
url("phpgwapi/js/yahoo/assets/skins/sam/sprite.png") no-repeat scroll 0 -300px;
-            border: medium none;
-            color: white;
-            cursor: pointer;
-            display: block;
-            //float: right;
-            height: 15px;
-            text-decoration: none;
-            width: 25px;
-            margin: 4px 0 0 296px;
-        }
+        #agegroup td {padding: 0 0.3em;}
     </style>
        <!--div id="content"-->
 
@@ -24,7 +8,7 @@
        <xsl:call-template name="msgbox"/>
        <!--xsl:call-template name="yui_booking_i18n"/-->
 
-       <form action="" method="POST" id='application_form'  class= "pure-form 
pure-form-aligned" name="application_form">
+       <form action="" method="POST" id='application_form' class= "pure-form 
pure-form-stacked" name="application_form">
             <input type="hidden" name="tab" value=""/>
             <div id="tab-content">
                 <xsl:value-of disable-output-escaping="yes" 
select="application/tabs"/>
@@ -33,209 +17,258 @@
                         <h1>
                             <xsl:value-of select="php:function('lang', 
'Application')"/> (<xsl:value-of select="application/id"/>)
                         </h1>
-                    
-                    <div class="pure-control-group">
-                        <label>
-                            <xsl:value-of select="php:function('lang', 
'Active')"/>
-                        </label>
                         
-                            <select id="field_active" name="active">
-                                <option value="1">
-                                    <xsl:if test="application/active=1">
-                                            <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:value-of select="php:function('lang', 
'Active')"/>
-                                </option>
-                                <option value="0">
-                                    <xsl:if test="application/active=0">
-                                            <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:value-of select="php:function('lang', 
'Inactive')"/>
-                                </option>
-                            </select>
-                    </div>
-                    <div class="pure-control-group">
-                            <div class="heading">1. <xsl:value-of 
select="php:function('lang', 'Why?')" /></div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Activity')" />
-                                </label>
-                                        <select name="activity_id" 
id="field_activity">
-                                                <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
-                                                <xsl:for-each 
select="activities">
-                                                        <option>
-                                                                <xsl:if 
test="../application/activity_id = id">
-                                                                        
<xsl:attribute name="selected">selected</xsl:attribute>
-                                                                </xsl:if>
-                                                                <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
-                                                                <xsl:value-of 
select="name"/>
-                                                        </option>
-                                                </xsl:for-each>
-                                        </select>
+                        <div class="pure-g pure-form pure-form-aligned">
+                            <div class="pure-u-1">
+                                <div class="pure-control-group">
+                                    <label>
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Active')"/></h4>
+                                    </label>
+                                    <select id="field_active" name="active">
+                                        <option value="1">
+                                            <xsl:if 
test="application/active=1">
+                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:value-of 
select="php:function('lang', 'Active')"/>
+                                        </option>
+                                        <option value="0">
+                                            <xsl:if 
test="application/active=0">
+                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:value-of 
select="php:function('lang', 'Inactive')"/>
+                                        </option>
+                                    </select>
+                                </div>
                             </div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Description')" />
-                                </label>
-                                        <textarea id="field_description" 
class="full-width" name="description"><xsl:value-of 
select="application/description"/></textarea>
+                        </div>
+                        
+                        <div class="pure-g">
+                            <div class="pure-u-1">
+                                <div class="heading">
+                                    <legend><h3>1. <xsl:value-of 
select="php:function('lang', 'Why?')" /></h3></legend>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_activity">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Activity')" /></h4>
+                                    </label>
+                                    <select name="activity_id" 
id="field_activity" class="pure-u-1 pure-u-sm-1-2 pure-u-lg-1-3">
+                                        <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
+                                        <xsl:for-each select="activities">
+                                            <option>
+                                                <xsl:if 
test="../application/activity_id = id">
+                                                    <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                                </xsl:if>
+                                                <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                                <xsl:value-of select="name"/>
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_description">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Description')" /></h4>
+                                    </label>
+                                    <textarea id="field_description" 
class="full-width pure-u-1 pure-u-sm-1-2 pure-u-lg-1-3" 
name="description"><xsl:value-of select="application/description"/></textarea>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_equipment">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Equipment')" /></h4>
+                                    </label>
+                                    <textarea id="field_equipment" 
class="full-width pure-u-1 pure-u-sm-1-2 pure-u-lg-1-3" 
name="equipment"><xsl:value-of select="application/equipment"/></textarea>
+                                </div>
                             </div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Equipment')" />
-                                </label>
-                                    <textarea id="field_equipment" 
class="full-width" name="equipment"><xsl:value-of 
select="application/equipment"/></textarea>
+                        </div>
+                        
+                        <div class="pure-g">
+                            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                                <div class="heading">
+                                    <legend><h3>2. <xsl:value-of 
select="php:function('lang', 'Where?')" /></h3></legend>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_building_name">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Building')" /></h4>
+                                    </label>
+                                    <input id="field_building_id" 
name="building_id" type="hidden">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="application/building_id"/></xsl:attribute>
+                                    </input>
+                                    <input id="field_building_name" 
name="building_name" type="text">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="application/building_name"/></xsl:attribute>
+                                    </input>
+                                    <div id="building_container"></div>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label>
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Resources')" /></h4>
+                                    </label>
+                                    <xsl:value-of select="php:function('lang', 
'Select a building first')" />
+                                </div>
                             </div>
-                    </div>
-                    <div class="clr"/>
-                    <div class="pure-control-group">
-                            <div class="heading">2. <xsl:value-of 
select="php:function('lang', 'Where?')" /></div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Building')" />
-                                </label>
-                                                <input id="field_building_id" 
name="building_id" type="hidden">
-                                                        <xsl:attribute 
name="value"><xsl:value-of select="application/building_id"/></xsl:attribute>
-                                                </input>
-                                                <input 
id="field_building_name" name="building_name" type="text">
-                                                        <xsl:attribute 
name="value"><xsl:value-of select="application/building_name"/></xsl:attribute>
-                                                </input>
-                                                <div id="building_container"/>
-                            </div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Resources')" />
-                                </label>
-                                        <xsl:value-of 
select="php:function('lang', 'Select a building first')" />
-                            </div>
-                    </div>
-                    <div class="pure-control-group">
-                            <div class="heading">3. <xsl:value-of 
select="php:function('lang', 'When?')" /></div>
-                            <div id="dates-container">
+                            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                                <div class="heading">
+                                    <legend><h3>3. <xsl:value-of 
select="php:function('lang', 'When?')" /></h3></legend>
+                                </div>
+                                <div id="dates-container">
                                     <xsl:for-each select="application/dates">
                                         <div class="date-container">
                                             <a href="javascript:void(0);" 
class="close-btn btnclose">-</a>
                                             <div class="pure-control-group">
-                                                    <label 
for="field_{position()}_from">
-                                                        <xsl:value-of 
select="php:function('lang', 'From')" />
-                                                    </label>
-                                                        <input 
class="datetime" id="start_date" name="field_{position()}_from" type="text">
-                                                        <!--input 
id="field_{position()}_from" name="from_[]" type="text"-->
-                                                                <xsl:attribute 
name="value"><xsl:value-of select="from_"/></xsl:attribute>
-                                                        </input>
+                                                <label for="start_date">
+                                                    <h4><xsl:value-of 
select="php:function('lang', 'From')" /></h4>
+                                                </label>
+                                                <input class="datetime 
pure-input-2-3" id="start_date" name="field_{position()}_from" type="text">
+                                                <!--input 
id="field_{position()}_from" name="from_[]" type="text"-->
+                                                    <xsl:attribute 
name="value"><xsl:value-of select="from_"/></xsl:attribute>
+                                                </input>
                                             </div>
                                             <div class="pure-control-group">
-                                                    <label 
for="field_{position()}_to">
-                                                        <xsl:value-of 
select="php:function('lang', 'To')" />
-                                                    </label>
-                                                        <!--input 
id="field_{position()}_to" name="to_[]" type="text"-->
-                                                        <input 
class="datetime" id="end_date" name="field_{position()}_to" type="text">
-                                                                <xsl:attribute 
name="value"><xsl:value-of select="to_"/></xsl:attribute>
-                                                        </input>
+                                                <label for="end_date">
+                                                    <h4><xsl:value-of 
select="php:function('lang', 'To')" /></h4>
+                                                </label>
+                                                <!--input 
id="field_{position()}_to" name="to_[]" type="text"-->
+                                                <input class="datetime 
pure-input-2-3" id="end_date" name="field_{position()}_to" type="text">
+                                                    <xsl:attribute 
name="value"><xsl:value-of select="to_"/></xsl:attribute>
+                                                </input>
                                             </div>
                                         </div>
                                     </xsl:for-each>
+                                </div>
+                                <div>
+                                    <a href="javascript:;" 
id="add-date-link"><xsl:value-of select="php:function('lang', 'Add another 
date')" /></a>
+                                </div>
                             </div>
-                            <dt><a href="javascript:;" 
id="add-date-link"><xsl:value-of select="php:function('lang', 'Add another 
date')" /></a></dt>
-                    </div>
-                    <div class="pure-control-group">
-                            <div class="heading">4. <xsl:value-of 
select="php:function('lang', 'Who?')" /></div>
-                            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label></dt>
-                            <dd>
-                                    <ul>
+                            <div class="pure-u-1 pure-u-md-1 pure-u-lg-1-3">
+                                <div class="heading">
+                                    <legend><h3>4. <xsl:value-of 
select="php:function('lang', 'Who?')" /></h3></legend>
+                                </div>
+                                <div class="pure-g">
+                                    <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
+                                        <label for="field_from">
+                                            <h4><xsl:value-of 
select="php:function('lang', 'Target audience')" /></h4>
+                                        </label>
+                                        <ul 
style="list-style:none;padding-left:10px;">
                                             <xsl:for-each select="audience">
-                                                    <li>
-                                                            <input 
type="checkbox" name="audience[]">
-                                                                    
<xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
-                                                                    <xsl:if 
test="../application/audience=id">
-                                                                            
<xsl:attribute name="checked">checked</xsl:attribute>
-                                                                    </xsl:if>
-                                                            </input>
-                                                            
<label><xsl:value-of select="name"/></label>
-                                                    </li>
+                                                <li>
+                                                    <label>
+                                                        <input type="checkbox" 
name="audience[]">
+                                                            <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                                            <xsl:if 
test="../application/audience=id">
+                                                                <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                                            </xsl:if>
+                                                        </input>
+                                                        <xsl:value-of 
select="name"/>
+                                                    </label>
+                                                </li>
                                             </xsl:for-each>
-                                    </ul>
-                            </dd>
-                            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label></dt>
-                            <dd>
-                                    <table id="agegroup">
-                                            <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
-                                                <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th></tr>
-                                            <xsl:for-each select="agegroups">
+                                        </ul>
+                                    </div>
+                                    <div class="pure-control pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
+                                        <label for="field_from">
+                                            <h4><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></h4>
+                                        </label>
+                                        <table id="agegroup" class="pure-table 
pure-table-bordered">
+                                            <thead>
+                                                <tr>
+                                                    <th></th>
+                                                    <th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                                    <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th></tr>
+                                            </thead>
+                                            <tbody>
+                                                <xsl:for-each 
select="agegroups">
                                                     <xsl:variable 
name="id"><xsl:value-of select="id"/></xsl:variable>
                                                     <tr>
-                                                            <th><xsl:value-of 
select="name"/></th>
-                                                            <td>
-                                                                    <input 
type="text">
-                                                                            
<xsl:attribute name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
-                                                                            
<xsl:attribute name="value"><xsl:value-of 
select="../application/agegroups/male[../agegroup_id = $id]"/></xsl:attribute>
-                                                                    </input>
-                                                            </td>
-                                                            <td>
-                                                                    <input 
type="text">
-                                                                            
<xsl:attribute name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
-                                                                            
<xsl:attribute name="value"><xsl:value-of 
select="../application/agegroups/female[../agegroup_id = $id]"/></xsl:attribute>
-                                                                    </input>
-                                                            </td>
+                                                        <th><xsl:value-of 
select="name"/></th>
+                                                        <td>
+                                                            <input type="text" 
class="input50">
+                                                                <xsl:attribute 
name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                                <xsl:attribute 
name="value"><xsl:value-of select="../application/agegroups/male[../agegroup_id 
= $id]"/></xsl:attribute>
+                                                            </input>
+                                                        </td>
+                                                        <td>
+                                                            <input type="text" 
class="input50">
+                                                                <xsl:attribute 
name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                                <xsl:attribute 
name="value"><xsl:value-of 
select="../application/agegroups/female[../agegroup_id = $id]"/></xsl:attribute>
+                                                            </input>
+                                                        </td>
                                                     </tr>
-                                            </xsl:for-each>
-                                    </table>
-                            </dd>
-                    </div>
-                    <div class="clr"/>
-                    <div class="pure-control-group">
-                            <div class="heading"><br /><xsl:value-of 
select="php:function('lang', 'Contact information')" /></div>
-                            <div class="pure-control-group">
-                                <label>
-                                    <xsl:value-of select="php:function('lang', 
'Name')" />
-                                </label>
-                                        <input id="field_contact_name" 
name="contact_name" type="text">
-                                                <xsl:attribute 
name="value"><xsl:value-of select="application/contact_name"/></xsl:attribute>
-                                        </input>
+                                                </xsl:for-each>
+                                            </tbody>
+                                        </table>
+                                    </div>
+                                </div>
                             </div>
-                            <div class="pure-control-group">
-                                    <label>
-                                        <xsl:value-of 
select="php:function('lang', 'Email')" />
+                        </div>
+                        
+                        <div class="pure-g">
+                            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                                <div class="heading">
+                                    <legend><h3><xsl:value-of 
select="php:function('lang', 'Contact information')" /></h3></legend>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_contact_name">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Name')" /></h4>
                                     </label>
-                                        <input id="field_contact_email" 
name="contact_email" type="text">
-                                                <xsl:attribute 
name="value"><xsl:value-of select="application/contact_email"/></xsl:attribute>
-                                        </input>
-                            </div>
-                            <div class="pure-control-group">
-                                    <label>
-                                        <xsl:value-of 
select="php:function('lang', 'Phone')" />
+                                    <input id="field_contact_name" 
name="contact_name" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="application/contact_name"/></xsl:attribute>
+                                    </input>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_contact_email">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Email')" /></h4>
                                     </label>
-                                        <input id="field_contact_phone" 
name="contact_phone" type="text">
-                                                <xsl:attribute 
name="value"><xsl:value-of select="application/contact_phone"/></xsl:attribute>
-                                        </input>
+                                    <input id="field_contact_email" 
name="contact_email" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="application/contact_email"/></xsl:attribute>
+                                    </input>
+                                </div>
+                                <div class="pure-control-group">
+                                    <label for="field_contact_phone">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Phone')" /></h4>
+                                    </label>
+                                    <input id="field_contact_phone" 
name="contact_phone" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="application/contact_phone"/></xsl:attribute>
+                                    </input>
+                                </div>
                             </div>
-                    </div>
-                    <dl class="form-col">
-                            <div class="heading"><xsl:value-of 
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of 
select="php:function('lang', 'invoice information')" /></div>
-                            <xsl:copy-of 
select="phpgw:booking_customer_identifier(application, '')"/>
-                    </dl>
-                    <dl class="form-col">
-                            <div class="heading"><br /><xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></div>
-                            <br/>
-                            <div id='regulation_documents'/>
-                    </dl>
+                            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                                <div class="heading">
+                                    <legend><h3><xsl:value-of 
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of 
select="php:function('lang', 'invoice information')" /></h3></legend>
+                                </div>
+                                <div class="pure-control-group">
+                                    <xsl:copy-of 
select="phpgw:booking_customer_identifier(application, '')"/>
+                                </div>
+                            </div>
+                            <div class="pure-u-1 pure-u-md-1 pure-u-lg-1-3">   
                             
+                                <div class="pure-g">
+                                    <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
+                                        <div class="heading">
+                                            <legend><h3><xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></h3></legend>
+                                        </div>
+                                        <div id='regulation_documents'></div>
+                                    </div>
+                                    <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1"></div>
+                                </div>
+                            </div>
+                        </div>
                     </fieldset>
                 </div>
             </div>
-            <div class="proplist-col">
+            <div class="pure-control-group">
                 <input type="submit" class="pure-button pure-button-primary">
-                        <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Create')"/></xsl:attribute>
+                    <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Create')"/></xsl:attribute>
                 </input>
                 <a class="cancel">
-                        <xsl:attribute name="href"><xsl:value-of 
select="application/cancel_link"/></xsl:attribute>
-                        <xsl:value-of select="php:function('lang', 'Cancel')" 
/>
+                    <xsl:attribute name="href"><xsl:value-of 
select="application/cancel_link"/></xsl:attribute>
+                    <xsl:value-of select="php:function('lang', 'Cancel')" />
                 </a>
             </div>
        </form>
+        <script type="text/javascript">
+            
$('#field_customer_identifier_type,#field_customer_ssn,#field_customer_organization_number').removeClass('pure-input-1').addClass('pure-u-1
 pure-u-sm-1-2 pure-u-md-1');
+        </script>
        <!--/div-->
-       <script type="text/javascript">
+       <!--script type="text/javascript">
                YAHOO.booking.initialDocumentSelection = <xsl:value-of 
select="application/accepted_documents_json"/>;
                YAHOO.booking.initialAcceptAllTerms = true;
                YAHOO.booking.initialSelection = <xsl:value-of 
select="application/resources_json"/>;
                var lang = <xsl:value-of select="php:function('js_lang', 
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept 
to follow all terms and conditions of lease first.')"/>;
-       </script>
+       </script-->
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/application_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-09-10 23:59:50 UTC (rev 13876)
@@ -1,33 +1,6 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
     <style type="text/css">
         
-        .date-container {
-            // width: 31%;
-            position: relative;
-        }
-        
-        #dates-container .date-container .pure-control-group input.datetime,
-        #dates-container .date-container .pure-control-group input.time {
-            display: inline-block;
-        }
-        
-        .date-container .close-btn {
-            background: transparent 
url("phpgwapi/js/yahoo/assets/skins/sam/sprite.png") no-repeat scroll 0 -300px;
-            border: medium none;
-            color: white;
-            cursor: pointer;
-            //display: block;
-            //float: right;
-            height: 15px;
-            text-decoration: none;
-            width: 25px;
-            //margin: 4px 0 0 296px;
-            position: absolute;
-            top: 0px;
-            right: 0px;
-        }
-        
-        
         #agegroup td {padding: 0 0.3em;}        
         
         #field_customer_ssn {display:none;}
@@ -139,7 +112,9 @@
                                     </p>
                                 </xsl:if>
                                 <div class="pure-control-group">
-                                    <h4><label 
for="field_building_id"><xsl:value-of select="php:function('lang', 'Building')" 
/></label></h4>
+                                    <label for="field_building_id">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Building')" /></h4>
+                                    </label>
                                     <!--div class="autocomplete"-->
                                         <input id="field_building_id" 
name="building_id" type="hidden">
                                             <xsl:attribute 
name="value"><xsl:value-of select="application/building_id"/></xsl:attribute>
@@ -209,7 +184,7 @@
                                         </div>
                                     </xsl:for-each>
                                 </div>
-                                <dt><a href="javascript:;" 
id="add-date-link"><xsl:value-of select="php:function('lang', 'Add another 
date')" /></a></dt>
+                                <div class="pure-control-group"><a 
href="javascript:void(0);" id="add-date-link"><xsl:value-of 
select="php:function('lang', 'Add another date')" /></a></div>
                             </fieldset>
                         </div>
                         <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">

Modified: branches/dev-syncromind/booking/templates/base/booking_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/booking_edit.xsl     
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/booking_edit.xsl     
2015-09-10 23:59:50 UTC (rev 13876)
@@ -1,234 +1,308 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
+    <style type="text/css">
+        #agegroup td {padding: 0 0.3em;}
+    </style>
     <!--div id="content"-->
 
-        <!--ul class="pathway">
-            <li><xsl:value-of select="php:function('lang', 'Bookings')" /></li>
-            <li>#<xsl:value-of select="booking/id"/></li>
-        </ul-->
+    <!--ul class="pathway">
+        <li><xsl:value-of select="php:function('lang', 'Bookings')" /></li>
+        <li>#<xsl:value-of select="booking/id"/></li>
+    </ul-->
     <xsl:call-template name="msgbox"/>
-       <!--xsl:call-template name="yui_booking_i18n"/-->
+    <!--xsl:call-template name="yui_booking_i18n"/-->
 
-    <form action="" method="POST" id='form'  class="pure-form 
pure-form-aligned" name="form">
+    <form action="" method="POST" id='form' class="pure-form 
pure-form-stacked" name="form">
         <input type="hidden" name="allocation_id" 
value="{booking/allocation_id}"/>
         <input type="hidden" name="tab" value=""/>
         <div id="tab-content">
             <xsl:value-of disable-output-escaping="yes" select="booking/tabs"/>
             <div id="booking_edit">
-                <fieldset>
-                
+                <fieldset>                
                     <h1>
                         #<xsl:value-of select="booking/id"/>
                     </h1>
                     
-               <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 
'Application')"/>
-                    </label>
-                                        <xsl:if test="booking/application_id 
!= ''">
-                                                <a 
href="{booking/application_link}">#<xsl:value-of 
select="booking/application_id"/></a>
+                    <div class="pure-g">
+                        <div class="pure-u-1">
+                            <div class="pure-control-group">
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Application')"/></h4>
+                                </label>
+                                <xsl:if test="booking/application_id != ''">
+                                    <a 
href="{booking/application_link}">#<xsl:value-of 
select="booking/application_id"/></a>
+                                </xsl:if>
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_active">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Active')"/></h4>
+                                </label>
+                                <select id="field_active" name="active">
+                                    <option value="1">
+                                        <xsl:if test="booking/active=1">
+                                            <xsl:attribute 
name="selected">checked</xsl:attribute>
                                         </xsl:if>
-                </div>
-               <div class="clr"/>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'Active')"/>
-                    </label>
-                        <select id="field_active" name="active">
-                            <option value="1">
-                                <xsl:if test="booking/active=1">
-                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                </xsl:if>
-                                <xsl:value-of select="php:function('lang', 
'Active')"/>
-                            </option>
-                            <option value="0">
-                                <xsl:if test="booking/active=0">
-                                        <xsl:attribute 
name="selected">checked</xsl:attribute>
-                                </xsl:if>
-                                <xsl:value-of select="php:function('lang', 
'Inactive')"/>
-                            </option>
-                        </select>
-                </div>
-                <div class="pure-control-group">
-                        <label>
-                            <xsl:value-of select="php:function('lang', 
'Activity')" />
-                        </label>
-                        <select name="activity_id" id="field_activity">
-                                <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
-                                <xsl:for-each select="activities">
+                                        <xsl:value-of 
select="php:function('lang', 'Active')"/>
+                                    </option>
+                                    <option value="0">
+                                        <xsl:if test="booking/active=0">
+                                            <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                        </xsl:if>
+                                        <xsl:value-of 
select="php:function('lang', 'Inactive')"/>
+                                    </option>
+                                </select>
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_activity">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Activity')" /></h4>
+                                </label>
+                                <select name="activity_id" id="field_activity">
+                                    <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
+                                    <xsl:for-each select="activities">
                                         <option>
-                                                <xsl:if 
test="../booking/activity_id = id">
-                                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                                </xsl:if>
-                                                <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
-                                                <xsl:value-of select="name"/>
+                                            <xsl:if 
test="../booking/activity_id = id">
+                                                <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                            <xsl:value-of select="name"/>
                                         </option>
-                                </xsl:for-each>
-                        </select>
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 
'Building')"/>
-                    </label>
-                        <!--div class="autocomplete"-->
-                            <input id="field_building_id" name="building_id" 
type="hidden" value="{booking/building_id}"/>
-                            <input id="field_building_name" 
name="building_name" type="text" value="{booking/building_name}"/>
-                            <div id="building_container"/>
-                        <!--/div-->
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'Season')"/>
-                    </label>
-                        <xsl:value-of select="php:function('lang', 'Select a 
building first')"/>
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 
'Resources')"/>
-                    </label>
-                        <xsl:value-of select="php:function('lang', 'Select a 
building first')"/>
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 
'Organization')"/>
-                    </label>
-                        <!--div class="autocomplete"-->
-                            <input id="field_org_id" name="organization_id" 
type="hidden">
-                                <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_id"/></xsl:attribute>
-                            </input>
-                            <input id="field_org_name" 
name="organization_name" type="text">
-                                <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_name"/></xsl:attribute>
-                            </input>
-                            <div id="org_container"/>
-                        <!--/div-->
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'Group')"/>
-                    </label>
-                        <!--div id="group_container"--><xsl:value-of 
select="php:function('lang', 'Loading...')"/><!--/div-->
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'From')"/>
-                    </label>
-                        <input class="datetime" id="field_from" name="from_" 
type="text">
-                                <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
-                        </input>
-                        <!--div class="datetime-picker">
-                        <input id="field_from" name="from_" type="text">
-                            <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
-                        </input>
-                        </div-->
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'To')"/>
-                    </label>
-                        <input class="datetime" id="field_to" name="to_" 
type="text">
-                                <xsl:attribute name="value"><xsl:value-of 
select="booking/to_"/></xsl:attribute>
-                        </input>
-                        <!--div class="datetime-picker">
-                        <input id="field_to" name="to_" type="text">
-                            <xsl:attribute name="value"><xsl:value-of 
select="booking/to_"/></xsl:attribute>
-                        </input>
-                        </div-->
-                </div>
-                <div class="pure-control-group">
-                    <label>
-                        <xsl:value-of select="php:function('lang', 'Cost')" />
-                    </label>
-                    <input id="field_cost" name="cost" type="text" 
value="{booking/cost}"/>
-                </div>
-               <div class="pure-control-group">
-                       <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label></dt>
-                       <dd>
-                               <ul>
-                                       <xsl:for-each select="audience">
-                                               <li>
-                                                       <input type="checkbox" 
name="audience[]">
-                                                               <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
-                                                               <xsl:if 
test="../booking/audience=id">
-                                                                       
<xsl:attribute name="checked">checked</xsl:attribute>
-                                                               </xsl:if>
-                                                       </input>
-                                                       <label><xsl:value-of 
select="name"/></label>
-                                               </li>
-                                       </xsl:for-each>
-                               </ul>
-                       </dd>
-                       <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label></dt>
-                       <dd>
-                               <table id="agegroup">
-                                       <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
-                                           <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th></tr>
-                                       <xsl:for-each select="agegroups">
-                                               <xsl:variable 
name="id"><xsl:value-of select="id"/></xsl:variable>
-                                               <tr>
-                                                       <th><xsl:value-of 
select="name"/></th>
-                                                       <td>
-                                                               <input 
type="text">
-                                                                       
<xsl:attribute name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
-                                                                       
<xsl:attribute name="value"><xsl:value-of 
select="../booking/agegroups/male[../agegroup_id = $id]"/></xsl:attribute>
-                                                               </input>
-                                                       </td>
-                                                       <td>
-                                                               <input 
type="text">
-                                                                       
<xsl:attribute name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
-                                                                       
<xsl:attribute name="value"><xsl:value-of 
select="../booking/agegroups/female[../agegroup_id = $id]"/></xsl:attribute>
-                                                               </input>
-                                                       </td>
-                                               </tr>
-                                       </xsl:for-each>
-                               </table>
-                       </dd>
-                        <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'SMS total')" />
-                            </label>
-                                    <input type="text" name="sms_total">
+                                    </xsl:for-each>
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+                    
+                    <div class="pure-g">
+                        <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                            <div class="heading">
+                                <legend>&nbsp;</legend>
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_building_name">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Building')"/></h4>
+                                </label>
+                                <!--div class="autocomplete"-->
+                                <input id="field_building_id" 
name="building_id" type="hidden" value="{booking/building_id}"/>
+                                <input id="field_building_name" 
name="building_name" type="text" value="{booking/building_name}"/>
+                                <div id="building_container"></div>
+                                <!--/div-->
+                            </div>
+                            <div class="pure-control-group">
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Season')"/></h4>
+                                </label>
+                                <xsl:value-of select="php:function('lang', 
'Select a building first')"/>
+                            </div>
+                            <div class="pure-control-group">
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Resources')"/></h4>
+                                </label>
+                                <xsl:value-of select="php:function('lang', 
'Select a building first')"/>
+                            </div>
+                        </div>                        
+
+                        <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                            <div class="heading">
+                                <legend>&nbsp;</legend>
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_org_name">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Organization')"/></h4>
+                                </label>
+                                <!--div class="autocomplete"-->
+                                <input id="field_org_id" 
name="organization_id" type="hidden">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_id"/></xsl:attribute>
+                                </input>
+                                <input id="field_org_name" 
name="organization_name" type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_name"/></xsl:attribute>
+                                </input>
+                                <div id="org_container"></div>
+                                <!--/div-->
+                            </div>
+                            <div class="pure-control-group">
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Group')"/></h4>
+                                </label>
+                                    <!--div 
id="group_container"--><xsl:value-of select="php:function('lang', 
'Loading...')"/><!--/div-->
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_from">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'From')"/></h4>
+                                </label>
+                                <input class="datetime" id="field_from" 
name="from_" type="text" style="display:inline-block;">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
+                                </input>
+                                <!--div class="datetime-picker">
+                                <input id="field_from" name="from_" 
type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
+                                </input>
+                                </div-->
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_to">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'To')"/></h4>
+                                </label>
+                                <input class="datetime" id="field_to" 
name="to_" type="text" style="display:inline-block;">
+                                        <xsl:attribute 
name="value"><xsl:value-of select="booking/to_"/></xsl:attribute>
+                                </input>
+                                <!--div class="datetime-picker">
+                                <input id="field_to" name="to_" type="text">
+                                    <xsl:attribute name="value"><xsl:value-of 
select="booking/to_"/></xsl:attribute>
+                                </input>
+                                </div-->
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_cost">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Cost')" /></h4>
+                                </label>
+                                <input id="field_cost" name="cost" type="text" 
value="{booking/cost}"/>
+                            </div>
+                        </div>
+
+                        <div class="pure-u-1 pure-u-md-1 pure-u-lg-1-3">
+                            <div class="heading">
+                                <legend></legend>
+                            </div>
+                            <div class="pure-g">
+                                <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
+                                    <label for="field_from">
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Target audience')" /></h4>
+                                    </label>
+                                    <ul 
style="list-style:none;padding-left:10px;">
+                                        <xsl:for-each select="audience">
+                                            <li>
+                                                <label>
+                                                    <input type="checkbox" 
name="audience[]">
+                                                            <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                                            <xsl:if 
test="../booking/audience=id">
+                                                                    
<xsl:attribute name="checked">checked</xsl:attribute>
+                                                            </xsl:if>
+                                                    </input>
+                                                    <xsl:value-of 
select="name"/>
+                                                </label>
+                                            </li>
+                                        </xsl:for-each>
+                                    </ul>
+                                </div>
+                                <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
+                                    <div class="pure-control-group">
+                                        <label for="field_from">
+                                            <h4><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></h4>
+                                        </label>
+                                        <table id="agegroup" class="pure-table 
pure-table-bordered">
+                                            <thead>
+                                                <tr>
+                                                    <th></th>
+                                                    <th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                                    <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th>
+                                                </tr>
+                                            </thead>
+                                            <tbody>
+                                                <xsl:for-each 
select="agegroups">
+                                                    <xsl:variable 
name="id"><xsl:value-of select="id"/></xsl:variable>
+                                                    <tr>
+                                                        <th><xsl:value-of 
select="name"/></th>
+                                                        <td>
+                                                            <input type="text" 
class="input50">
+                                                                <xsl:attribute 
name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                                <xsl:attribute 
name="value"><xsl:value-of select="../booking/agegroups/male[../agegroup_id = 
$id]"/></xsl:attribute>
+                                                            </input>
+                                                        </td>
+                                                        <td>
+                                                            <input type="text" 
class="input50">
+                                                                <xsl:attribute 
name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
+                                                                <xsl:attribute 
name="value"><xsl:value-of select="../booking/agegroups/female[../agegroup_id = 
$id]"/></xsl:attribute>
+                                                            </input>
+                                                        </td>
+                                                    </tr>
+                                                </xsl:for-each>
+                                            </tbody>
+                                        </table>
+                                    </div>                                    
+                                    <div class="pure-control-group">
+                                        <label for="sms_total">
+                                            <h4><xsl:value-of 
select="php:function('lang', 'SMS total')" /></h4>
+                                        </label>
+                                        <input type="text" name="sms_total" 
id="sms_total">
                                             <xsl:attribute 
name="value"><xsl:value-of select="booking/sms_total"/></xsl:attribute>
-                                    </input>
+                                        </input>
+                                    </div>                                    
+                                    <div class="pure-control-group">
+                                        <label>
+                                            <h4><xsl:value-of 
select="php:function('lang', 'send reminder for participants statistics')" 
/></h4>
+                                        </label>
+                                        <select name="reminder" 
id="field_reminder">
+                                            <xsl:choose>
+                                                <xsl:when 
test="booking/reminder = 1">
+                                                    <option value="1" 
selected="selected"><xsl:value-of select="php:function('lang', 'Send 
reminder')" /></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                                </xsl:when>
+                                                <xsl:when 
test="booking/reminder = 0">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option value="0" 
selected="selected"><xsl:value-of select="php:function('lang', 'Do not send 
reminder')" /></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                                </xsl:when>
+                                                <xsl:when 
test="booking/reminder = 2">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option value="2" 
selected="selected"><xsl:value-of select="php:function('lang', 'User has 
responded to the reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                                </xsl:when>
+                                                <xsl:when 
test="booking/reminder = 3">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option value="3" 
selected="selected"><xsl:value-of select="php:function('lang', 'Reminder sent. 
Not responded to')" /></option>
+                                                </xsl:when>
+                                            </xsl:choose>
+                                            <!--xsl:if test="booking/reminder 
= 1">
+                                                    <option value="1" 
selected="selected"><xsl:value-of select="php:function('lang', 'Send 
reminder')" /></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                            </xsl:if>
+                                            <xsl:if test="booking/reminder = 
0">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option value="0" 
selected="selected"><xsl:value-of select="php:function('lang', 'Do not send 
reminder')" /></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                            </xsl:if>
+                                            <xsl:if test="booking/reminder = 
2">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option value="2" 
selected="selected"><xsl:value-of select="php:function('lang', 'User has 
responded to the reminder')" /></option>
+                                                    <option 
value="3"><xsl:value-of select="php:function('lang', 'Reminder sent. Not 
responded to')" /></option>
+                                            </xsl:if>
+                                            <xsl:if test="booking/reminder = 
3">
+                                                    <option 
value="1"><xsl:value-of select="php:function('lang', 'Send reminder')" 
/></option>
+                                                    <option 
value="0"><xsl:value-of select="php:function('lang', 'Do not send reminder')" 
/></option>
+                                                    <option 
value="2"><xsl:value-of select="php:function('lang', 'User has responded to the 
reminder')" /></option>
+                                                    <option value="3" 
selected="selected"><xsl:value-of select="php:function('lang', 'Reminder sent. 
Not responded to')" /></option>
+                                            </xsl:if-->
+                                        </select>
+                                    </div>                                    
+                                </div>
+                            </div>
                         </div>
-                        <div class="pure-control-group">
-                       <label>
-                            <xsl:value-of select="php:function('lang', 'send 
reminder for participants statistics')" />
-                        </label>
-                               <select name="reminder" id="field_reminder">
-                                       <xsl:if test="booking/reminder = 1">
-                                               <option value="1" 
selected="selected"><xsl:value-of select="php:function('lang', 'Send 
reminder')" /></option>
-                                               <option value="0"><xsl:value-of 
select="php:function('lang', 'Do not send reminder')" /></option>
-                                               <option value="2"><xsl:value-of 
select="php:function('lang', 'User has responded to the reminder')" /></option>
-                                               <option value="3"><xsl:value-of 
select="php:function('lang', 'Reminder sent. Not responded to')" /></option>
-                                       </xsl:if>
-                                       <xsl:if test="booking/reminder = 0">
-                                               <option value="1"><xsl:value-of 
select="php:function('lang', 'Send reminder')" /></option>
-                                               <option value="0" 
selected="selected"><xsl:value-of select="php:function('lang', 'Do not send 
reminder')" /></option>
-                                               <option value="2"><xsl:value-of 
select="php:function('lang', 'User has responded to the reminder')" /></option>
-                                               <option value="3"><xsl:value-of 
select="php:function('lang', 'Reminder sent. Not responded to')" /></option>
-                                       </xsl:if>
-                                       <xsl:if test="booking/reminder = 2">
-                                               <option value="1"><xsl:value-of 
select="php:function('lang', 'Send reminder')" /></option>
-                                               <option value="0"><xsl:value-of 
select="php:function('lang', 'Do not send reminder')" /></option>
-                                               <option value="2" 
selected="selected"><xsl:value-of select="php:function('lang', 'User has 
responded to the reminder')" /></option>
-                                               <option value="3"><xsl:value-of 
select="php:function('lang', 'Reminder sent. Not responded to')" /></option>
-                                       </xsl:if>
-                                       <xsl:if test="booking/reminder = 3">
-                                               <option value="1"><xsl:value-of 
select="php:function('lang', 'Send reminder')" /></option>
-                                               <option value="0"><xsl:value-of 
select="php:function('lang', 'Do not send reminder')" /></option>
-                                               <option value="2"><xsl:value-of 
select="php:function('lang', 'User has responded to the reminder')" /></option>
-                                               <option value="3" 
selected="selected"><xsl:value-of select="php:function('lang', 'Reminder sent. 
Not responded to')" /></option>
-                                       </xsl:if>
-                               </select>
+                    </div>
+                    
+                    <div class="pure-g">
+                        <div class="pure-u-1">
+                            <div class="heading">
+                                <legend></legend>
+                            </div>
+                            <div class="pure-control-group">
+                                <label for="field_mail">
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Inform contact persons')" /></h4>
+                                </label>
+                                <xsl:value-of select="php:function('lang', 
'Text written in the text area below will be sent as an email to all registered 
contact persons.')" />
+                                <textarea id="field_mail" name="mail" 
class="full-width"></textarea>
+                            </div>
                         </div>
-                </div>
-               <div style="clear: both" />
-               <div class="pure-control-group">
-                       <label>
-                            <xsl:value-of select="php:function('lang', 'Inform 
contact persons')" />
-                        </label>
-                               <xsl:value-of select="php:function('lang', 
'Text written in the text area below will be sent as an email to all registered 
contact persons.')" />
-                               <textarea id="field_mail" name="mail" 
class="full-width"></textarea>
-                </div>
+                    </div>
+
                 </fieldset>
             </div>
         </div>

Modified: branches/dev-syncromind/booking/templates/base/building.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/building.xsl 2015-09-10 
13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/building.xsl 2015-09-10 
23:59:50 UTC (rev 13876)
@@ -13,155 +13,263 @@
             </li>
         </ul-->
 
-        <xsl:call-template name="msgbox"/>
-               <!--xsl:call-template name="yui_booking_i18n"/-->
+    <xsl:call-template name="msgbox"/>
+    <!--xsl:call-template name="yui_booking_i18n"/-->
 
     <input type="hidden" name="tab" value=""/>
     <div id="tab-content">
         <xsl:value-of disable-output-escaping="yes" select="building/tabs"/>
         <div id="building_show"> 
-    <form action="" method="POST" id='form'  class="pure-form 
pure-form-aligned" name="form">     
-            <div class="pure-control-group">          
-                <label>
-                    <h4>
-                        <xsl:value-of select="php:function('lang', 
'Description')" />
-                    </h4>
-                </label>
-                <!--div class="description"--><xsl:value-of 
select="building/description" disable-output-escaping="yes"/><!--/div-->
-            </div>
-            <div class="pure-control-group">
-                <label>
-                    <xsl:value-of select="php:function('lang', 'Street')" />
-                </label>
-                <xsl:value-of select="building/street"/>
-            </div>
-            <div class="pure-control-group">
-                            <label>
-                                <xsl:value-of select="php:function('lang', 
'Zip code')" />
-                            </label>
-                <xsl:value-of select="building/zip_code"/>
-            </div>
-            <div class="pure-control-group">
-                <label><xsl:value-of select="php:function('lang', 'Postal 
City')" /></label>
-                <xsl:value-of select="building/city"/>
-            </div>
-            <div class="pure-control-group">
-                <label><xsl:value-of select="php:function('lang', 'District')" 
/></label>
-                <xsl:value-of select="building/district"/>
-            </div>
-            <div class="pure-control-group">
-                            <xsl:if test="building/location_code !=''">
-                        <label><xsl:value-of select="php:function('lang', 
'Location Code')" /></label>
+            <form action="" method="POST" id='form'  class="pure-form 
pure-form-aligned" name="form">
+
+                <div class="pure-control-group">          
+                    <label style="vertical-align:top;">
+                        <h4><xsl:value-of select="php:function('lang', 
'Description')" /></h4>
+                    </label>
+                    <!--div class="description"--><!--/div-->
+                    <div style="display:inline-block;">
+                        <xsl:value-of select="building/description" 
disable-output-escaping="yes"/>
+                    </div>
+                </div>
+                        
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 
'Street')" /></h4>
+                    </label>
+                    <xsl:value-of select="building/street"/>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 'Zip 
code')" /></h4>
+                    </label>
+                    <xsl:value-of select="building/zip_code"/>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 'Postal 
City')" /></h4>
+                    </label>
+                    <xsl:value-of select="building/city"/>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 
'District')" /></h4>
+                    </label>
+                    <xsl:value-of select="building/district"/>
+                </div>
+                <div class="pure-control-group">
+                    <xsl:if test="building/location_code !=''">
+                        <label>
+                            <h4><xsl:value-of select="php:function('lang', 
'Location Code')" /></h4>
+                        </label>
                         <a href="{building/location_link}"><xsl:value-of 
select="building/location_code"/></a>
-                            </xsl:if>
-
-            </div>
-            <div class="pure-control-group">
-                <label>
-                    <xsl:value-of select="php:function('lang', 'Homepage')" />
-                </label>
-                <a>
-                    <xsl:attribute name="href"><xsl:value-of 
select="building/homepage"/></xsl:attribute>
-                    <xsl:value-of select="building/homepage"/></a>
-            </div>
-            <div class="pure-control-group">
-                <label>
-                    <xsl:value-of select="php:function('lang', 'Email')" />
-                </label>
-                <a>
-                    <xsl:attribute name="href">mailto:<xsl:value-of 
select="building/email"/></xsl:attribute>
-                    <xsl:value-of select="building/email"/></a>
-            </div>
-            <div class="pure-control-group">
-                <label>
-                    <xsl:value-of select="php:function('lang', 'Telephone')" />
-                </label>
-                <xsl:value-of select="building/phone"/>
-            </div>
-                    <div class="clr"/>
-            <div class="pure-control-group">
+                    </xsl:if>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 
'Homepage')" /></h4>
+                    </label>
+                    <a>
+                        <xsl:attribute name="href"><xsl:value-of 
select="building/homepage"/></xsl:attribute>
+                        <xsl:value-of select="building/homepage"/>
+                    </a>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 
'Email')" /></h4>
+                    </label>
+                    <a>
+                        <xsl:attribute name="href">mailto:<xsl:value-of 
select="building/email"/></xsl:attribute>
+                        <xsl:value-of select="building/email"/>
+                    </a>
+                </div>
+                <div class="pure-control-group">
+                    <label>
+                        <h4><xsl:value-of select="php:function('lang', 
'Telephone')" /></h4>
+                    </label>
+                    <xsl:value-of select="building/phone"/>
+                </div>
+                <div class="pure-control-group">
                     <xsl:if test="building/tilsyn_name != ''">
                         <div class="pure-control-group">
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Tilsynsvakt name')" />
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt name')" /></h4>
                             </label>
                             <xsl:value-of select="building/tilsyn_name"/>
                         </div>
                         <div class="pure-control-group">
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Tilsynsvakt email')" />
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt email')" /></h4>
                             </label>
                             <a>
                                 <xsl:attribute 
name="href">mailto:<xsl:value-of 
select="building/tilsyn_email"/></xsl:attribute>
-                                <xsl:value-of 
select="building/tilsyn_email"/></a>
+                                <xsl:value-of select="building/tilsyn_email"/>
+                            </a>
                         </div>
                         <div class="pure-control-group">    
                             <label>
-                                <xsl:value-of select="php:function('lang', 
'Tilsynsvakt telephone')" />
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt telephone')" /></h4>
                             </label>
                             <xsl:value-of select="building/tilsyn_phone"/>
                         </div>
-                            </xsl:if>
-            </div>
-            <div class="pure-control-group">
-                            <xsl:if test="building/tilsyn_name2 != ''">
-                                <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt name')" /></label>
-                                    <xsl:value-of 
select="building/tilsyn_name2"/>
-                                </div>
-                                <div class="pure-control-group">
-                                    <label>
-                                        <xsl:value-of 
select="php:function('lang', 'Tilsynsvakt email')" />
-                                    </label>
-                                    <a>
-                                    <xsl:attribute 
name="href">mailto:<xsl:value-of 
select="building/tilsyn_email2"/></xsl:attribute>
-                                    <xsl:value-of 
select="building/tilsyn_email2"/></a>
-                                </div>
-                                <div class="pure-control-group">
-                                    <label>
-                                        <xsl:value-of 
select="php:function('lang', 'Tilsynsvakt telephone')" />
-                                    </label>
-                                    <xsl:value-of 
select="building/tilsyn_phone2"/>
-                                </div>
-                            </xsl:if>
-            </div>
-</form>            
-            <div class="form-buttons">
-                            <xsl:if test="building/permission/write">
-                            <button>
-                                <xsl:attribute 
name="onclick">window.location.href="<xsl:value-of 
select="building/edit_link"/>"</xsl:attribute>
-                                    <xsl:value-of select="php:function('lang', 
'Edit')" />
-                            </button>
-                            </xsl:if>
-                            <button>
-                                <xsl:attribute 
name="onclick">window.location.href="<xsl:value-of 
select="building/schedule_link"/>"</xsl:attribute>
-                                <xsl:value-of select="php:function('lang', 
'Building schedule')" />
-                            </button>
-            </div>
-
-            <h4><xsl:value-of select="php:function('lang', 'Bookable 
resources')" /></h4>
-            <div id="resources_container"/>
-
-                    <h4><xsl:value-of select="php:function('lang', 
'Documents')" /></h4>
-            <div id="documents_container"/>
-                    <a class='button'>
+                    </xsl:if>
+                </div>
+                <div class="pure-control-group">
+                    <xsl:if test="building/tilsyn_name2 != ''">
+                        <div class="pure-control-group">
+                            <label>
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt name')" /></h4>
+                            </label>
+                            <xsl:value-of select="building/tilsyn_name2"/>
+                        </div>
+                        <div class="pure-control-group">
+                            <label>
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt email')" /></h4>
+                            </label>
+                            <a>
+                            <xsl:attribute name="href">mailto:<xsl:value-of 
select="building/tilsyn_email2"/></xsl:attribute>
+                            <xsl:value-of select="building/tilsyn_email2"/></a>
+                        </div>
+                        <div class="pure-control-group">
+                            <label>
+                                <h4><xsl:value-of select="php:function('lang', 
'Tilsynsvakt telephone')" /></h4>
+                            </label>
+                            <xsl:value-of select="building/tilsyn_phone2"/>
+                        </div>
+                    </xsl:if>
+                </div>
+                <div class="pure-control-group">
+                    <label style="vertical-align:top;">
+                        <h4><xsl:value-of select="php:function('lang', 
'Bookable resources')" /></h4>
+                    </label>
+                    <div id="resources_container" 
style="display:inline-block;"></div>
+                </div>
+                <div class="pure-control-group">
+                    <label style="vertical-align:top;">
+                        <h4><xsl:value-of select="php:function('lang', 
'Documents')" /></h4>
+                    </label>
+                    <div style="display:inline-block;">
+                        <div id="documents_container"></div>
+                        <a class='button'>
                             <xsl:attribute name="href"><xsl:value-of 
select="building/add_document_link"/></xsl:attribute>
                             <xsl:if test="building/permission/write">
-                                    <xsl:value-of select="php:function('lang', 
'Add Document')" />
+                                <xsl:value-of select="php:function('lang', 
'Add Document')" />
                             </xsl:if>
-                    </a>
-
-                    <h4><xsl:value-of select="php:function('lang', 
'Permissions')" /></h4>
-            <div id="permissions_container"/>
+                        </a>
+                    </div>                        
+                </div>
+                <div class="pure-control-group">
+                    <label style="vertical-align:top;">
+                        <h4><xsl:value-of select="php:function('lang', 
'Permissions')" /></h4>
+                    </label>
+                    <div id="permissions_container" 
style="display:inline-block;"></div>
+                </div>
+                <div class="pure-control-group">
+                    <div class="form-buttons">
+                        <xsl:if test="building/permission/write">
+                        <button>
+                            <xsl:attribute 
name="onclick">window.location.href="<xsl:value-of 
select="building/edit_link"/>"</xsl:attribute>
+                            <xsl:value-of select="php:function('lang', 
'Edit')" />
+                        </button>
+                        </xsl:if>
+                        <button>
+                            <xsl:attribute 
name="onclick">window.location.href="<xsl:value-of 
select="building/schedule_link"/>"</xsl:attribute>
+                            <xsl:value-of select="php:function('lang', 
'Building schedule')" />
+                        </button>
+                    </div>
+                </div>                
+            </form>                       
         </div>
     </div>
 
     <!--/div-->
 
 <script type="text/javascript">
-var building_id = <xsl:value-of select="building/id"/>;
-       var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Category', 'Actions', 'Account', 'Role', 'Edit', 'Delete', 'Resource Type', 
'Sort order')"/>;
+    var building_id = <xsl:value-of select="building/id"/>;
+    var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Category', 'Actions', 'Account', 'Role', 'Edit', 'Delete', 'Resource Type', 
'Sort order')"/>;
+    
     <![CDATA[
+    var resourceURL     = 
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' + 
building_id + '&phpgw_return_as=json&';
+    var documentURL     = 
'index.php?menuaction=booking.uidocument_building.index&sort=name&filter_owner_id='
 + building_id + '&phpgw_return_as=json&';
+    var permissionURL   = 
'index.php?menuaction=booking.uipermission_building.index&sort=name&filter_object_id='
 + building_id + '&phpgw_return_as=json&';
+    ]]>
+    
+    
+    $.get(resourceURL, function(resourceData){
+        var resourceBody = '';
+        var resourceTableClass = "pure-table";
+        <![CDATA[
+            var resourceHead = '<tr><th>'+lang['Sort 
order']+'</th><th>'+lang['Name']+'</th><th>'+lang['Resource Type']+'</th></tr>';
+        ]]>;
+        if (resourceData.data.length === 0) {
+            resourceBody = '<tr><td colspan="3">'+lang['No records 
found']+'</td></tr>';
+        }else {
+            resourceTableClass = "pure-table pure-table-striped";
+            $.each(resourceData.data, function(index, value) {
+                <![CDATA[
+                resourceBody += '<tr><td>'+value.sort+'</td><td><a 
href="'+value.link+'">'+value.name+'</a></td><td>'+value.type+'</td></tr>';
+                ]]>
+            });
+        };
+        <![CDATA[
+            var resourceTable = '<table 
class="'+resourceTableClass+'"><thead>'+resourceHead+'</thead><tbody>'+resourceBody+'</tbody></table>'
+        ]]>
+        $('#resources_container').html(resourceTable);
+    });
+    
+    
+    
+    
+    $.get(documentURL, function(documentData){
+        var documentBody = '';
+        var documentTableClass = "pure-table";
+        <![CDATA[
+            var documentHead = 
'<tr><th>'+lang['Name']+'</th><th>'+lang['Category']+'</th><th>'+lang['Actions']+'</th></tr>';
+        ]]>;
+        if (documentData.data.length === 0) {
+            documentBody = '<tr><td colspan="3">'+lang['No records 
found']+'</td></tr>';
+        }else {
+            documentTableClass = "pure-table pure-table-striped";
+            $.each(documentData.data, function(index, value) {
+                <![CDATA[
+                documentBody += 
'<tr><td>'+value.name+'</td><td>'+value.category+'</td><td><a 
href="'+value.opcion_edit+'">'+lang['Edit']+'</a>&nbsp;<a 
href="'+value.opcion_delete+'">'+lang['Delete']+'</a></td></tr>';
+                ]]>
+            });
+        };
+        <![CDATA[
+            var documentTable = '<table 
class="'+documentTableClass+'"><thead>'+documentHead+'</thead><tbody>'+documentBody+'</tbody></table>'
+        ]]>
+        $('#documents_container').html(documentTable);
+    });
+    
+    
+    
+    $.get(permissionURL, function(permissionData){
+        var permissionBody = '';
+        var permissionTableClass = "pure-table";
+        <![CDATA[
+            var permissionHead = 
'<tr><th>'+lang['Account']+'</th><th>'+lang['Role']+'</th><th>'+lang['Actions']+'</th></tr>';
+        ]]>;
+        if (permissionData.data.length === 0) {
+            permissionBody = '<tr><td colspan="3">'+lang['No records 
found']+'</td></tr>';
+        }else {
+            permissionTableClass = "pure-table pure-table-striped";
+            $.each(permissionData.data, function(index, value) {
+                <![CDATA[
+                permissionBody += 
'<tr><td>'+value.subject_name+'</td><td>'+value.role+'</td><td><a 
href="'+value.opcion_edit+'">'+lang['Edit']+'</a>&nbsp;<a 
href="'+value.opcion_delete+'">'+lang['Delete']+'</a></td></tr>';
+                ]]>
+            });
+        };
+        <![CDATA[
+            var permissionTable = '<table 
class="'+permissionTableClass+'"><thead>'+permissionHead+'</thead><tbody>'+permissionBody+'</tbody></table>'
+        ]]>
+        $('#permissions_container').html(permissionTable);
+    });
+ </script>
+ <!--script>   
+    
+    
+    
+    <![CDATA[
 YAHOO.util.Event.addListener(window, "load", function() {
     var url = 
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' + 
building_id + '&phpgw_return_as=json&';
     var colDefs = [{key: 'sort', label: lang['Sort order']},{key: 'name', 
label: lang['Name'], formatter: YAHOO.booking.formatLink}, {key: 'type', label: 
lang['Resource Type']}];
@@ -179,6 +287,6 @@
 });
 
 ]]>
-</script>
+</script-->
 
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/building_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/building_form.xsl    
2015-09-10 13:34:06 UTC (rev 13875)
+++ branches/dev-syncromind/booking/templates/base/building_form.xsl    
2015-09-10 23:59:50 UTC (rev 13876)
@@ -20,211 +20,241 @@
                     <input type="hidden" name="tab" value=""/>
                     <div id="tab-content">
                     <xsl:value-of disable-output-escaping="yes" 
select="building/tabs"/>
-                        <div id="building">
+                        <div id="building_form">
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Building Name')" /></label>
-                                    <input name="name" type="text" 
value="{building/name}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Building Name')" /></h4>
+                                </label>
+                                <input name="name" type="text" 
value="{building/name}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Telephone')" /></label>
-                                    <input id="field_phone" name="phone" 
type="text" value="{building/phone}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Telephone')" /></h4>
+                                </label>
+                                <input id="field_phone" name="phone" 
type="text" value="{building/phone}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Email')" /></label>
-                                    <input id="field_email" name="email" 
type="text" value="{building/email}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Email')" /></h4>
+                                </label>
+                                <input id="field_email" name="email" 
type="text" value="{building/email}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Homepage')" /></label>
-                                    <input name="homepage" type="text" 
value="{building/homepage}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Homepage')" /></h4>
+                                </label>
+                                <input name="homepage" type="text" 
value="{building/homepage}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Location Code')" /></label>
-
-                                            <!--div class="autocomplete"-->
-                                                    <input 
id="field_location_code" name="location_code" type="hidden" 
value="{building/location_code}"/>
-                                                    <input 
id="field_location_code_name" name="location_code_name" type="text" 
value="{building/location_code}"/>
-                                                    <!--div 
id="location_code_container"/>
-                                            </div-->
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Location Code')" /></h4>
+                                </label>
+                                <!--div class="autocomplete"-->
+                                <input id="field_location_code" 
name="location_code" type="hidden" value="{building/location_code}"/>
+                                <input id="field_location_code_name" 
name="location_code_name" type="text" value="{building/location_code}"/>
+                                <!--div id="location_code_container"/>
+                                </div-->
                             </div>
-
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Street')"/></label>
-                                    <input id="field_street" name="street" 
type="text" value="{building/street}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Street')"/></h4>
+                                </label>
+                                <input id="field_street" name="street" 
type="text" value="{building/street}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Zip code')"/></label>
-                                    <input type="text" name="zip_code" 
id="field_zip_code" value="{building/zip_code}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Zip code')"/></h4>
+                                </label>
+                                <input type="text" name="zip_code" 
id="field_zip_code" value="{building/zip_code}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Postal City')"/></label>
-                                    <input type="text" name="city" 
id="field_city" value="{building/city}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Postal City')"/></h4>
+                                </label>
+                                <input type="text" name="city" id="field_city" 
value="{building/city}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'District')"/></label>
-                                    <input type="text" name="district" 
id="field_district" value="{building/district}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'District')"/></h4>
+                                </label>
+                                <input type="text" name="district" 
id="field_district" value="{building/district}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <xsl:if test="not(new_form)">
-                                            <label><xsl:value-of 
select="php:function('lang', 'Active')"/></label>
-                                                    <select id="field_active" 
name="active">
-                                                            <option value="1">
-                                                                    <xsl:if 
test="building/active=1">
-                                                                            
<xsl:attribute name="selected">checked</xsl:attribute>
-                                                                    </xsl:if>
-                                                                    
<xsl:value-of select="php:function('lang', 'Active')"/>
-                                                            </option>
-                                                            <option value="0">
-                                                                    <xsl:if 
test="building/active=0">
-                                                                            
<xsl:attribute name="selected">checked</xsl:attribute>
-                                                                    </xsl:if>
-                                                                    
<xsl:value-of select="php:function('lang', 'Inactive')"/>
-                                                            </option>
-                                                    </select>
-                                    </xsl:if>
+                                <xsl:if test="not(new_form)">
+                                    <label>
+                                        <h4><xsl:value-of 
select="php:function('lang', 'Active')"/></h4>
+                                    </label>
+                                    <select id="field_active" name="active">
+                                        <option value="1">
+                                            <xsl:if test="building/active=1">
+                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:value-of 
select="php:function('lang', 'Active')"/>
+                                        </option>
+                                        <option value="0">
+                                            <xsl:if test="building/active=0">
+                                                <xsl:attribute 
name="selected">checked</xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:value-of 
select="php:function('lang', 'Inactive')"/>
+                                        </option>
+                                    </select>
+                                </xsl:if>
                             </div>
-                            <div class="clr"/>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt name')" /></label>
-                                    <input name="tilsyn_name" type="text" 
value="{building/tilsyn_name}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt name')" /></h4>
+                                </label>
+                                <input name="tilsyn_name" type="text" 
value="{building/tilsyn_name}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt telephone')" /></label>
-                                    <input id="field_tilsyn_phone" 
name="tilsyn_phone" type="text" value="{building/tilsyn_phone}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt telephone')" /></h4>
+                                </label>
+                                <input id="field_tilsyn_phone" 
name="tilsyn_phone" type="text" value="{building/tilsyn_phone}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt email')" /></label>
-                                    <input id="field_tilsyn_email" 
name="tilsyn_email" type="text" value="{building/tilsyn_email}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt email')" /></h4>
+                                </label>
+                                <input id="field_tilsyn_email" 
name="tilsyn_email" type="text" value="{building/tilsyn_email}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt name')" /></label>
-                                    <input name="tilsyn_name2" type="text" 
value="{building/tilsyn_name2}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt name')" /></h4>
+                                </label>
+                                <input name="tilsyn_name2" type="text" 
value="{building/tilsyn_name2}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt telephone')" /></label>
-                                    <input id="field_tilsyn_phone2" 
name="tilsyn_phone2" type="text" value="{building/tilsyn_phone2}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt telephone')" /></h4>
+                                </label>
+                                <input id="field_tilsyn_phone2" 
name="tilsyn_phone2" type="text" value="{building/tilsyn_phone2}"/>
                             </div>
                             <div class="pure-control-group">
-                                    <label><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt email')" /></label>
-                                    <input id="field_tilsyn_email2" 
name="tilsyn_email2" type="text" value="{building/tilsyn_email2}"/>
+                                <label>
+                                    <h4><xsl:value-of 
select="php:function('lang', 'Tilsynsvakt email')" /></h4>
+                                </label>
+                                <input id="field_tilsyn_email2" 
name="tilsyn_email2" type="text" value="{building/tilsyn_email2}"/>
                             </div>
-
-                            <div class="clr"/>
                             <div class="pure-control-group">

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]