fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14283] fixing forms


From: Saul
Subject: [Fmsystem-commits] [14283] fixing forms
Date: Thu, 05 Nov 2015 00:26:23 +0000

Revision: 14283
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14283
Author:   psaul
Date:     2015-11-05 00:26:22 +0000 (Thu, 05 Nov 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
    branches/dev-syncromind/bookingfrontend/inc/class.uiallocation.inc.php
    branches/dev-syncromind/bookingfrontend/inc/class.uibooking.inc.php
    branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js
    
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    branches/dev-syncromind/bookingfrontend/templates/base/booking_delete.xsl
    branches/dev-syncromind/bookingfrontend/templates/base/booking_edit.xsl
    
branches/dev-syncromind/bookingfrontend/templates/base/booking_massupdate.xsl

Modified: branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
===================================================================
--- branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2015-11-05 00:26:22 UTC (rev 14283)
@@ -704,7 +704,6 @@
 dd {margin-left: 0;}
 #dates-container {width: 18em;}
 
-.pure-g {letter-spacing: unset;}
 .pure-g [class*="pure-u"] {padding: 0;}
 .pure-g [class*="pure-u"] button,
 .pure-g [class*="pure-u"] input,

Modified: branches/dev-syncromind/bookingfrontend/inc/class.uiallocation.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uiallocation.inc.php      
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uiallocation.inc.php      
2015-11-05 00:26:22 UTC (rev 14283)
@@ -55,7 +55,7 @@
                        $config = CreateObject('phpgwapi.config','booking');
                        $config->read();
 
-                       if ($config->config_data['user_can_delete'] != 'yes') {
+                       if ($config->config_data['user_can_delete_allocations'] 
!= 'yes') {
 
                        $allocation = 
$this->bo->read_single(intval(phpgw::get_var('allocation_id', 'GET')));
                 $organization = 
$this->organization_bo->read_single($allocation['organization_id']);

Modified: branches/dev-syncromind/bookingfrontend/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uibooking.inc.php 
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uibooking.inc.php 
2015-11-05 00:26:22 UTC (rev 14283)
@@ -338,6 +338,9 @@
 
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
+                $_POST['from_'] = ($_POST['from_']) ? date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['from_'])) : "";
+                $_POST['to_'] = ($_POST['to_']) ? date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['to_'])) : "";
+                $_POST['repeat_until'] = ($_POST['repeat_until']) ? 
date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['repeat_until'])) : "";
 
                                if (!($_POST['recurring'] == 'on' || 
$_POST['outseason'] == 'on')){
 
@@ -452,16 +455,31 @@
                                $booking['resources_json'] = 
json_encode(array_map('intval', $booking['resources']));
                                $booking['organization_name'] = 
$group['organization_name'];
                        }
+
+            $booking['from_'] = pretty_timestamp($booking['from_']);
+            $booking['to_'] = pretty_timestamp($booking['to_']);
+            $booking['repeat_until'] = 
pretty_timestamp($booking['repeat_until']);
+            
+            $activity_path = 
$this->activity_bo->get_path($booking['activity_id']);
+            $top_level_activity = $activity_path ? $activity_path[0]['id'] : 
-1;
+            
                        $booking['cancel_link'] = self::link(array('menuaction' 
=> 'bookingfrontend.uibuilding.schedule', 'id' => $booking['building_id']));
-                       $agegroups = $this->agegroup_bo->fetch_age_groups();
+                       $agegroups = 
$this->agegroup_bo->fetch_age_groups($top_level_activity);
                        $agegroups = $agegroups['results'];
-                       $audience = $this->audience_bo->fetch_target_audience();
+                       $audience = 
$this->audience_bo->fetch_target_audience($top_level_activity);
                        $audience = $audience['results'];
                        $activities = $this->activity_bo->fetch_activities();
                        $activities = $activities['results'];
+            $booking['audience_json'] = 
json_encode(array_map('intval',$booking['audience']));
                        $group = 
$this->group_bo->so->read_single($booking['group_id']);
                        $groups = 
$this->group_bo->so->read(array('filters'=>array('organization_id'=>$group['organization_id'],
 'active'=>1)));
                        $groups =  $groups['results'];
