fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14462] fixing forms


From: Saul
Subject: [Fmsystem-commits] [14462] fixing forms
Date: Tue, 24 Nov 2015 00:41:28 +0000

Revision: 14462
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14462
Author:   psaul
Date:     2015-11-24 00:41:27 +0000 (Tue, 24 Nov 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
    branches/dev-syncromind/booking/inc/class.uibooking.inc.php
    branches/dev-syncromind/booking/inc/class.uireports.inc.php
    branches/dev-syncromind/booking/inc/class.uiseason.inc.php
    branches/dev-syncromind/booking/js/booking/allocation.js
    branches/dev-syncromind/booking/js/booking/application.js
    branches/dev-syncromind/booking/js/booking/booking.js
    branches/dev-syncromind/booking/js/booking/email_send.js
    branches/dev-syncromind/booking/js/booking/event.js
    branches/dev-syncromind/booking/js/booking/season.js
    branches/dev-syncromind/booking/templates/base/account_code_set_form.xsl
    branches/dev-syncromind/booking/templates/base/activity_edit.xsl
    branches/dev-syncromind/booking/templates/base/activity_new.xsl
    branches/dev-syncromind/booking/templates/base/agegroup_edit.xsl
    branches/dev-syncromind/booking/templates/base/agegroup_new.xsl
    branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
    branches/dev-syncromind/booking/templates/base/allocation_new.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/audience_edit.xsl
    branches/dev-syncromind/booking/templates/base/audience_new.xsl
    branches/dev-syncromind/booking/templates/base/booking_edit.xsl
    branches/dev-syncromind/booking/templates/base/booking_new.xsl
    branches/dev-syncromind/booking/templates/base/building_form.xsl
    
branches/dev-syncromind/booking/templates/base/completed_reservation_edit.xsl
    branches/dev-syncromind/booking/templates/base/document_form.xsl
    branches/dev-syncromind/booking/templates/base/documentation_form.xsl
    branches/dev-syncromind/booking/templates/base/email_index.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/group_edit.xsl
    branches/dev-syncromind/booking/templates/base/organization_edit.xsl
    branches/dev-syncromind/booking/templates/base/permission_form.xsl
    branches/dev-syncromind/booking/templates/base/permission_root_form.xsl
    branches/dev-syncromind/booking/templates/base/report_new.xsl
    branches/dev-syncromind/booking/templates/base/report_participants.xsl
    branches/dev-syncromind/booking/templates/base/resource_form.xsl
    branches/dev-syncromind/booking/templates/base/season_new.xsl

Modified: branches/dev-syncromind/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/inc/class.uiallocation.inc.php      
2015-11-24 00:41:27 UTC (rev 14462)
@@ -477,8 +477,8 @@
             
                        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['from_'] = ($_POST['from_']) ? 
date("Y-m-d H:i:s", phpgwapi_datetime::date_to_timestamp($_POST['from_'])) : 
$_POST['from_'];
+                               $_POST['to_'] = ($_POST['to_']) ? date("Y-m-d 
H:i:s", phpgwapi_datetime::date_to_timestamp($_POST['to_'])) : $_POST['to_'];
                                array_set_default($_POST, 'resources', array());
                                $allocation = array_merge($allocation, 
extract_values($_POST, $this->fields));
                                $organization = 
$this->organization_bo->read_single(intval(phpgw::get_var('organization_id', 
'int','POST')));

Modified: branches/dev-syncromind/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/inc/class.uibooking.inc.php 2015-11-24 
00:41:27 UTC (rev 14462)
@@ -672,8 +672,8 @@
                        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['from_'] = ($_POST['from_']) ? date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['from_'])) : $_POST['from_'];
+                $_POST['to_'] = ($_POST['to_']) ? date("Y-m-d H:i:s", 
phpgwapi_datetime::date_to_timestamp($_POST['to_'])) : $_POST['to_'];
                             
                                array_set_default($_POST, 'resources', array());
                                $booking = array_merge($booking, 
extract_values($_POST, $this->fields));

Modified: branches/dev-syncromind/booking/inc/class.uireports.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uireports.inc.php 2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/inc/class.uireports.inc.php 2015-11-24 
00:41:27 UTC (rev 14462)
@@ -627,8 +627,7 @@
 
                        $data                            = array();
                        $data['tabs']            = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
-                       $data['validator']       = 
phpgwapi_jquery::formvalidator_generate(array('location',
-                               'date', 'security', 'file'));
+                       $data['validator']       = 
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security', 
'file'));
 
                        self::render_template_xsl('report_participants', 
array('data'            => $data, 'from'                => $from,
                                'to'             => $to, 'buildings'     => 
$buildings['results']));

Modified: branches/dev-syncromind/booking/inc/class.uiseason.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiseason.inc.php  2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/inc/class.uiseason.inc.php  2015-11-24 
00:41:27 UTC (rev 14462)
@@ -185,8 +185,8 @@
                                $season['active'] = '1';
                                array_set_default($_POST, 'resources', array());
                                
-                               $season['from_'] = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($season['from_']));
-                               $season['to_'] = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($season['to_']));
+                               $season['from_'] = ($season['from_']) ? 
date("Y-m-d", phpgwapi_datetime::date_to_timestamp($season['from_'])) : 
$season['from_'];
+                               $season['to_'] = ($season['to_']) ? 
date("Y-m-d", phpgwapi_datetime::date_to_timestamp($season['to_'])) : 
$season['to_'];
 
                                $errors = $this->bo->validate($season);
                                
@@ -242,8 +242,8 @@
                        {
                                array_set_default($_POST, 'resources', array());
                                $season = array_merge($season, 
extract_values($_POST, $this->fields));
-                               $season['from_'] = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($season['from_']));
-                               $season['to_'] = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($season['to_']));
+                               $season['from_'] = ($season['from_']) ? 
date("Y-m-d", phpgwapi_datetime::date_to_timestamp($season['from_'])) : 
$season['from_'];
+                               $season['to_'] = ($season['to_']) ? 
date("Y-m-d", phpgwapi_datetime::date_to_timestamp($season['to_'])) : 
$season['to_'];
                                $errors = $this->bo->validate($season);
                                if(!$errors)
                                {

Modified: branches/dev-syncromind/booking/js/booking/allocation.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/allocation.js    2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/js/booking/allocation.js    2015-11-24 
00:41:27 UTC (rev 14462)
@@ -5,8 +5,6 @@
 
     
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.uiorganization.index&phpgw_return_as=json&',
 
                                          'field_org_name', 'field_org_id', 
'org_container');
-    
-    
 });
 
 
@@ -30,7 +28,7 @@
 function populateSelectSeason (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiseason.index&sort=name&filter_building_id=' +  
building_id + '&phpgw_return_as=json&';
     var container = $('#season_container');
-    var attr = [{name: 'name',value: 'season_id'},{name: 'data-validation', 
value: 'required'}];
+    var attr = [{name: 'name',value: 'season_id'},{name: 'data-validation', 
value: 'required'},{name: 'data-validation-error-msg', value: 'Please select a 
season'}];
     populateSelect(url, selection, container, attr);
 }
 function populateTableChkResources (building_id, selection) {

Modified: branches/dev-syncromind/booking/js/booking/application.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/application.js   2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/js/booking/application.js   2015-11-24 
00:41:27 UTC (rev 14462)
@@ -90,7 +90,7 @@
     });
     $('#resources_container').on('change', '.chkRegulations', function(){
         var resources = new Array();
-        $('#resources_container 
input.chkRegulations[name="resources[]"]:checked').each(function() {
+        $('#resources_container 
input[name="resources[]"]:checked').each(function() {
             resources.push($(this).val());
         });
         var selection = [];
@@ -122,7 +122,7 @@
         },
         errorMessage: 'You must accept to follow all terms and conditions of 
lease first.',
         errorMessageKey: 'regulations_documents'
-    })
+    });
 
     $.formUtils.addValidator({
         name: 'target_audience',
@@ -138,7 +138,23 @@
         },
         errorMessage: 'Please choose at least 1 target audience',
         errorMessageKey: 'target_audience'
-    })
+    });
+    
+    $.formUtils.addValidator({
+        name: 'application_resources',
+        validatorFunction: function(value, $el, config, language, $form) {
+            var n = 0;
+            $('#resources_container table 
input[name="resources[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 resource',
+        errorMessageKey: 'application_resources'
+    });
 
     $.formUtils.addValidator({
         name: 'number_participants',
@@ -197,7 +213,7 @@
             var v = (n == 0) ? true : false;
             return v;
         },
-        errorMessage: 'Invalida date',
+        errorMessage: 'Invalid date',
         errorMessageKey: 'application_dates'
     });
 } else {
@@ -217,7 +233,7 @@
        oArgs = {menuaction: 'bookingfrontend.uiresource.index_json', 
sort:'name', filter_building_id:building_id, sub_activity_id: 
$("#field_activity").val()};
        var url = phpGWLink('bookingfrontend/', oArgs, true);
     var container = 'resources_container';
-    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resources[]'},{name: 
'class', value: 'chkRegulations'},{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']}];
+    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resources[]'},{name: 
'class', value: 'chkRegulations'}]}], value: 'id', checked: selection},{key: 
'name', label: lang['Name']}, {key: 'type', label: lang['Resource Type']}];
     populateTableResources(url, container, colDefsResources);
 }
 

