Commit 2784c3f7 authored by Hamza Arfaoui's avatar Hamza Arfaoui

CAF199

parent cf4a71e4
...@@ -449,7 +449,7 @@ app.controller("CaisseController", ['$http', '$scope', '$controller', '$timeout' ...@@ -449,7 +449,7 @@ app.controller("CaisseController", ['$http', '$scope', '$controller', '$timeout'
msg += (that.config.fields.GENDER.REQUIRED && !that.civilite) ? $scope.titles.CIV_ERROR : ""; msg += (that.config.fields.GENDER.REQUIRED && !that.civilite) ? $scope.titles.CIV_ERROR : "";
msg += ($scope.clientcompany && !that.company) ? ("<br/>" + $scope.titles.COMPANY_ERROR) : ""; msg += ($scope.clientcompany && !that.company) ? ("<br/>" + $scope.titles.COMPANY_ERROR) : "";
msg += msg ? "<br/>" : ""; msg += msg ? "<br/>" : "";
msg += ((!that.lastname && that.config.fields.LASTNAME.REQUIRED) || (!that.firstname && that.config.fields.FIRSTNAME.REQUIRED) || (that.firstname && $scope.config.fields.FIRSTNAME.MINCHARS && that.firstname.length < $scope.config.fields.FIRSTNAME.MINCHARS) || (that.lastname && $scope.config.fields.LASTNAME.MINCHARS && that.lastname.length < $scope.config.fields.LASTNAME.MINCHARS)) ? ($scope.titles.NAME_ERROR) : ""; msg += ((!that.lastname && that.config.fields.LASTNAME.REQUIRED) || (!that.firstname && that.config.fields.FIRSTNAME.REQUIRED) || (!that.maticule && that.config.fields.MATRICULE.REQUIRED) || (that.firstname && $scope.config.fields.FIRSTNAME.MINCHARS && that.firstname.length < $scope.config.fields.FIRSTNAME.MINCHARS) || (that.lastname && $scope.config.fields.LASTNAME.MINCHARS && that.lastname.length < $scope.config.fields.LASTNAME.MINCHARS)) ? ($scope.titles.NAME_ERROR) : "";
if ($scope.config.borne.POPUP_ERRORS != undefined && $scope.config.borne.POPUP_ERRORS === true) { if ($scope.config.borne.POPUP_ERRORS != undefined && $scope.config.borne.POPUP_ERRORS === true) {
$("#error-popup .content").html(msg); $("#error-popup .content").html(msg);
$("#error-popup").show(); $("#error-popup").show();
...@@ -655,7 +655,7 @@ app.controller("CaisseController", ['$http', '$scope', '$controller', '$timeout' ...@@ -655,7 +655,7 @@ app.controller("CaisseController", ['$http', '$scope', '$controller', '$timeout'
$scope.validKeyboard = function() { $scope.validKeyboard = function() {
var valid = true; var valid = true;
if ($scope.config) { if ($scope.config) {
valid = (!that.cgu && $scope.config.fields.CGU && $scope.config.fields.CGU.ENABLED && $scope.config.fields.CGU.REQUIRED) || ($scope.clientcivilite && !that.civilite && $scope.config.fields.GENDER.REQUIRED) || ($scope.clientcompany && !that.company && $scope.config.fields.COMPANY.REQUIRED) || (!that.firstname && $scope.config.fields.FIRSTNAME.ENABLED && $scope.config.fields.FIRSTNAME.REQUIRED) || (!that.lastname && $scope.config.fields.LASTNAME.ENABLED && $scope.config.fields.LASTNAME.REQUIRED) || (that.lastname && $scope.config.fields.LASTNAME.MINCHARS && that.lastname.length < $scope.config.fields.LASTNAME.MINCHARS) || (that.firstname && $scope.config.fields.FIRSTNAME.MINCHARS && that.firstname.length < $scope.config.fields.FIRSTNAME.MINCHARS); valid = (!that.cgu && $scope.config.fields.CGU && $scope.config.fields.CGU.ENABLED && $scope.config.fields.CGU.REQUIRED) || ($scope.clientcivilite && !that.civilite && $scope.config.fields.GENDER.REQUIRED) || ($scope.clientcompany && !that.company && $scope.config.fields.COMPANY.REQUIRED) || (!that.firstname && $scope.config.fields.FIRSTNAME.ENABLED && $scope.config.fields.FIRSTNAME.REQUIRED) || (!that.lastname && $scope.config.fields.LASTNAME.ENABLED && $scope.config.fields.LASTNAME.REQUIRED) || (!that.matricule && $scope.config.fields.MATRICULE.ENABLED && $scope.config.fields.MATRICULE.REQUIRED) || (that.lastname && $scope.config.fields.LASTNAME.MINCHARS && that.lastname.length < $scope.config.fields.LASTNAME.MINCHARS) || (that.firstname && $scope.config.fields.FIRSTNAME.MINCHARS && that.firstname.length < $scope.config.fields.FIRSTNAME.MINCHARS);
} }
return !valid; return !valid;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment