Commit 6c4f09a44b22fe93a0bfed63ab50e151715011e8
1 parent
809a287d
Improvement on the connection method
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
connect.php
1 | <h2> Connexion </h2> | 1 | <h2> Connexion </h2> |
2 | -<form class="form-horizontal" role="form"> | 2 | +<form class="form-horizontal" role="form" id="connectForm"> |
3 | <div class="form-group"> | 3 | <div class="form-group"> |
4 | <label for="entrer_Identifiant_3" class="col-sm-2 control-label">Identifiant</label> | 4 | <label for="entrer_Identifiant_3" class="col-sm-2 control-label">Identifiant</label> |
5 | <div class="col-sm-10"> | 5 | <div class="col-sm-10"> |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | </div> | 19 | </div> |
20 | <div class="form-group"> | 20 | <div class="form-group"> |
21 | <div class="col-sm-offset-2 col-sm-10"> | 21 | <div class="col-sm-offset-2 col-sm-10"> |
22 | - <button id="validCreds" type="submit" class="btn btn-primary">Se connecter</button> | 22 | + <button id="validCreds" type="submit" class="btn btn-primary" onclick="return false;">Se connecter</button> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
25 | </form> | 25 | </form> |
@@ -34,7 +34,7 @@ $('#afficherMotDePasse')[0].addEventListener('mouseup', function() | @@ -34,7 +34,7 @@ $('#afficherMotDePasse')[0].addEventListener('mouseup', function() | ||
34 | { | 34 | { |
35 | $('#entrer_mot_de_passe_3')[0].type = 'password'; | 35 | $('#entrer_mot_de_passe_3')[0].type = 'password'; |
36 | }); | 36 | }); |
37 | -$('#validCreds')[0].addEventListener('click', function() | 37 | +$('#connectForm')[0].addEventListener('submit', function() |
38 | { | 38 | { |
39 | $("#validCreds")[0].disabled=true; | 39 | $("#validCreds")[0].disabled=true; |
40 | var checkPath = "checkCreds.php?user="; | 40 | var checkPath = "checkCreds.php?user="; |