Modified: branches/dev-syncromind/booking/js/booking/booking.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/booking.js       2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/js/booking/booking.js       2015-11-24 
00:41:27 UTC (rev 14462)
@@ -62,8 +62,6 @@
             }
         });
     });
-    
-    
 });
 
 
@@ -96,54 +94,72 @@
     });
 });
 
-$.formUtils.addValidator({
-    name: 'target_audience',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#audience input[name="audience[]"]').each(function(){
-           if ($(this).is(':checked')) {
-               n++;
-           }
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Please choose at least 1 target audience',
-    errorMessageKey: ''
-})
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'target_audience',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#audience input[name="audience[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 target audience',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'number_participants',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#agegroup_tbody input').each(function() {
-            if ($(this).val() != "" && $(this).val() > 0) {
-                n++;
-            } 
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Number of participants is required',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'application_resources',
+        validatorFunction: function(value, $el, config, language, $form) {
+            var n = 0;
+            $('#resources_container table 
input[name="resources[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 resource',
+        errorMessageKey: 'application_resources'
+    });
 
+    $.formUtils.addValidator({
+        name: 'number_participants',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#agegroup_tbody input').each(function() {
+                if ($(this).val() != "" && $(this).val() > 0) {
+                    n++;
+                } 
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Number of participants is required',
+        errorMessageKey: ''
+    });
+}
+
 function populateSelectSeason (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiseason.index&sort=name&filter_building_id=' +  
building_id + '&phpgw_return_as=json&';
     var container = $('#season_container');
-    var attr = [{name: 'name',value: 'season_id'},{name: 'data-validation', 
value: 'required'}];
+    var attr = [{name: 'name',value: 'season_id'},{name: 'data-validation', 
value: 'required'},{name: 'data-validation-error-msg', value: lang['Please 
select a season']}];
     populateSelect(url, selection, container, attr);
 }
 function populateSelectGroup (organization_id, selection) {
     var url = 
'index.php?menuaction=booking.uigroup.index&filter_organization_id=' + 
organization_id + '&phpgw_return_as=json';
     var container = $('#group_container');
-    var attr = [{name: 'name',value: 'group_id'},{name: 'data-validation', 
value: 'required'}];
+    var attr = [{name: 'name',value: 'group_id'},{name: 'data-validation', 
value: 'required'},{name: 'data-validation-error-msg', value: lang['Please 
select a group']}];
     populateSelect(url, selection, container, attr);
 };
 function populateTableChkResources (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiresource.index&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: 'resources[]'},{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']}];
+    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resources[]'}]}], 
value: 'id', checked: selection},{key: 'name', label: lang['Name']}, {key: 
'type', label: lang['Resource Type']}];
     populateTableChk(url, container, colDefsResources);
 }
 

Modified: branches/dev-syncromind/booking/js/booking/email_send.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/email_send.js    2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/js/booking/email_send.js    2015-11-24 
00:41:27 UTC (rev 14462)
@@ -22,10 +22,28 @@
     });
 });
 
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'application_season',
+        validatorFunction: function(value, $el, config, language, $form) {
+            var n = 0;
+            $('#season_container table 
input[name="seasons[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 season',
+        errorMessageKey: 'application_season'
+    });
+}
+
 function populateTableChkSeasons (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiseason.index&sort=name&filter_building_id=' +  
building_id + '&phpgw_return_as=json&';
     var container = 'season_container';
-    var colDefsSeasons = [{label: '', object: [{type: 'input', attrs: [{name: 
'type', value: 'checkbox'},{name: 'name', value: 'seasons[]'},{name: 
'data-validation', value: 'checkbox_group'},{name: 'data-validation-qty', 
value: 'min1'},{name: 'data-validation-error-msg', value: 'Please choose at 
least 1 season'}]}], value: 'id', checked: selection}, {key: 'name', label: 
lang['Name']}];
+    var colDefsSeasons = [{label: '', object: [{type: 'input', attrs: [{name: 
'type', value: 'checkbox'},{name: 'name', value: 'seasons[]'}]}], value: 'id', 
checked: selection}, {key: 'name', label: lang['Name']}];
     populateTableChk(url, container, colDefsSeasons);
 }
 

Modified: branches/dev-syncromind/booking/js/booking/event.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/event.js 2015-11-24 00:41:01 UTC 
(rev 14461)
+++ branches/dev-syncromind/booking/js/booking/event.js 2015-11-24 00:41:27 UTC 
(rev 14462)
@@ -67,88 +67,106 @@
     });
 });
 