+
+            $GLOBALS['phpgw']->jqcal->add_listener('field_from', 'datetime');
+            $GLOBALS['phpgw']->jqcal->add_listener('field_to', 'datetime');
+            
+            $GLOBALS['phpgw']->jqcal->add_listener('field_repeat_until', 
'date');
+            
                        if ($step < 2) 
                        {
                                self::render_template('booking_edit', 
array('booking' => $booking, 
@@ -566,10 +584,15 @@
                        }
 
                        $this->flash_form_errors($errors);
-                       $agegroups = $this->agegroup_bo->fetch_age_groups();
+            
+            $activity_path = 
$this->activity_bo->get_path($booking['activity_id']);
+            $top_level_activity = $activity_path ? $activity_path[0]['id'] : 
-1;
+            
+                       $agegroups = 
$this->agegroup_bo->fetch_age_groups($top_level_activity);
                        $agegroups = $agegroups['results'];
-                       $audience = $this->audience_bo->fetch_target_audience();
+                       $audience = 
$this->audience_bo->fetch_target_audience($top_level_activity);
                        $audience = $audience['results'];
+            $booking['audience_json'] = 
json_encode(array_map('intval',$booking['audience']));
 
                        $group = 
$this->group_bo->so->read_single($booking['group_id']);
                        $groups = 
$this->group_bo->so->read(array('filters'=>array('organization_id'=>$group['organization_id'],
 'active'=>1)));
@@ -577,6 +600,8 @@
 
                        $activities = $this->activity_bo->fetch_activities();
                        $activities = $activities['results'];
+            
+            self::add_javascript('bookingfrontend', 'bookingfrontend', 
'booking_massupdate.js');
                        
                        self::render_template('booking_massupdate',
                                        array('booking' => $booking,
@@ -684,7 +709,7 @@
                        $config = CreateObject('phpgwapi.config','booking');
                        $config->read();
 
-                       if ($config->config_data['user_can_delete_bookings'] != 
'yes') {
+                       if ($config->config_data['user_can_delete'] != 'yes') {
 
                        $booking = 
$this->bo->read_single(intval(phpgw::get_var('id', 'GET')));
                                $errors = array();
@@ -733,7 +758,7 @@
                    $this->flash_form_errors($errors);
                                $allocation['cancel_link'] = 
self::link(array('menuaction' => 'bookingfrontend.uibuilding.schedule', 'id' => 
$allocation['building_id']));
        
-                               $this->use_yui_editor();
+//                             $this->use_yui_editor();
                                self::render_template('booking_cancel', 
array('booking'=>$booking));
 
                        } else {
@@ -776,6 +801,10 @@
 
                                if($_SERVER['REQUEST_METHOD'] == 'POST')
                                {
+                    $_POST['from_'] = date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['from_']));
+                    $_POST['to_'] = date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['to_']));
+                    $_POST['repeat_until'] = date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['repeat_until']));
+                    
                                        $from_date = $_POST['from_'];
                                        $to_date = $_POST['to_'];
                                        $info_deleted = '';
@@ -861,6 +890,9 @@
                                                        $booking['to_'] = 
$todate;
                                                        $info_deleted = '';
                                                        $inf_del = '';
+                            
+                            $fromdate = pretty_timestamp($fromdate);
+                            $todate = pretty_timestamp($todate);
        
                                $id = $this->bo->so->get_booking_id($booking);  
              
                                if($id) {
@@ -946,11 +978,18 @@
                                } else {
                                        $user_can_delete_allocations = 1;
                                }
-                               self::add_javascript('booking', 'booking', 
'booking.js');
+                
+                $booking['from_'] = pretty_timestamp($booking['from_']);
+                $booking['to_'] = pretty_timestamp($booking['to_']);
+                
+//                             self::add_javascript('booking', 'booking', 
'booking.js');
                                $booking['resources_json'] = 
json_encode(array_map('intval', $booking['resources']));
 #                              $booking['cancel_link'] = 
self::link(array('menuaction' => 'bookingfrontend.uibooking.show', 'id' => 
$booking['id']));
                 $booking['cancel_link'] = self::link(array('menuaction' => 
'bookingfrontend.uibuilding.schedule', 'id' => $booking['building_id'], 'date' 
=> $booking['from_']));
                                $booking['booking_link'] = 
