diff --git a/Consultations.php b/Consultations.php
index 879a0da..1b54a7b 100755
--- a/Consultations.php
+++ b/Consultations.php
@@ -73,7 +73,7 @@ if(!Authentification::checkUser(0)){
Durée de la consultation
-
+
diff --git a/Medecins.php b/Medecins.php
index 1f75fae..937b376 100755
--- a/Medecins.php
+++ b/Medecins.php
@@ -59,7 +59,7 @@ if(!Authentification::checkUser(0)){
-
+
diff --git a/Patients.php b/Patients.php
index 209f63e..de35b96 100755
--- a/Patients.php
+++ b/Patients.php
@@ -84,8 +84,8 @@ if(!Authentification::checkUser(0)){
?>
-
-
+
+
diff --git a/js/patients.js b/js/patients.js
old mode 100644
new mode 100755
index e84072e..dc9c87a
--- a/js/patients.js
+++ b/js/patients.js
@@ -7,6 +7,7 @@ var inVille = document.getElementById('crVille');
var inDN = document.getElementById('crDN');
var inLN = document.getElementById('crLN');
var inSecu = document.getElementById('crSecu');
+var sbCreer = document.getElementById('sbCreer'); // SUBMIT
var inCk = new inputChecker();
// format de la date
@@ -15,6 +16,7 @@ var dateFormat = new formatChecker(null, 'Ji/Mi/Aiii', { 'J': '[0-3]', 'M': '[0-
var secuFormat = new formatChecker(null, 'S ii Mi ii iii iii ii', { 'S': '[0-1]', 'M': '[0-1]' } );
inCk.append( inCP, new formatChecker( null, 'iiiii'), '09000'); // on ajoute le CODE_POSTAL au vérificateur de champs
inCk.append( inDN, dateFormat, '01/01/2015'); // on ajoute la DATE_NAISSANCE au vérificateur de champs
+inCk.append( inSecu, secuFormat, '1 99 19 99 999 999 99'); // on ajoute le NUM_SECU au vérificateur de champs
@@ -126,3 +128,14 @@ inSecu.addEventListener('keyup', function(e){
}
}
}, false);
+
+
+sbCreer.addEventListener('click', function(e){
+ e.preventDefault(); // on annule le submit()
+
+ var inputCheckerValid = inCk.checkAll();
+ var allInputValidated = inPrenom.className.indexOf('validated') > -1 && inNom.className.indexOf('validated') > -1 && inAdr.className.indexOf('validated') > -1 && inAdr2.className.indexOf('validated') > -1 && inCP.className.indexOf('validated') > -1 && inVille.className.indexOf('validated') > -1 && inDN.className.indexOf('validated') > -1 && inLN.className.indexOf('validated') > -1 && inSecu.className.indexOf('validated') > -1;
+
+ if( inputCheckerValid && allInputValidated ) // si tout es ok uniquement, on submit()
+ sbCreer.parentNode.submit();
+}, false);
\ No newline at end of file
diff --git a/managers/Medecin.class.php b/managers/Medecin.class.php
old mode 100644
new mode 100755
diff --git a/managers/Patient.class.php b/managers/Patient.class.php
old mode 100644
new mode 100755
diff --git a/managers/RDV.class.php b/managers/RDV.class.php
old mode 100644
new mode 100755