-$.formUtils.addValidator({
-    name: 'target_audience',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#audience input[name="audience[]"]').each(function(){
-           if ($(this).is(':checked')) {
-               n++;
-           }
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Please choose at least 1 target audience',
-    errorMessageKey: ''
-})
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'target_audience',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#audience input[name="audience[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 target audience',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'number_participants',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#agegroup_tbody input').each(function() {
-            if ($(this).val() != "" && $(this).val() > 0) {
-                n++;
-            } 
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Number of participants is required',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'number_participants',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#agegroup_tbody input').each(function() {
+                if ($(this).val() != "" && $(this).val() > 0) {
+                    n++;
+                } 
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Number of participants is required',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'customer_identifier',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var v = true;
-        var customer_ssn = $('#field_customer_ssn').val();
-        var customer_organization_number = 
$('#field_customer_organization_number').val();
-        var cost = $('#field_cost').val();
-        if ( (customer_ssn == "" && customer_organization_number == "") && 
(cost > 0) ) {
-           v = false;
-        }
-        return v;
-    },
-    errorMessage: 'There is set a cost, but no invoice data is filled inn',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'customer_identifier',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var v = true;
+            var customer_ssn = $('#field_customer_ssn').val();
+            var customer_organization_number = 
$('#field_customer_organization_number').val();
+            var cost = $('#field_cost').val();
+            if ( (customer_ssn == "" && customer_organization_number == "") && 
(cost > 0) ) {
+               v = false;
+            }
+            return v;
+        },
+        errorMessage: 'There is set a cost, but no invoice data is filled inn',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'application_dates',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        if ($('input[name="from_[]"]').length == 0 || 
$('input[name="from_[]"]').length == 0) {
-            return false;
-        }
-        $('input[name="from_[]"]').each(function(){
-            if ($(this).val() == "") {
-                $($(this).addClass("error").css("border-color","red"));
-                n++;
-            } else {
-                $($(this).removeClass("error").css("border-color",""));
+    $.formUtils.addValidator({
+        name: 'application_dates',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            if ($('input[name="from_[]"]').length == 0 || 
$('input[name="from_[]"]').length == 0) {
+                return false;
             }
-        });
-        $('input[name="to_[]"]').each(function(){
-            if ($(this).val() == "") {
-                $($(this).addClass("error").css("border-color","red"));
-                n++;
-            } else {
-                $($(this).removeClass("error").css("border-color",""));
-            }
-        });
-        var v = (n == 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Invalida date',
-    errorMessageKey: ''
-});
+            $('input[name="from_[]"]').each(function(){
+                if ($(this).val() == "") {
+                    $($(this).addClass("error").css("border-color","red"));
+                    n++;
+                } else {
+                    $($(this).removeClass("error").css("border-color",""));
+                }
+            });
+            $('input[name="to_[]"]').each(function(){
+                if ($(this).val() == "") {
+                    $($(this).addClass("error").css("border-color","red"));
+                    n++;
+                } else {
+                    $($(this).removeClass("error").css("border-color",""));
+                }
+            });
+            var v = (n == 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Invalid date',
+        errorMessageKey: ''
+    });
 
+    $.formUtils.addValidator({
+        name: 'application_resources',
+        validatorFunction: function(value, $el, config, language, $form) {
+            var n = 0;
+            $('#resources_container table 
input[name="resources[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 resource',
+        errorMessageKey: 'application_resources'
+    });
+}
+
 function populateTableChkResources (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiresource.index&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: 'resources[]'},{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']}];
+    var colDefsResources = [{label: '', object: [{type: 'input', attrs: 
[{name: 'type', value: 'checkbox'},{name: 'name', value: 'resources[]'}]}], 
value: 'id', checked: selection},{key: 'name', label: lang['Name']}, {key: 
'type', label: lang['Resource Type']}];
     populateTableChk(url, container, colDefsResources);
 }
 

Modified: branches/dev-syncromind/booking/js/booking/season.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/season.js        2015-11-24 
00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/js/booking/season.js        2015-11-24 
00:41:27 UTC (rev 14462)
@@ -24,6 +24,24 @@
     });
 });
 
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'application_resources',
+        validatorFunction: function(value, $el, config, language, $form) {
+            var n = 0;
+            $('#resources-container table 
input[name="resources[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 resource',
+        errorMessageKey: 'application_resources'
+    });
+}
+
 function populateTableChkResources (building_id, selection) {
     var url = 
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' + 
 building_id + '&phpgw_return_as=json&';
     var container = 'resources-container';

Modified: 
branches/dev-syncromind/booking/templates/base/account_code_set_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/account_code_set_form.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/account_code_set_form.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -29,6 +29,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a name')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                         </div>
@@ -42,6 +45,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter an object number')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>
@@ -52,6 +58,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter an article')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>
@@ -62,6 +71,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter an unit number')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>
@@ -84,6 +96,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter an unit prefix')" />
+                                        </xsl:attribute>
                                     </input>
                                 <!--/xsl:if-->
                             </div>
@@ -95,6 +110,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select an status')" />
+                                    </xsl:attribute>
                                     <xsl:if test="new_form">
                                         <xsl:attribute 
name="disabled">disabled</xsl:attribute>
                                     </xsl:if>
@@ -119,6 +137,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter a responsible code')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>
@@ -129,6 +150,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter a service')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>
@@ -145,6 +169,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter a project number')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                             </div>

Modified: branches/dev-syncromind/booking/templates/base/activity_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/activity_edit.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/activity_edit.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -12,6 +12,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">

Modified: branches/dev-syncromind/booking/templates/base/activity_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/activity_new.xsl     
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/activity_new.xsl     
2015-11-24 00:41:27 UTC (rev 14462)
@@ -12,6 +12,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">

Modified: branches/dev-syncromind/booking/templates/base/agegroup_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/agegroup_edit.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/agegroup_edit.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -13,6 +13,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
select an activity')" />
+                        </xsl:attribute>
                         <xsl:attribute name="disabled">disabled</xsl:attribute>
                         <xsl:for-each select="activities">
                             <option>
@@ -33,6 +36,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="resource/name"/></xsl:attribute>
                     </input>
                 </div>
@@ -59,6 +65,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a sort order')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">

Modified: branches/dev-syncromind/booking/templates/base/agegroup_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/agegroup_new.xsl     
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/agegroup_new.xsl     
2015-11-24 00:41:27 UTC (rev 14462)
@@ -16,9 +16,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
-                        <!--xsl:attribute name="data-validation-error-msg">
-                            <xsl:value-of select="$lang_select_activity" />
-                        </xsl:attribute-->
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
select an activity')" />
+                        </xsl:attribute>
                         <option value="">
                             <xsl:value-of select="$lang_select_activity" />
                         </option>
@@ -41,6 +41,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="agegroup/name"/></xsl:attribute>
                     </input>
                 </div>
@@ -50,6 +53,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a sort order')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">

Modified: branches/dev-syncromind/booking/templates/base/allocation_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/allocation_edit.xsl  
2015-11-24 00:41:27 UTC (rev 14462)
@@ -22,6 +22,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a building name')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="allocation/building_name"/></xsl:attribute>
                         </input>
                         <div id="building_container"></div>
@@ -60,6 +63,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter an organization name')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="allocation/organization_name"/></xsl:attribute>
                         </input>
                         <div id="org_container"></div>
@@ -70,6 +76,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a from date')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="allocation/from_"/></xsl:attribute>
                         </input>
                     </div>
@@ -79,6 +88,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter an end date')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="allocation/to_"/></xsl:attribute>
                         </input>
                     </div>
@@ -88,6 +100,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a cost')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="allocation/cost"/></xsl:attribute>
                         </input>
                     </div>

Modified: branches/dev-syncromind/booking/templates/base/allocation_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/allocation_new.xsl   
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/allocation_new.xsl   
2015-11-24 00:41:27 UTC (rev 14462)
@@ -18,6 +18,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a building name')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="allocation/building_name"/></xsl:attribute>
                     </input>
                 </div>
@@ -30,6 +33,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an organization name')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="allocation/organization_name"/></xsl:attribute>
                     </input>
                 </div>
@@ -86,6 +92,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a from date')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="allocation/from_"/></xsl:attribute>
                     </input>
                 </div>
@@ -95,6 +104,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an end date')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="allocation/to_"/></xsl:attribute>
                     </input>
                 </div>
@@ -147,6 +159,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a cost')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="allocation/cost"/></xsl:attribute>
                     </input>
                 </div>

Modified: branches/dev-syncromind/booking/templates/base/application_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/application_edit.xsl 
2015-11-24 00:41:27 UTC (rev 14462)
@@ -43,6 +43,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                    </xsl:attribute>
                                     <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
                                     <xsl:for-each select="activities">
                                         <option>
@@ -61,6 +64,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a description')" />
+                                    </xsl:attribute>
                                     <xsl:value-of 
select="application/description"/>
                                 </textarea>
                             </div>
@@ -84,12 +90,20 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building name')" />
+                                    </xsl:attribute>
                                     <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><xsl:value-of 
select="php:function('lang', 'Resources')" /></label>
+                                <input type="hidden" 
data-validation="application_resources">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 resource')" />
+                                    </xsl:attribute>                           
         
+                                </input>
                                 <div id="resources_container" 
style="display:inline-block;"><span class="select_first_text"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></span></div>
                             </div>
                         </div>
@@ -98,7 +112,11 @@
                                 <legend><h3>3. <xsl:value-of 
select="php:function('lang', 'When?')" /></h3></legend>
                             </div>
                             <div id="dates-container">
-                                <input type="hidden" 
data-validation="application_dates" />
+                                <input type="hidden" 
data-validation="application_dates">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Invalid date')" />
+                                    </xsl:attribute>
+                                </input>
                                 <input type="hidden" id="date_format" />
                                 <xsl:for-each select="application/dates">
                                     <xsl:variable name="index" 
select="position()-2"/>
@@ -154,7 +172,11 @@
                             <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"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label>
-                                    <input type="hidden" 
data-validation="target_audience"></input>
+                                    <input type="hidden" 
data-validation="target_audience">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 target audience')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <ul id="audience" 
style="list-style:none;padding-left:10px;">
                                         <xsl:for-each select="audience">
                                             <li>
@@ -173,7 +195,11 @@
                                 </div>
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label>
-                                    <input type="hidden" 
data-validation="number_participants"></input>
+                                    <input type="hidden" 
data-validation="number_participants">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Number of participants is required')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <table id="agegroup" class="pure-table 
pure-table-bordered">
                                         <thead>
                                             <tr>
@@ -218,6 +244,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a contact name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="application/contact_name"/></xsl:attribute>
                                 </input>
                             </div>
@@ -227,6 +256,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a contact email')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="application/contact_email"/></xsl:attribute>
                                 </input>
                             </div>
@@ -251,7 +283,11 @@
                                     <div class="heading">
                                         <legend><h3><xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></h3></legend>
                                     </div>
-                                    <input type="hidden" 
data-validation="regulations_documents"></input>
+                                    <input type="hidden" 
data-validation="regulations_documents">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'You must accept to follow all terms and 
conditions of lease first')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <div id='regulation_documents'></div>
                                 </div>
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1"></div>
@@ -278,6 +314,6 @@
         var initialAcceptAllTerms = true;
         var initialSelection = <xsl:value-of 
select="application/resources_json"/>;
         var initialAudience = <xsl:value-of 
select="application/audience_json"/>;
-        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier");
+        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier").attr("data-validation-error-msg",
 "<xsl:value-of select="php:function('lang', 'Customer identifier type is 
required')" />");
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/application_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/application_new.xsl  
2015-11-24 00:41:27 UTC (rev 14462)
@@ -133,6 +133,11 @@
                             </div>
                             <div class="pure-control-group">
                                 <label><xsl:value-of 
select="php:function('lang', 'Resources')" /></label>
+                                <input type="hidden" 
data-validation="application_resources">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 resource')" />
+                                    </xsl:attribute>                           
         
+                                </input>
                                 <div id="resources_container" 
style="display:inline-block;"><span class="select_first_text"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></span></div>
                             </div>
                         </fieldset>
@@ -144,7 +149,11 @@
                                 <p><xsl:value-of 
select="config/application_when"/></p>
                             </xsl:if>
                             <div id="dates-container">
-                                <input type="hidden" 
data-validation="application_dates" />
+                                <input type="hidden" 
data-validation="application_dates">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Invalid date')" />
+                                    </xsl:attribute>
+                                </input>
                                 <input type="hidden" id="date_format" />
                                 <xsl:for-each select="application/dates">
                                     <xsl:variable name="index" 
select="position()-2"/>
@@ -222,7 +231,11 @@
                                 <p><xsl:value-of 
select="config/application_who"/></p>
                             </xsl:if>
                             <label><xsl:value-of select="php:function('lang', 
'Target audience')" /></label>
-                            <input type="hidden" 
data-validation="target_audience"></input>
+                            <input type="hidden" 
data-validation="target_audience">
+                                <xsl:attribute 
name="data-validation-error-msg">
+                                    <xsl:value-of select="php:function('lang', 
'Please choose at least 1 target audience')" />
+                                </xsl:attribute>
+                            </input>
                             <ul id= "audience"  