self::link(array('menuaction' => 'bookingfrontend.uibooking.show', 'id' => 
$booking['id']));
+                
+                $GLOBALS['phpgw']->jqcal->add_listener('field_repeat_until', 
'date');
+                
                                if ($step < 2) 
                    {
                                self::render_template('booking_delete', 
array('booking' => $booking,
@@ -969,9 +1008,9 @@
                                                'recurring' => 
$_POST['recurring'],
                                                'outseason' => 
$_POST['outseason'],
                                                'interval' => 
$_POST['field_interval'],
-                                               'repeat_until' => 
$_POST['repeat_until'],
-                                               'from_date' => $from_date,
-                                               'to_date' => $to_date,
+                                               'repeat_until' => 
pretty_timestamp($_POST['repeat_until']),
+                                               'from_date' => 
pretty_timestamp($from_date),
+                                               'to_date' => 
pretty_timestamp($to_date),
                            'delete_allocation' => $_POST['delete_allocation'],
                                                'user_can_delete_allocations' 
=> $user_can_delete_allocations,
                                                'allocation_keep' => 
$allocation_keep,

Modified: branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js
===================================================================
--- branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js       
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js       
2015-11-05 00:26:22 UTC (rev 14283)
@@ -1,66 +1,122 @@
-//var building_id_selection;
-//
-//$(document).ready(function(){
+var building_id_selection;
+
+$(document).ready(function(){
 //    
JqueryPortico.autocompleteHelper('index.php?menuaction=bookingfrontend.uibuilding.index&phpgw_return_as=json&',
 'field_building_name', 'field_building_id', 'building_container');
 //    
JqueryPortico.autocompleteHelper('index.php?menuaction=bookingfrontend.uigroup.index&phpgw_return_as=json&',
 'field_group_name', 'field_group_id', 'group_container');
-//});
-//
-//$(window).load(function(){
-//   var building_id =  $('#field_building_id').val();
-//   if (building_id) {
-//        populateTableChkResources(building_id, initialSelection);
-//        building_id_selection = building_id
-//   }
-//   $('#field_building_name').on("autocompleteselect", function(event, ui) {
-//      var building_id = ui.item.value;
-//      if (building_id != building_id_selection) {
-//            populateTableChkResources(building_id, []);
-//            building_id_selection = building_id;
-//      }
-//   });
-//});
-//
-//function populateTableChk (url, container, colDefs) {
-//    createTable(container, url, colDefs);
-//}
-//
-//function populateTableChkResources (building_id, selection) {
-//    var url = 
"index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id="
 +  building_id + "&phpgw_return_as=json&";
-//    var container = "resources_container";
-//    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resource[]'},{name: 
'data-validation', value: 'checkbox_group'},{name: 'data-validation-qty', 
value: 'min1'},{name: 'data-validation-error-msg', value: 'Please choose at 
least 1 resource'}]}], value: 'id', checked: selection},{key: 'name', label: 
lang['Name']},{key: 'type', label: lang['Resources Type']}];
-//    populateTableChk(url, container, colDefsResources);
-//}
-//
 
-populateResourceTable = function(building_id, selection) {
-    YAHOO.booking.checkboxTableHelper('resources_container', 
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id='
 +  building_id + '&phpgw_return_as=json&',
-    'resources[]', selection);
-}
+    $("#field_activity").change(function(){
+        var oArgs = 
{menuaction:'bookingfrontend.uiapplication.get_activity_data', 
activity_id:$(this).val()};
+        var requestUrl = phpGWLink('index.php', oArgs, true);
 
-YAHOO.util.Event.addListener(window, "load", function() {
-    var building_id = YAHOO.util.Dom.get('field_building_id').value;
-    if(building_id) {
-        populateResourceTable(building_id, YAHOO.booking.initialSelection);
-    }
+        $.ajax({
+            type: 'POST',
+            dataType: 'json',
+            url: requestUrl,
+            success: function(data) {
+                var html_agegroups = '';
+                var html_audience = '';
+                console.log(data);
+                if( data != null)
+                {
+                    var agegroups = data.agegroups;
+                    for ( var i = 0; i < agegroups.length; ++i )
+                    {
+                        html_agegroups += "<tr>";
+                        html_agegroups += "<th>" + agegroups[i]['name'] + 
"</th>";
+                        html_agegroups += "<td>";
+                        html_agegroups += "<input class=\"input50\" 
type=\"text\" name='male[" +agegroups[i]['id'] + "]' value='0'></input>";
+                        html_agegroups += "</td>";
+                        html_agegroups += "<td>";
+                        html_agegroups += "<input class=\"input50\" 
type=\"text\" name='female[" +agegroups[i]['id'] + "]' value='0'></input>";
+                        html_agegroups += "</td>";
+                        html_agegroups += "</tr>";
+                    }
+                    $("#agegroup_tbody").html( html_agegroups );
 
-    var ac = 
YAHOO.booking.autocompleteHelper('index.php?menuaction=bookingfrontend.uibuilding.index&phpgw_return_as=json&',
 
-                                              'field_building_name', 
'field_building_id', 'building_container');
-    // Update the resource table as soon a new building is selected
-    ac.itemSelectEvent.subscribe(function(sType, aArgs) {
-        populateResourceTable(aArgs[2].id, []);
+                    var audience = data.audience;
+                    var checked = '';
+                    for ( var i = 0; i < audience.length; ++i )
+                    {
+                        checked = '';
+                        if (initialAudience) {
+                            for ( var j = 0; j < initialAudience.length; ++j )
+                            {
+                                if(audience[i]['id'] == initialAudience[j])
+                                {
+                                    checked = " checked='checked'";
+                                }
+                            }
+                        }
+                        html_audience += "<li>";
+                        html_audience += "<label>";
+                        html_audience += "<input type=\"radio\" 
name=\"audience[]\" value='" +audience[i]['id'] + "'" + checked+ "></input>";
+                        html_audience += audience[i]['name'];
+                        html_audience += "</label>";
+                        html_audience += "</li>";
+                    }
+                    $("#audience").html( html_audience );
+                }
+            }
+        });
     });
+});
 
-    
YAHOO.booking.autocompleteHelper('index.php?menuaction=bookingfrontend.uigroup.index&phpgw_return_as=json&',
 
-                                     'field_group_name', 'field_group_id', 
'group_container');
+$(window).load(function(){
+   var building_id =  $('#field_building_id').val();
+   if (building_id) {
+        populateTableChkResources(building_id, initialSelection);
+        building_id_selection = building_id
+   }
+   $('#field_building_name').on("autocompleteselect", function(event, ui) {
+      var building_id = ui.item.value;
+      if (building_id != building_id_selection) {
+            populateTableChkResources(building_id, []);
+            building_id_selection = building_id;
+      }
+   });
 });
 
-YAHOO.booking.newApplicationForm = function(date, _from, _to) {
-    date = date ? date : YAHOO.booking.date;
-    _from = _from ? '%20' + _from: '';
-    _to = _to ? '%20' + _to: '';
-    var url = YAHOO.booking.newApplicationUrl;
-    var state = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + 
date.getDate();
-    url += '&from_[]=' + state + _from + '&to_[]=' + state + _to;
-    window.location.href = url;
+function populateTableChk (url, container, colDefs) {
+    createTable(container, url, colDefs, 'results');
 }
 
+function populateTableChkResources (building_id, selection) {
+    var url = 
"index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id="
 +  building_id + "&phpgw_return_as=json&";
+    var container = "resources_container";
+    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resource[]'},{name: 
'data-validation', value: 'checkbox_group'},{name: 'data-validation-qty', 
value: 'min1'},{name: 'data-validation-error-msg', value: 'Please choose at 
least 1 resource'}]}], value: 'id', checked: selection},{key: 'name', label: 
lang['Name']},{key: 'type', label: lang['Resource Type']}];
+    populateTableChk(url, container, colDefsResources);
+}
+
+
+//populateResourceTable = function(building_id, selection) {
+//    YAHOO.booking.checkboxTableHelper('resources_container', 
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id='
 +  building_id + '&phpgw_return_as=json&',
+//    'resources[]', selection);
+//}
+//
+//YAHOO.util.Event.addListener(window, "load", function() {
+//    var building_id = YAHOO.util.Dom.get('field_building_id').value;
+//    if(building_id) {
+//        populateResourceTable(building_id, YAHOO.booking.initialSelection);
+//    }
+//
+//    var ac = 
YAHOO.booking.autocompleteHelper('index.php?menuaction=bookingfrontend.uibuilding.index&phpgw_return_as=json&',
 
+//                                              'field_building_name', 
'field_building_id', 'building_container');
+//    // Update the resource table as soon a new building is selected
+//    ac.itemSelectEvent.subscribe(function(sType, aArgs) {
+//        populateResourceTable(aArgs[2].id, []);
+//    });
+//
+//    
YAHOO.booking.autocompleteHelper('index.php?menuaction=bookingfrontend.uigroup.index&phpgw_return_as=json&',
 
+//                                     'field_group_name', 'field_group_id', 
'group_container');
+//});
+//
+//YAHOO.booking.newApplicationForm = function(date, _from, _to) {
+//    date = date ? date : YAHOO.booking.date;
+//    _from = _from ? '%20' + _from: '';
+//    _to = _to ? '%20' + _to: '';
+//    var url = YAHOO.booking.newApplicationUrl;
+//    var state = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + 
date.getDate();
+//    url += '&from_[]=' + state + _from + '&to_[]=' + state + _to;
+//    window.location.href = url;
+//}
+

Modified: 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
===================================================================
--- 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    2015-11-04 23:23:06 UTC (rev 14282)
+++ 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    2015-11-05 00:26:22 UTC (rev 14283)
@@ -1,7 +1,66 @@
-//$(windows).load(function(){
-//    $('header').hide();
-//})
+$(window).load(function(){
+    $('header').hide();
+    
+    $("#field_activity").change(function(){
+        var oArgs = 
{menuaction:'bookingfrontend.uiapplication.get_activity_data', 
activity_id:$(this).val()};
+        var requestUrl = phpGWLink('index.php', oArgs, true);
 
-YAHOO.util.Event.addListener(window, "load", function() {
-       YAHOO.util.Dom.setStyle(('header'), 'display', 'none');
+        $.ajax({
+            type: 'POST',
+            dataType: 'json',
+            url: requestUrl,
+            success: function(data) {
+                var html_agegroups = '';
+                var html_audience = '';
+
+                if( data != null)
+                {
+                    var agegroups = data.agegroups;
+                    for ( var i = 0; i < agegroups.length; ++i )
+                    {
+                        html_agegroups += "<tr>";
+                        html_agegroups += "<th>" + agegroups[i]['name'] + 
"</th>";
+                        html_agegroups += "<td>";
+                        html_agegroups += "<input class=\"input50\" 
type=\"text\" name='male[" +agegroups[i]['id'] + "]' value='0'></input>";
+                        html_agegroups += "</td>";
+                        html_agegroups += "<td>";
+                        html_agegroups += "<input class=\"input50\" 
type=\"text\" name='female[" +agegroups[i]['id'] + "]' value='0'></input>";
+                        html_agegroups += "</td>";
+                        html_agegroups += "</tr>";
+                    }
+                    $("#agegroup_tbody").html( html_agegroups );
+
+                    var audience = data.audience;
+                    var checked = '';
+                    for ( var i = 0; i < audience.length; ++i )
+                    {
+                        checked = '';
+                        if (initialAudience) {
+                            for ( var j = 0; j < initialAudience.length; ++j )
+                            {
+                                if(audience[i]['id'] == initialAudience[j])
+                                {
+                                    checked = " checked='checked'";
+                                }
+                            }
+                        }
+                        html_audience += "<li>";
+                        html_audience += "<label>";
+                        html_audience += "<input type=\"radio\" 
name=\"audience[]\" value='" +audience[i]['id'] + "'" + checked+ "></input>";
+                        html_audience += audience[i]['name'];
+                        html_audience += "</label>";
+                        html_audience += "</li>";
+                    }
+                    $("#audience").html( html_audience );
+                }
+            }
+        });
+    });
 });
+
+
+
+
+//YAHOO.util.Event.addListener(window, "load", function() {
+//     YAHOO.util.Dom.setStyle(('header'), 'display', 'none');
+//});

Modified: 
branches/dev-syncromind/bookingfrontend/templates/base/booking_delete.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/booking_delete.xsl   
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/templates/base/booking_delete.xsl   
2015-11-05 00:26:22 UTC (rev 14283)
@@ -10,7 +10,7 @@
        <dd><xsl:value-of select="php:function('lang', 'Booking Delete 
Information')"/></dd>
        <dd><xsl:value-of select="php:function('lang', 'Booking Delete 
Information2')"/></dd>
        </dl>
-    <div class="clr"/>
+    <!--div class="clr"/-->
     <form action="" method="POST">
                <input type="hidden" name="application_id" 
value="{booking/application_id}"/>
         <input type="hidden" name="group_id" value="{booking/group_id}" />
@@ -18,112 +18,150 @@
         <input type="hidden" name="season_id" value="{booking/season_id}" />
         <input type="hidden" name="from_" value="{booking/from_}" />
         <input type="hidden" name="to_" value="{booking/to_}" />
-
-        <dl class="form-col">
-            <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
-            <dd>
-                <div>
-                        <xsl:value-of select="booking/building_name"/>
-                </div>
-            </dd>
-            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
-            <dd>
-                <div>
-                    <xsl:value-of select="booking/from_"/>
-                </div>
-            </dd>
-            <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')"/></label></dt>
-            <dd>
-                <div>
-                    <xsl:value-of select="booking/to_"/>
-                </div>
-            </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation deletion')" /></label></dt>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="outseason" 
id="outseason">
-                                               <xsl:if test="outseason='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Out season')" />
-                               </label>
-                       </dd>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="recurring" 
id="recurring">
-                                               <xsl:if test="recurring='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Delete until')" />
-                               </label>
-                       </dd>
-                       <dd class="date-picker">
-                               <input id="field_repeat_until" 
name="repeat_until" type="text">
-                                       <xsl:attribute 
name="value"><xsl:value-of select="repeat_until"/></xsl:attribute>
-                               </input>
-                       </dd>
-                       <dt><xsl:value-of select="php:function('lang', 
'Interval')" /></dt>
-                       <dd>
-                               <xsl:value-of select="../field_interval" />
-                               <select id="field_interval" 
name="field_interval">
-                                       <option value="1">
-                                               <xsl:if test="interval=1">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '1 week')" />
-                                       </option>
-                                       <option value="2">
-                                               <xsl:if test="interval=2">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '2 weeks')" />
-                                       </option>
-                                       <option value="3">
-                                               <xsl:if test="interval=3">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '3 weeks')" />
-                                       </option>
-                                       <option value="4">
-                                               <xsl:if test="interval=4">
-                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                               </xsl:if>
-                                               <xsl:value-of 
select="php:function('lang', '4 weeks')" />
-                                       </option>
-                               </select>
-                       </dd>
-        </dl>
-        <dl class="form-col">
-            <dt><label for="field_group"><xsl:value-of 
select="php:function('lang', 'Group')"/></label></dt>
-            <dd>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
+                    <dd>
+                        <div>
+                            <xsl:value-of select="booking/building_name"/>
+                        </div>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_group"><xsl:value-of 
select="php:function('lang', 'Group')"/></label></dt>
+                    <dd>
                         <xsl:value-of select="booking/group_name"/>
-            </dd>
-            <dt><label for="field_season"><xsl:value-of 
select="php:function('lang', 'Season')"/></label></dt>
-            <dd>
+                    </dd>
+                </dl>
+            </div>
+        </div>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
+                    <dd>
+                        <div>
+                            <xsl:value-of select="booking/from_"/>
+                        </div>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')"/></label></dt>
+                    <dd>
+                        <div>
+                            <xsl:value-of select="booking/to_"/>
+                        </div>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_season"><xsl:value-of 
select="php:function('lang', 'Season')"/></label></dt>
+                    <dd>
                         <xsl:value-of select="booking/season_name"/>
-            </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Delete allocation also')" /></label></dt>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" 
name="delete_allocation" id="delete_allocation">
-                                               <xsl:if 
test="delete_allocation='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Delete allocations')" />
-                               </label>
-                       </dd>
-        </dl>
-               <div style='clear:left; padding:0; margin:0'/>
-
-        <dl class="form-col">
-               <dt><label for="field_message"><xsl:value-of 
select="php:function('lang', 'Message')" /></label></dt>
-               <dd class="yui-skin-sam">
-               <textarea id="field-message" name="message" 
type="text"><xsl:value-of select="system_message/message"/></textarea>
-               </dd>
-        </dl>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Delete allocation also')" /></label></dt>
+                    <dd>
+                        <label>
+                            <input type="checkbox" name="delete_allocation" 
id="delete_allocation">
+                                <xsl:if test="delete_allocation='on'">
+                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                </xsl:if>
+                            </input>
+                            <xsl:value-of select="php:function('lang', 'Delete 
allocations')" />
+                        </label>
+                    </dd>
+                </dl>
+            </div>
+        </div>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation deletion')" /></label></dt>
+                    <dd>
+                        <label>
+                            <input type="checkbox" name="outseason" 
id="outseason">
+                                <xsl:if test="outseason='on'">
+                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                </xsl:if>
+                            </input>
+                            <xsl:value-of select="php:function('lang', 'Out 
season')" />
+                        </label>
+                    </dd>
+                    <dd>
+                        <label>
+                            <input type="checkbox" name="recurring" 
id="recurring">
+                                <xsl:if test="recurring='on'">
+                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                </xsl:if>
+                            </input>
+                            <xsl:value-of select="php:function('lang', 'Delete 
until')" />
+                        </label>
+                    </dd>
+                    <dd>
+                        <input class="datetime" id="field_repeat_until" 
name="repeat_until" type="text">
+                            <xsl:attribute name="value"><xsl:value-of 
select="repeat_until"/></xsl:attribute>
+                        </input>
+                    </dd>
+                    <!--dd class="date-picker">
+                        <input id="field_repeat_until" name="repeat_until" 
type="text">
+                            <xsl:attribute name="value"><xsl:value-of 
select="repeat_until"/></xsl:attribute>
+                        </input>
+                    </dd-->
+                </dl>
+            </div>
+        </div>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-2-5 pure-lg-1-4">
+                <dl class="form-col">
+                    <dt><xsl:value-of select="php:function('lang', 
'Interval')" /></dt>
+                    <dd>
+                        <xsl:value-of select="../field_interval" />
+                        <select id="field_interval" name="field_interval">
+                            <option value="1">
+                                <xsl:if test="interval=1">
+                                    <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                </xsl:if>
+                                <xsl:value-of select="php:function('lang', '1 
week')" />
+                            </option>
+                            <option value="2">
+                                <xsl:if test="interval=2">
+                                    <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                </xsl:if>
+                                <xsl:value-of select="php:function('lang', '2 
weeks')" />
+                            </option>
+                            <option value="3">
+                                <xsl:if test="interval=3">
+                                    <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                </xsl:if>
+                                <xsl:value-of select="php:function('lang', '3 
weeks')" />
+                            </option>
+                            <option value="4">
+                                <xsl:if test="interval=4">
+                                    <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                </xsl:if>
+                                <xsl:value-of select="php:function('lang', '4 
weeks')" />
+                            </option>
+                        </select>
+                    </dd>
+                </dl>
+            </div>
+        </div>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-2-5 pure-u-lg-1-4">
+                <dl class="form-col">
+                    <dt><label for="field_message"><xsl:value-of 
select="php:function('lang', 'Message')" /></label></dt>
+                    <dd class="yui-skin-sam">
+                        <textarea id="field-message" name="message" 
type="text"><xsl:value-of select="system_message/message"/></textarea>
+                    </dd>
+                </dl>
+            </div>
+        </div>
         <div class="form-buttons">
             <input type="submit">
                                <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Delete')"/></xsl:attribute>
@@ -136,17 +174,22 @@
     </form>
     </div>
     <script type="text/javascript">
+        var season_id = '<xsl:value-of select="booking/season_id" />';
+        var group_id = '<xsl:value-of select="booking/group_id" />';
+        var initialSelection = '<xsl:value-of select="booking/resource_json" 
/>';
+    </script>
+    <!--script type="text/javascript">
         YAHOO.booking.season_id = '<xsl:value-of select="booking/season_id"/>';
         YAHOO.booking.group_id = '<xsl:value-of select="booking/group_id"/>';
         YAHOO.booking.initialSelection = <xsl:value-of 
select="booking/resources_json"/>;
-               var lang = <xsl:value-of select="php:function('js_lang', 
'Resource Type')"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Resource 
Type')"/>;
         <![CDATA[
         var descEdit = new YAHOO.widget.SimpleEditor('field-message', {
             height: '150px',
             width: '522px',
             dompath: true,
             animate: true,
-           handleSubmit: true,
+            handleSubmit: true,
             toolbar: {
                 titlebar: '',
                 buttons: [
@@ -162,5 +205,5 @@
         });
         descEdit.render();
         ]]>
-    </script>
+    </script-->
 </xsl:template>

Modified: 
branches/dev-syncromind/bookingfrontend/templates/base/booking_edit.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/booking_edit.xsl     
2015-11-04 23:23:06 UTC (rev 14282)
+++ branches/dev-syncromind/bookingfrontend/templates/base/booking_edit.xsl     
2015-11-05 00:26:22 UTC (rev 14283)
@@ -11,154 +11,199 @@
                <input type="hidden" name="season_id" 
value="{booking/season_id}"/>
                <input type="hidden" name="allocation_id" 
value="{booking/allocation_id}"/>
                <input type="hidden" name="step" value="1"/>
-        <dl class="form-col">
-            <dt><label for="field_active"><xsl:value-of 
select="php:function('lang', 'Active')"/></label></dt>
-            <dd>
-                <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>
-            </dd>
-                       <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
-                       <dd>
-                               <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"/>
-                                               </option>
-                                       </xsl:for-each>
-                               </select>
-                       </dd>
-            <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')"/></label></dt>
-            <dd>
-                <input id="field_building_id" name="building_id" type="hidden" 
value="{booking/building_id}"/>
-                   <xsl:value-of select="booking/building_name"/>
-            </dd>
-            <dt><label for="field_resources"><xsl:value-of 
select="php:function('lang', 'Resources')"/></label></dt>
-            <dd>
-                <div id="resources_container"><xsl:value-of 
select="php:function('lang', 'Select a building first')"/></div>
-            </dd>
-        </dl>
-        <dl class="form-col">
-            <dt style="margin-top: 100px;"><label 
for="field_org"><xsl:value-of select="php:function('lang', 
'Organization')"/></label></dt>
-            <dd>
-                   <xsl:value-of select="booking/organization_name"/>
-            </dd>
-            <dt><label for="field_group"><xsl:value-of 
select="php:function('lang', 'Group')"/></label></dt>
-            <dd>
-                               <select name="group_id">
-                                               <option value=""><xsl:value-of 
select="php:function('lang', 'Select a group')"/></option>
-                                       <xsl:for-each select="groups">
-                                               <option value="{id}">
-                                                       <xsl:if 
test="../booking/group_id = id">
-                                                               <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                                       </xsl:if>
-                                                       <xsl:value-of 
select="name"/>
-                                               </option>
-                                       </xsl:for-each>
-                               </select>
-            </dd>
-            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')"/></label></dt>
-            <dd>
-                <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>
-            </dd>
-            <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')"/></label></dt>
-            <dd>
-                <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>
-            </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring booking')" /></label></dt>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="outseason" 
id="outseason">
-                                               <xsl:if test="outseason='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Out season')" />
-                               </label>
-                       </dd>
-                       <dd>
-                               <label>
-                                       <input type="checkbox" name="recurring" 
id="recurring">
-                                               <xsl:if test="recurring='on'">
-                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
-                                               </xsl:if>
-                                       </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Repeat until')" />
-                               </label>
-                       </dd>
-                       <dd class="date-picker">
-                               <input id="field_repeat_until" 
name="repeat_until" type="text">
-                                       <xsl:attribute 
name="value"><xsl:value-of select="repeat_until"/></xsl:attribute>
-                               </input>
-                       </dd>
-        </dl>
-               <dl class="form-col">
-                       <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>
-               </dl>
+        <div class="pure-g">
+            <div class="pure-u-1">
+                <dl class="form-col">
+                    <dt><label for="field_active"><xsl:value-of 
select="php:function('lang', 'Active')"/></label></dt>
+                    <dd>
+                        <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>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
+                    <dd>
+                        <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"/>
+                                </option>
+                            </xsl:for-each>
+                        </select>
+                    </dd>
+                </dl>
+            </div>
+        </div>
+        <div class="pure-g">
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="form-col">
+                    <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')"/></label></dt>
+                    <dd>
+                        <input id="field_building_id" name="building_id" 
type="hidden" value="{booking/building_id}"/>
+                        <xsl:value-of select="booking/building_name"/>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_resources"><xsl:value-of 
select="php:function('lang', 'Resources')"/></label></dt>
+                    <dd>
+                        <div id="resources_container"><xsl:value-of 
select="php:function('lang', 'Select a building first')"/></div>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
+                <dl class="form-col">
+                    <dt><label for="field_org"><xsl:value-of 
select="php:function('lang', 'Organization')"/></label></dt>
+                    <dd>
+                        <xsl:value-of select="booking/organization_name"/>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_group"><xsl:value-of 
select="php:function('lang', 'Group')"/></label></dt>
+                    <dd>
+                        <select name="group_id">
+                                <option value=""><xsl:value-of 
select="php:function('lang', 'Select a group')"/></option>
+                            <xsl:for-each select="groups">
+                                <option value="{id}">
+                                    <xsl:if test="../booking/group_id = id">
+                                        <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                    </xsl:if>
+                                    <xsl:value-of select="name"/>
+                                </option>
+                            </xsl:for-each>
+                        </select>
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')"/></label></dt>
+                    <dd>
+                        <input class="datetime" id="field_from" type="text" 
name="from_">
+                            <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-->
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')"/></label></dt>
+                    <dd>
+                        <input class="datetime" id="field_to" type="text" 
name="to_">
+                            <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-->
+                    </dd>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring booking')" /></label></dt>
+                    <dd>
+                        <label>
+                            <input type="checkbox" name="outseason" 
id="outseason">
+                                <xsl:if test="outseason='on'">
+                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                </xsl:if>
+                            </input>
+                            <xsl:value-of select="php:function('lang', 'Out 
season')" />
+                        </label>
+                    </dd>
+                    <dd>
+                        <label>
+                            <input type="checkbox" name="recurring" 
id="recurring">
+                                <xsl:if test="recurring='on'">
+                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                </xsl:if>
+                            </input>
+                            <xsl:value-of select="php:function('lang', 'Repeat 
until')" />
+                        </label>
+                    </dd>
+                    <dd>
+                        <!--input id="field_repeat_until" name="repeat_until" 
type="text">
+                            <xsl:attribute name="value"><xsl:value-of 
select="repeat_until"/></xsl:attribute>
+                        </input-->
+                        <input class="datetime" id="field_repeat_until" 
name="repeat_until" type="text">
+                            <xsl:attribute name="value"><xsl:value-of 
select="repeat_until"/></xsl:attribute>
+                        </input>
+                    </dd>
+                </dl>
+            </div>
+            <div class="pure-u-1 pure-u-md-1 pure-u-lg-1-3">
+                <dl class="form-col">
+                    <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label></dt>
+                    <dd>
+                        <ul id="audience" 
style="list-style:none;padding-left:10px;">
+                            <xsl:for-each select="audience">
+                                <li>
+                                    <input type="radio" 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>
+                </dl>
+                <dl class="form-col">
+                    <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label></dt>
+                    <dd>
+                        <table id="agegroup" class="pure-table">
+                            <thead>
+                                <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                <th><xsl:value-of select="php:function('lang', 
'Female')" /></th></tr>
+                            </thead>
+                            <tbody id="agegroup_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="../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>
+                            </tbody>
+                        </table>
+                    </dd>
+                </dl>
+            </div>
+        </div>
         <div class="form-buttons">
             <input type="submit">
                        <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Save')"/></xsl:attribute>