style="list-style:none;padding-left:10px;">
                                 <xsl:for-each select="audience">
                                     <li>
@@ -318,7 +331,11 @@
                             <div class="heading"><legend><h3>8. <xsl:value-of 
select="php:function('lang', 'Terms and conditions')" /></h3></legend></div>
                             <p>Alle som leier lokaler hos Bergen kommune må 
bekrefte at de har lest betingelsene, dette gjelder som regel brannforskrifter 
og husreglement.</p>
                             <div class="pure-control-group">
-                                <input type="hidden" 
data-validation="regulations_documents"></input>
+                                <input type="hidden" 
data-validation="regulations_documents">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'You must accept to follow all terms and 
conditions of lease first')" />
+                                    </xsl:attribute>
+                                </input>
                                 <xsl:if test="config/application_terms">
                                     <p><xsl:value-of 
select="config/application_terms"/></p>
                                 </xsl:if>
@@ -362,7 +379,6 @@
         var initialSelection = <xsl:value-of 
select="application/resources_json"/>;
         var initialAudience = <xsl:value-of 
select="application/audience_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.')"/>
-        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier");
-        
$('#field_customer_identifier_type').attr("data-validation-error-msg","<xsl:value-of
 select="php:function('lang', 'Customer identifier type is required')"/>");
+        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier").attr("data-validation-error-msg",
 "<xsl:value-of select="php:function('lang', 'Customer identifier type is 
required')" />");
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/audience_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/audience_edit.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/audience_edit.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -15,6 +15,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please select an activity')" />
+                            </xsl:attribute>
                             <xsl:for-each select="activities">
                                 <option>
                                     <xsl:if test="selected = 1">
@@ -34,6 +37,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a name')" />
+                            </xsl:attribute>
                             <xsl:attribute name="value"><xsl:value-of 
select="audience/name"/></xsl:attribute>
                         </input>
                     </div>
@@ -60,6 +66,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a sort order')" />
+                            </xsl:attribute>
                         </input>
                     </div>
                     <div class="pure-control-group">
@@ -68,6 +77,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a description')" />
+                            </xsl:attribute>
                            <xsl:value-of select="audience/description"/>
                         </textarea>
                     </div>

Modified: branches/dev-syncromind/booking/templates/base/audience_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/audience_new.xsl     
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/audience_new.xsl     
2015-11-24 00:41:27 UTC (rev 14462)
@@ -16,9 +16,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
-                        <!--xsl:attribute name="data-validation-error-msg">
-                            <xsl:value-of select="$lang_select_activity" />
-                        </xsl:attribute-->
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
select an activity')" />
+                        </xsl:attribute>
                         <option value="">
                             <xsl:value-of select="$lang_select_activity" />
                         </option>
@@ -41,6 +41,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                         <xsl:attribute name="value"><xsl:value-of 
select="audience/name"/></xsl:attribute>
                     </input>
                 </div>
@@ -50,6 +53,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a sort order')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">

Modified: branches/dev-syncromind/booking/templates/base/booking_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/booking_edit.xsl     
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/booking_edit.xsl     
2015-11-24 00:41:27 UTC (rev 14462)
@@ -42,6 +42,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                    </xsl:attribute>
                                     <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
                                     <xsl:for-each select="activities">
                                         <option>
@@ -68,6 +71,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building')" />
+                                    </xsl:attribute>
                                 </input>
                                 <div id="building_container"></div>
                             </div>
@@ -77,6 +83,11 @@
                             </div>
                             <div class="pure-control-group">
                                 <label><xsl:value-of 
select="php:function('lang', 'Resources')"/></label>
+                                <input type="hidden" 
data-validation="application_resources">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 resource')" />
+                                    </xsl:attribute>
+                                </input>
                                 <div id="resources_container"><span 
class="select_first_text"><xsl:value-of select="php:function('lang', 'Select a 
building first')" /></span></div>
                             </div>
                         </div>
@@ -91,6 +102,12 @@
                                 </input>
                                 <input id="field_org_name" 
name="organization_name" type="text">
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_name"/></xsl:attribute>
+                                    <xsl:attribute name="data-validation">
+                                        <xsl:text>required</xsl:text>
+                                    </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a organization')" />
+                                    </xsl:attribute>
                                 </input>
                                 <div id="org_container"></div>
                             </div>
@@ -104,6 +121,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a from date')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
                                 </input>
                             </div>
@@ -113,6 +133,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter an end date')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/to_"/></xsl:attribute>
                                 </input>
                             </div>
@@ -122,6 +145,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a cost')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                         </div>
@@ -132,7 +158,11 @@
                             <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"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label>
-                                    <input type="hidden" 
data-validation="target_audience"></input>
+                                    <input type="hidden" 
data-validation="target_audience">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 target audience')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <ul 
style="list-style:none;padding-left:10px;" id="audience">
                                         <xsl:for-each select="audience">
                                             <li>
@@ -152,7 +182,11 @@
                                 <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"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label>
-                                        <input type="hidden" 
data-validation="number_participants"></input>
+                                        <input type="hidden" 
data-validation="number_participants">
+                                            <xsl:attribute 
name="data-validation-error-msg">
+                                                <xsl:value-of 
select="php:function('lang', 'Number of participants is required')" />
+                                            </xsl:attribute>
+                                        </input>
                                         <table id="agegroup" class="pure-table 
pure-table-bordered">
                                             <thead>
                                                 <tr>
@@ -256,6 +290,6 @@
         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')"/>;
+        var lang = <xsl:value-of select="php:function('js_lang','Name', 
'Resource Type', 'Please select a season', 'Please select a group')"/>;
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/booking_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/booking_new.xsl      
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/booking_new.xsl      
2015-11-24 00:41:27 UTC (rev 14462)
@@ -19,6 +19,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                    </xsl:attribute>
                                     <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
                                     <xsl:for-each select="activities">
                                         <option>
@@ -45,6 +48,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/building_name"/></xsl:attribute>
                                 </input>
                             </div>
@@ -65,12 +71,18 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a organization')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_id"/></xsl:attribute>
                                 </input>
                                 <input id="field_org_name" 
name="organization_name" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a organization')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/organization_name"/></xsl:attribute>
                                 </input>
                                 <div id="org_container"></div>
@@ -85,6 +97,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a from date')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/from_"/></xsl:attribute>
                                 </input>
                             </div>
@@ -94,6 +109,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a end date')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="booking/to_"/></xsl:attribute>
                                 </input>
                             </div>
@@ -103,6 +121,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a cost')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                             <div class="pure-control-group">
@@ -170,7 +191,11 @@
                             <div class="pure-g">
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label>
-                                    <input type="hidden" 
data-validation="target_audience"></input>
+                                    <input type="hidden" 
data-validation="target_audience">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 target audience')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <ul 
style="list-style:none;padding-left:10px;" id="audience">
                                         <xsl:for-each select="audience">
                                             <li>
@@ -189,7 +214,11 @@
                                 </div>
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label>
-                                    <input type="hidden" 
data-validation="number_participants"></input>
+                                    <input type="hidden" 
data-validation="number_participants">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Number of participants is required')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <table id="agegroup" class="pure-table 
pure-table-bordered">
                                         <thead>
                                             <tr>
@@ -253,6 +282,6 @@
         group_id = '<xsl:value-of select="booking/group_id"/>';
         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')"/>;
+        var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Resource Type', 'Please select a season', 'Please select a group')"/>;
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/building_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/building_form.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/building_form.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -14,7 +14,7 @@
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
                                                <xsl:attribute 
name="data-validation-error-msg">
-                                                       <xsl:value-of 
select="php:function('lang', 'Please - enter a Building Name!')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'Please enter a name')"/>
                                                </xsl:attribute>        
                     </input>
                 </div>
@@ -31,7 +31,10 @@
                                        <input id="field_email" name="email" 
type="text" value="{building/email}" data-validation="email">
                                                <xsl:attribute 
name="data-validation-optional">
                                                        
<xsl:text>true</xsl:text>
-                                               </xsl:attribute>                
                                                                
+                                               </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a valid email')" />
+                        </xsl:attribute>
                                        </input>
                 </div>
                 <div class="pure-control-group">

Modified: 
branches/dev-syncromind/booking/templates/base/completed_reservation_edit.xsl
===================================================================
--- 
branches/dev-syncromind/booking/templates/base/completed_reservation_edit.xsl   
    2015-11-24 00:41:01 UTC (rev 14461)
+++ 
branches/dev-syncromind/booking/templates/base/completed_reservation_edit.xsl   
    2015-11-24 00:41:27 UTC (rev 14462)
@@ -17,6 +17,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a cost')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                             <div class="pure-control-group">
@@ -25,6 +28,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select a customer type')" />
+                                    </xsl:attribute>
                                     <option value=''><xsl:value-of 
select="php:function('lang', 'Select...')" /></option>
                                     <xsl:for-each 
select="reservation/customer_types/*">
                                         <option>
@@ -54,6 +60,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a description')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                         </div>

Modified: branches/dev-syncromind/booking/templates/base/document_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/document_form.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/document_form.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -44,6 +44,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a name')" />
+                            </xsl:attribute>
                         </input>
                     </div>
                     <div class="pure-control-group">
@@ -56,7 +59,13 @@
                         <label for="field_category">
                             <xsl:value-of select="php:function('lang', 
'Category')" />
                         </label>
-                        <select name='category' id='field_category' 
data-validation="required">
+                        <select name='category' id='field_category'>
+                            <xsl:attribute name="data-validation">
+                                <xsl:text>required</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please select a category')" />
+                            </xsl:attribute>
                             <option value=''><xsl:value-of 
select="php:function('lang', 'Select Category...')" /></option>
                             <xsl:for-each select="document/document_types/*">
                                 <option>
@@ -73,8 +82,14 @@
                         <label for="field_owner_name">
                             <xsl:value-of select="php:function('lang', 
string(document/owner_type_label))" />
                         </label>
-                        <input id="field_owner_name" name="owner_name" 
type="text" data-validation="required" >
+                        <input id="field_owner_name" name="owner_name" 
type="text">
                             <xsl:attribute name="value"><xsl:value-of 
select="document/owner_name"/></xsl:attribute>
+                            <xsl:attribute name="data-validation">
+                                <xsl:text>required</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter an owner name')" />
+                            </xsl:attribute>
                             <xsl:if test="document/inline = '1'">
                                 <xsl:attribute 
name="disabled">disabled</xsl:attribute>
                             </xsl:if>

Modified: branches/dev-syncromind/booking/templates/base/documentation_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/documentation_form.xsl       
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/documentation_form.xsl       
2015-11-24 00:41:27 UTC (rev 14462)
@@ -34,6 +34,9 @@
                                 <xsl:attribute name="data-validation">
                                     <xsl:text>required</xsl:text>
                                 </xsl:attribute>
+                                <xsl:attribute 
name="data-validation-error-msg">
+                                    <xsl:value-of select="php:function('lang', 
'Missing file for document')" />
+                                </xsl:attribute>
                                 <xsl:attribute name="value"><xsl:value-of 
select="document/name"/></xsl:attribute>
                                 <xsl:attribute name="type">
                                     <xsl:choose>
@@ -57,6 +60,9 @@
                                 <xsl:attribute name="data-validation">
                                     <xsl:text>required</xsl:text>
                                 </xsl:attribute>
+                                <xsl:attribute 
name="data-validation-error-msg">
+                                    <xsl:value-of select="php:function('lang', 
'Please select a category')" />
+                                </xsl:attribute>
                                 <option value=''><xsl:value-of 
select="php:function('lang', 'Select Category...')" /></option>
                                 <xsl:for-each 
select="document/document_types/*">
                                     <option>

Modified: branches/dev-syncromind/booking/templates/base/email_index.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/email_index.xsl      
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/email_index.xsl      
2015-11-24 00:41:27 UTC (rev 14462)
@@ -16,10 +16,18 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a building name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
                     <label style="vertical-align:top;"><xsl:value-of 
select="php:function('lang', 'Season')" /></label>
+                    <input type="hidden" data-validation="application_season">
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
choose at least 1 season')" />
+                        </xsl:attribute>
+                    </input>
                     <div id="season_container" 
style="display:inline-block;"><span class="select_first_text"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></span></div>
                 </div>
                 <div class="pure-control-group">
@@ -29,6 +37,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a mail subject')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -37,6 +48,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a mail body')" />
+                        </xsl:attribute>
                         <xsl:value-of select="mailbody"/>
                     </textarea>
                 </div>

Modified: branches/dev-syncromind/booking/templates/base/event_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/event_edit.xsl       
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/event_edit.xsl       
2015-11-24 00:41:27 UTC (rev 14462)
@@ -63,6 +63,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                    </xsl:attribute>
                                     <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
                                     <xsl:for-each select="activities">
                                         <option>
@@ -81,6 +84,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a description')" />
+                                    </xsl:attribute>
                                     <xsl:value-of select="event/description"/>
                                 </textarea>
                             </div>
@@ -114,12 +120,18 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/building_id"/></xsl:attribute>
                                 </input>
                                 <input id="field_building_name" 
name="building_name" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/building_name"/></xsl:attribute>
                                 </input>
                             </div>
@@ -143,6 +155,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a start date')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                             <div class="pure-control-group">
@@ -156,6 +171,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter an end date')" />
+                                    </xsl:attribute>
                                 </input>
                             </div>
                         </div>