@@ -170,6 +215,9 @@
     </form>
     </div>
     <script type="text/javascript">
-        YAHOO.booking.initialSelection = <xsl:value-of 
select="booking/resources_json"/>;
+        var group_id = '<xsl:value-of select="booking/group_id"/>';
+        var initialSelection = <xsl:value-of select="booking/resources_json"/>;
+        var initialAudience = <xsl:value-of select="booking/audience_json"/>;
+        var lang = <xsl:value-of select="php:function('js_lang','Name', 
'Resource Type')"/>;
     </script>
 </xsl:template>

Modified: 
branches/dev-syncromind/bookingfrontend/templates/base/booking_massupdate.xsl
===================================================================
--- 
branches/dev-syncromind/bookingfrontend/templates/base/booking_massupdate.xsl   
    2015-11-04 23:23:06 UTC (rev 14282)
+++ 
branches/dev-syncromind/bookingfrontend/templates/base/booking_massupdate.xsl   
    2015-11-05 00:26:22 UTC (rev 14283)
@@ -82,10 +82,10 @@
                                        <dl class="form-col">
                                                <dt><label 
for="field_from"><xsl:value-of select="php:function('lang', 'Target audience')" 
/></label></dt>
                                                <dd>
-                                                       <ul>
+                                                       <ul id="audience" 
style="list-style:none;padding-left:10px;">
                                                                <xsl:for-each 
select="audience">
                                                                        <li>
-                                                                               
<input type="checkbox" name="audience[]">
+                                                                               
<input type="radio" 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>
@@ -100,30 +100,33 @@
                                        <dl class="form-col">
                                                <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 id="agegroup" 
class="pure-table">
+                                <thead>
+                                    <tr><th/><th><xsl:value-of 
select="php:function('lang', 'Male')" /></th>
+                                    <th><xsl:value-of 
select="php:function('lang', 'Female')" /></th></tr>
+                                </thead>
+                                <tbody id="agegroup_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="../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>
+                                </tbody>
                                                        </table>
                                                </dd>
-
                                        </dl>
                                        <div class="form-buttons">
                                                <input type="submit" 
style="float: right;">
@@ -135,6 +138,9 @@
                </xsl:choose>
     </div>
     <script type="text/javascript">
+        var initialAudience = <xsl:value-of select="booking/audience_json"/>;
+    </script>
+    <!--script type="text/javascript">
                YAHOO.util.Dom.setStyle(('header'), 'display', 'none');
-    </script>
+    </script-->
 </xsl:template>




reply via email to

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