@@ -166,7 +184,11 @@
                             <div class="pure-g">
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label>
-                                    <input type="hidden" 
data-validation="target_audience"></input>
+                                    <input type="hidden" data-validation="">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 target audience')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <ul id="audience" 
style="list-style:none;padding: 0 0 0 10px;">
                                         <xsl:for-each select="audience">
                                             <li>
@@ -185,7 +207,11 @@
                                 </div>
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label for="field_from"><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label>
-                                    <input type="hidden" 
data-validation="number_participants"></input>
+                                    <input type="hidden" 
data-validation="number_participants">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Number of participants is required')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <table id="agegroup" class="pure-table 
pure-table-bordered">
                                         <thead>
                                             <tr>
@@ -234,6 +260,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a contact name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/contact_name"/></xsl:attribute>
                                 </input>
                             </div>
@@ -255,6 +284,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a cost')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/cost"/></xsl:attribute>
                                 </input>
                             </div>
@@ -363,6 +395,6 @@
         var initialSelection = <xsl:value-of select="event/resources_json"/>;
         var initialAudience = <xsl:value-of select="event/audience_json"/>;
         var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Resource Type')"/>;
-        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier");
+        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier").attr("data-validation-error-msg","<xsl:value-of
 select="php:function('lang', 'There is set a cost, but no invoice data is 
filled inn')" />");
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/event_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/event_new.xsl        
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/event_new.xsl        
2015-11-24 00:41:27 UTC (rev 14462)
@@ -24,6 +24,9 @@
                                             <xsl:attribute 
name="data-validation">
                                                 <xsl:text>required</xsl:text>
                                             </xsl:attribute>
+                                            <xsl:attribute 
name="data-validation-error-msg">
+                                                <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                            </xsl:attribute>
                                             <xsl:if test="../event/activity_id 
= id">
                                                 <xsl:attribute 
name="selected">selected</xsl:attribute>
                                             </xsl:if>
@@ -39,6 +42,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a description')" />
+                                    </xsl:attribute>
                                     <xsl:value-of select="event/description"/>
                                 </textarea>
                             </div>
@@ -72,17 +78,28 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/building_id"/></xsl:attribute>
                                 </input>
                                 <input id="field_building_name" 
name="building_name" type="text" class="pure-u-1 pure-u-sm-1-2 pure-u-md-1">
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a building name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/building_name"/></xsl:attribute>
                                 </input>
                             </div>
                             <div class="pure-control-group">
                                 <label><xsl:value-of 
select="php:function('lang', 'Resources')" /></label>
+                                <input type="hidden" 
data-validation="application_resources">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 resource')" />
+                                    </xsl:attribute>
+                                </input>
                                 <div id="resources_container"><span 
class="select_first_text"><xsl:value-of select="php:function('lang', 'Select a 
building first')" /></span></div>
                             </div>
                         </div>
@@ -92,7 +109,11 @@
                                 <legend><h3><xsl:value-of 
select="php:function('lang', 'When?')" /></h3></legend>
                             </div>
                             <div id="dates-container"  
class="pure-control-group">
-                                <input type="hidden" 
data-validation="application_dates" />
+                                <input type="hidden" 
data-validation="application_dates">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Invalid date')" />
+                                    </xsl:attribute>
+                                </input>
                                 <xsl:for-each select="event/dates">
                                     <xsl:variable name="index" 
select="position()-2"/>
                                     <xsl:choose>
@@ -153,7 +174,11 @@
                             <div class="pure-g">
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label>
-                                    <input type="hidden" 
data-validation="target_audience"></input>
+                                    <input type="hidden" 
data-validation="target_audience">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 target audience')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <ul id="audience" style="list-style:none;">
                                         <xsl:for-each select="audience">
                                             <li>
@@ -172,7 +197,11 @@
                                 </div>
                                 <div class="pure-control-group pure-u-1 
pure-u-md-1-2 pure-u-lg-1">
                                     <label><xsl:value-of 
select="php:function('lang', 'Number of participants')" /></label>
-                                    <input type="hidden" 
data-validation="number_participants"></input>
+                                    <input type="hidden" 
data-validation="number_participants">
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Number of participants is required')" />
+                                        </xsl:attribute>
+                                    </input>
                                     <table id="agegroup" class="pure-table 
pure-table-bordered">
                                         <thead>
                                             <tr>
@@ -217,6 +246,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a cost')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/cost"/></xsl:attribute>
                                 </input>
                             </div>
@@ -275,6 +307,9 @@
                                     <xsl:attribute name="data-validation">
                                         <xsl:text>required</xsl:text>
                                     </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a contact name')" />
+                                    </xsl:attribute>
                                     <xsl:attribute name="value"><xsl:value-of 
select="event/contact_name"/></xsl:attribute>
                                 </input>
                             </div>
@@ -321,6 +356,6 @@
         
$('#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');
         var initialSelection = <xsl:value-of select="event/resources_json"/>;
         var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'From', 'To', 'Resource Type')"/>;
-        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier");
+        
$('#field_customer_identifier_type').attr("data-validation","customer_identifier").attr("data-validation-error-msg","<xsl:value-of
 select="php:function('lang', 'There is set a cost, but no invoice data is 
filled inn')" />");
     </script>
 </xsl:template>

Modified: branches/dev-syncromind/booking/templates/base/group_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/group_edit.xsl       
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/group_edit.xsl       
2015-11-24 00:41:27 UTC (rev 14462)
@@ -18,11 +18,14 @@
                     </div>
                     <div class="pure-control-group">
                         <label for="name"><xsl:value-of 
select="php:function('lang', 'Group')" /></label>
-                                               <input id="name" name="name" 
type="text" value="{group/name}" >
-                                                       <xsl:attribute 
name="data-validation">
-                                                               
<xsl:text>required</xsl:text>
-                                                       </xsl:attribute>        
                        
-                                               </input>
+                        <input id="name" name="name" type="text" 
value="{group/name}" >
+                            <xsl:attribute name="data-validation">
+                                <xsl:text>required</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a name')" />
+                            </xsl:attribute>
+                        </input>
                     </div>
                     <div class="pure-control-group">
                         <label for="shortname"><xsl:value-of 
select="php:function('lang', 'Group shortname')" /></label>
@@ -35,9 +38,12 @@
                             <xsl:if test="group/organization_id">
                                 <xsl:attribute 
name='disabled'>disabled</xsl:attribute>
                             </xsl:if>
-                                                       <xsl:attribute 
name="data-validation">
-                                                               
<xsl:text>required</xsl:text>
-                                                       </xsl:attribute>        
+                            <xsl:attribute name="data-validation">
+                                <xsl:text>required</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter an organization name')" />
+                            </xsl:attribute>
                         </input>
                         <div id="organization_container"></div>
                     </div>
@@ -109,11 +115,14 @@
                     </div>
                     <div class="pure-control-group">
                         <label for="field_admin_email_1"><xsl:value-of 
select="php:function('lang', 'Email')" /></label>
-                                               <input type='text' 
id='field_admin_email_1' name="contacts[0][email]" 
value='{group/contacts[1]/email}' data-validation="email">
-                                                       <xsl:attribute 
name="data-validation-optional">
-                                                               
<xsl:text>true</xsl:text>
-                                                       </xsl:attribute>        
                                                
-                                               </input>
+                        <input type='text' id='field_admin_email_1' 
name="contacts[0][email]" value='{group/contacts[1]/email}' 
data-validation="email">
+                            <xsl:attribute name="data-validation-optional">
+                                <xsl:text>true</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a valid contact email')" />
+                            </xsl:attribute>
+                        </input>
                     </div>
                     <div class="pure-control-group">
                         <label for="field_admin_phone_1"><xsl:value-of 
select="php:function('lang', 'Phone')" /></label>
@@ -128,11 +137,14 @@
                     </div>
                     <div class="pure-control-group">
                         <label for="field_admin_email_2"><xsl:value-of 
select="php:function('lang', 'Email')" /></label>
-                                               <input type='text' 
id='field_admin_email_2' name="contacts[1][email]" 
value='{group/contacts[2]/email}' data-validation="email">
-                                                       <xsl:attribute 
name="data-validation-optional">
-                                                               
<xsl:text>true</xsl:text>
-                                                       </xsl:attribute>        
                                                        
-                                               </input>
+                        <input type='text' id='field_admin_email_2' 
name="contacts[1][email]" value='{group/contacts[2]/email}' 
data-validation="email">
+                            <xsl:attribute name="data-validation-optional">
+                                <xsl:text>true</xsl:text>
+                            </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a valid contact email')" />
+                            </xsl:attribute>
+                        </input>
                     </div>
                     <div class="pure-control-group">
                         <label for="field_admin_phone_2"><xsl:value-of 
select="php:function('lang', 'Phone')" /></label>
@@ -154,7 +166,7 @@
         <![CDATA[
             $(document).ready(function() {
                 JqueryPortico.autocompleteHelper('index.php?menuaction=' + 
endpoint + '.uiorganization.index&phpgw_return_as=json&',
-                                                              
'field_organization_name', 'field_organization_id', 'organization_container');
+                                                 'field_organization_name', 
'field_organization_id', 'organization_container');
             });
         ]]>
     </script>

Modified: branches/dev-syncromind/booking/templates/base/organization_edit.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/organization_edit.xsl        
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/organization_edit.xsl        
2015-11-24 00:41:27 UTC (rev 14462)
@@ -40,9 +40,12 @@
                                  <xsl:if test="currentapp = 'booking'">
                                     <input id="inputs" name="name" type="text" 
class="pure-u-1">
                                         <xsl:attribute 
name="value"><xsl:value-of select="organization/name"/></xsl:attribute>
-                                                                               
<xsl:attribute name="data-validation">
-                                                                               
        <xsl:text>required</xsl:text>
-                                                                               
</xsl:attribute>                                                                
                
+                                        <xsl:attribute name="data-validation">
+                                            <xsl:text>required</xsl:text>
+                                        </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please enter a name')" />
+                                        </xsl:attribute>
                                     </input>
                                 </xsl:if>
                                 <xsl:if test="currentapp != 'booking'">
@@ -97,7 +100,7 @@
                             <div class="pure-control-group">
                                 <label for="field_email"><xsl:value-of 
select="php:function('lang', 'Email')" /></label>
                                 <input id="field_email" name="email" 
type="text" class="pure-u-1">
-                                    <xsl:attribute name="value"><xsl:value-of 
select="organization/email"/></xsl:attribute>                                   
                                 
+                                    <xsl:attribute name="value"><xsl:value-of 
select="organization/email"/></xsl:attribute>
                                 </input>
                             </div>
                         </div>
@@ -184,6 +187,9 @@
                                         <xsl:attribute name="data-validation">
                                             <xsl:text>required</xsl:text>
                                         </xsl:attribute>
+                                        <xsl:attribute 
name="data-validation-error-msg">
+                                            <xsl:value-of 
select="php:function('lang', 'Please select an activity')" />
+                                        </xsl:attribute>
                                         <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
                                         <xsl:for-each select="activities">
                                             <option>
@@ -222,11 +228,14 @@
                                 <label for="field_admin_email_1">
                                     <h4><xsl:value-of 
select="php:function('lang', 'Email')" /></h4>
                                 </label>
-                                                               <input 
type='text' id='field_admin_email_1' name="contacts[0][email]" 
value='{organization/contacts[1]/email}' class="pure-u-1" 
data-validation="email">
-                                                                       
<xsl:attribute name="data-validation-optional">
-                                                                               
<xsl:text>true</xsl:text>
-                                                                       
</xsl:attribute>                                                                
                
-                                                               </input>
+                                <input type='text' id='field_admin_email_1' 
name="contacts[0][email]" value='{organization/contacts[1]/email}' 
class="pure-u-1" data-validation="email">
+                                    <xsl:attribute 
name="data-validation-optional">
+                                        <xsl:text>true</xsl:text>
+                                    </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a valid contact email')" />
+                                    </xsl:attribute>
+                                </input>
                             </div>
                             <div class="pure-control-group">
                                 <label for="field_admin_phone_1">
@@ -250,11 +259,14 @@
                                 <label for="field_admin_email_2">
                                     <h4><xsl:value-of 
select="php:function('lang', 'Email')" /></h4>
                                 </label>
-                                                               <input 
type='text' id='field_admin_email_2' name="contacts[1][email]" 
value='{organization/contacts[2]/email}' class="pure-u-1" 
data-validation="email">
-                                                                       
<xsl:attribute name="data-validation-optional">
-                                                                               
<xsl:text>true</xsl:text>
-                                                                       
</xsl:attribute>                                                                
        
-                                                               </input>
+                                <input type='text' id='field_admin_email_2' 
name="contacts[1][email]" value='{organization/contacts[2]/email}' 
class="pure-u-1" data-validation="email">
+                                    <xsl:attribute 
name="data-validation-optional">
+                                        <xsl:text>true</xsl:text>
+                                    </xsl:attribute>
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please enter a valid contact email')" />
+                                    </xsl:attribute>
+                                </input>
                             </div>
                             <div class="pure-control-group">
                                 <label for="field_admin_phone_2">

Modified: branches/dev-syncromind/booking/templates/base/permission_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/permission_form.xsl  
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/permission_form.xsl  
2015-11-24 00:41:27 UTC (rev 14462)
@@ -28,6 +28,9 @@
                             <span><xsl:value-of select="node()"/></span>
                             <div>
                                 <select name='role' id='field_role' 
style="display:block;" data-validation="required">
+                                    <xsl:attribute 
name="data-validation-error-msg">
+                                        <xsl:value-of 
select="php:function('lang', 'Please select a role')" />
+                                    </xsl:attribute>
                                     <option value=''><xsl:value-of 
select="php:function('lang', 'Select role...')" /></option>
                                     <xsl:for-each select="available_roles/*">
                                         <option>
@@ -51,7 +54,10 @@
                         <xsl:attribute name="value"><xsl:value-of 
select="subject_name"/></xsl:attribute>
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
-                        </xsl:attribute>       
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an account')" />
+                        </xsl:attribute>
                         </input>
                         <input id="field_subject_id" name="subject_id" 
type="hidden">
                             <xsl:attribute name="value"><xsl:value-of 
select="subject_id"/></xsl:attribute>
@@ -67,6 +73,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please enter a building name')" />
+                            </xsl:attribute>
                             <xsl:if test="inline = '1'">
                                 <xsl:attribute 
name="disabled">disabled</xsl:attribute>
                             </xsl:if>

Modified: 
branches/dev-syncromind/booking/templates/base/permission_root_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/permission_root_form.xsl     
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/permission_root_form.xsl     
2015-11-24 00:41:27 UTC (rev 14462)
@@ -25,6 +25,9 @@
                             <xsl:attribute name="data-validation">
                                 <xsl:text>required</xsl:text>
                             </xsl:attribute>
+                            <xsl:attribute name="data-validation-error-msg">
+                                <xsl:value-of select="php:function('lang', 
'Please select a role')" />
+                            </xsl:attribute>
                             <option value=''><xsl:value-of 
select="php:function('lang', 'Select role...')" /></option>
                             <xsl:for-each select="available_roles/*">
                                 <option>
@@ -48,6 +51,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an account')" />
+                        </xsl:attribute>
                     </input>
                     <input id="field_subject_id" name="subject_id" 
type="hidden">
                         <xsl:attribute name="value"><xsl:value-of 
select="subject_id"/></xsl:attribute>

Modified: branches/dev-syncromind/booking/templates/base/report_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/report_new.xsl       
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/report_new.xsl       
2015-11-24 00:41:27 UTC (rev 14462)
@@ -61,7 +61,7 @@
                                         <xsl:text>positive</xsl:text>
                                     </xsl:attribute>
                                                                        
<xsl:attribute name="data-validation-error-msg">
-                                                                               
<xsl:value-of select="php:function('lang', '-- select an activity --')" />
+                                                                               
<xsl:value-of select="php:function('lang', 'Please select an activity')" />
                                     </xsl:attribute>
                                                                        <option 
value="-1">
                                                                                
<xsl:value-of select="php:function('lang', '-- select an activity --')" />
@@ -154,28 +154,34 @@
                                                                        <div 
class="date-container">
                                                                                
<div class="pure-control-group">
                                                                                
        <label for="start_date">
-                                                                               
                <xsl:value-of select="php:function('lang', 'From')" />
+                                                                               
                <h4><xsl:value-of select="php:function('lang', 'From')" /></h4>
                                                                                
        </label>
                                                                                
        <input class="datetime pure-input-1-2" id="start_date" 
name="start_date" type="text" value="{report/start_date}">
                                                                                
                <xsl:attribute name="data-validation">
                                                                                
                        <xsl:text>required</xsl:text>
                                                                                
                </xsl:attribute>
+                                                <xsl:attribute 
name="data-validation-error-msg">
+                                                    <xsl:value-of 
select="php:function('lang', 'Please enter a from date')" />
+                                                </xsl:attribute>
                                                                                
        </input>
                                                                                
</div>
                                                                                
<div class="pure-control-group">
                                                                                
        <label for="end_date">
-                                                                               
                <xsl:value-of select="php:function('lang', 'To')" />
+                                                                               
                <h4><xsl:value-of select="php:function('lang', 'To')" /></h4>
                                                                                
        </label>
                                                                                
        <input class="datetime pure-input-1-2" id="end_date" name="end_date" 
type="text" value="{report/end_date}">
                                                                                
                <xsl:attribute name="data-validation">
                                                                                
                        <xsl:text>required</xsl:text>
                                                                                
                </xsl:attribute>
+                                                <xsl:attribute 
name="data-validation-error-msg">
+                                                    <xsl:value-of 
select="php:function('lang', 'Please enter an end date')" />
+                                                </xsl:attribute>
                                                                                
        </input>
                                                                                
</div>
                                                                        </div>
                                                                        
                                                                        <div 
class="pure-g" >
-                                                                               
<div class="pure-u-lg-5-5 pure-u-md-1-1 pure-u-sm-1-1" ><xsl:value-of 
select="php:function('lang', 'start time')" /></div>
+                                                                               
<div class="pure-u-lg-5-5 pure-u-md-1-1 pure-u-sm-1-1" ><h4><xsl:value-of 
select="php:function('lang', 'start time')" /></h4></div>
 
                                                                                
<div class="pure-u-lg-1-24 pure-u-md-1-12 pure-u-sm-1-12">
                                                                                
        <input maxlength="2" size="2" id="start_hour" name="start_hour" 
type="text" placeholder = "00" value="{report/start_hour}"></input>
@@ -187,7 +193,7 @@
                                                                                
        <input maxlength="2" size="2" id="start_minute" name="start_minute" 
type="text" placeholder = "00" value="{report/start_minute}"></input>
                                                                                
</div>
 
-                                                                               
<div class="pure-u-lg-5-5 pure-u-md-1-1 pure-u-sm-1-1"><xsl:value-of 
select="php:function('lang', 'end time')" /></div>
+                                                                               
<div class="pure-u-lg-5-5 pure-u-md-1-1 pure-u-sm-1-1"><h4><xsl:value-of 
select="php:function('lang', 'end time')" /></h4></div>
 
                                                                                
<div class="pure-u-lg-1-24 pure-u-md-1-12 pure-u-sm-1-12" >
                                                                                
        <input maxlength="2" size="2" class="pure-input" id="end_hour" 
name="end_hour" type="text" placeholder = "00" 
value="{report/end_hour}"></input>
@@ -216,8 +222,11 @@
                                                                                
                        <xsl:attribute 
name="data-validation">checkbox_group</xsl:attribute>
                                                                                
                        <xsl:attribute 
name="data-validation-qty">min1</xsl:attribute>
                                                                                
                        <!--xsl:if test="selected = 1"-->
-                                                                               
                                <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                                    <xsl:attribute 
name="checked">checked</xsl:attribute>
                                                                                
                        <!--/xsl:if-->
+                                                    <xsl:attribute 
name="data-validation-error-msg">
+                                                        <xsl:value-of 
select="php:function('lang', 'Please choose at least 1 weekday')" />
+                                                    </xsl:attribute>
                                                                                
                </input>
                                                                                
                <xsl:value-of select="name" />
                                                                                
        </label>

Modified: branches/dev-syncromind/booking/templates/base/report_participants.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/report_participants.xsl      
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/report_participants.xsl      
2015-11-24 00:41:27 UTC (rev 14462)
@@ -13,6 +13,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a from date')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -24,6 +27,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an end date')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -34,6 +40,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
choose at least 1 building')" />
+                        </xsl:attribute>
                         <xsl:for-each select="buildings">
                             <xsl:sort select="name"/>
                             <option>

Modified: branches/dev-syncromind/booking/templates/base/resource_form.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/resource_form.xsl    
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/resource_form.xsl    
2015-11-24 00:41:27 UTC (rev 14462)
@@ -13,6 +13,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -50,6 +53,9 @@
                         <xsl:attribute name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a building name')" />
+                        </xsl:attribute>
                     </input>
                     <div id="building_container" 
class="custom-container"></div>
                 </div>
@@ -58,6 +64,12 @@
                         <xsl:value-of select="php:function('lang', 'Resource 
Type')" />
                     </label>
                     <select name='type' id='field_type'>
+                        <xsl:attribute name="data-validation">
+                            <xsl:text>required</xsl:text>
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
select a resource type')" />
+                        </xsl:attribute>
                         <option value=''><xsl:value-of 
select="php:function('lang', 'Select Type')" />...</option>
                         <xsl:for-each select="resource/types/*">
                             <option value="{local-name()}">

Modified: branches/dev-syncromind/booking/templates/base/season_new.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/season_new.xsl       
2015-11-24 00:41:01 UTC (rev 14461)
+++ branches/dev-syncromind/booking/templates/base/season_new.xsl       
2015-11-24 00:41:27 UTC (rev 14462)
@@ -14,6 +14,9 @@
                                                <xsl:attribute 
name="data-validation">
                             <xsl:text>required</xsl:text>
                         </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -27,7 +30,10 @@
                         <xsl:attribute name="value"><xsl:value-of 
select="season/building_name"/></xsl:attribute>
                                                <xsl:attribute 
name="data-validation">
                             <xsl:text>required</xsl:text>
-                        </xsl:attribute>                                       
        
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a building name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -36,15 +42,32 @@
                     </label>
                     <input id="field_officer_id" name="officer_id" 
type="hidden">
                         <xsl:attribute name="value"><xsl:value-of 
select="season/officer_id"/></xsl:attribute>
+                        <xsl:attribute name="data-validation">
+                            <xsl:text>required</xsl:text>
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an officer name')" />
+                        </xsl:attribute>
                     </input>
                     <input id="field_officer_name" name="officer_name" 
type="text">
                         <xsl:attribute name="value"><xsl:value-of 
select="season/officer_name"/></xsl:attribute>
+                        <xsl:attribute name="data-validation">
+                            <xsl:text>required</xsl:text>
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an officer name')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
                     <label>
                         <xsl:value-of select="php:function('lang', 
'Resources')" />
                     </label>
+                    <input type="hidden" 
data-validation="application_resources">
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
choose at least 1 resource')" />
+                        </xsl:attribute>
+                    </input>
                     <div id="resources-container" 
class="custom-container"><span class="select_first_text"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></span></div>
                 </div>
                 <div class="pure-control-group">
@@ -74,7 +97,10 @@
                         <xsl:attribute name="value"><xsl:value-of 
select="season/from_"/></xsl:attribute>
                                                <xsl:attribute 
name="data-validation">
                             <xsl:text>required</xsl:text>
-                        </xsl:attribute>                                       
        
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter a from date')" />
+                        </xsl:attribute>
                     </input>
                 </div>
                 <div class="pure-control-group">
@@ -85,7 +111,10 @@
                         <xsl:attribute name="value"><xsl:value-of 
select="season/to_"/></xsl:attribute>
                                                <xsl:attribute 
name="data-validation">
                             <xsl:text>required</xsl:text>
-                        </xsl:attribute>                                       
        
+                        </xsl:attribute>
+                        <xsl:attribute name="data-validation-error-msg">
+                            <xsl:value-of select="php:function('lang', 'Please 
enter an end date')" />
+                        </xsl:attribute>
                     </input>
                 </div>
             </div>




reply via email to

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