%PDF- %PDF-
Direktori : /proc/thread-self/root/www/varak.net/losik.varak.net/templates/ |
Current File : //proc/thread-self/root/www/varak.net/losik.varak.net/templates/change-password.tpl |
{extends file='layout.tpl'} {block name=content} <div class="container"> <div class="row"> <div class="col-sm-12"> <h1>Změna hesla</h1> </div> </div> <div class="row"> <div class="col-sm-6 col-sm-offset-3"> <form method="post" id="passwordForm" action="{$baseUrl}/index.php?action=do-change-password"> <input type="password" class="input-lg form-control" name="password1" id="password1" placeholder="Nové heslo" autocomplete="off"> <input type="hidden" name="token" value="{$token}"> <div class="row"> <div class="col-sm-6"> <span id="8char" class="glyphicon glyphicon-remove" style="color:#FF0004;"></span> Alespoň 8 znaků<br> <span id="ucase" class="glyphicon glyphicon-remove" style="color:#FF0004;"></span> Velké písmeno </div> <div class="col-sm-6"> <span id="lcase" class="glyphicon glyphicon-remove" style="color:#FF0004;"></span> Malé písmeno<br> <span id="num" class="glyphicon glyphicon-remove" style="color:#FF0004;"></span> Číslice </div> </div> <input type="password" class="input-lg form-control" name="password2" id="password2" placeholder="Znovu heslo" autocomplete="off"> <div class="row"> <div class="col-sm-12"> <span id="pwmatch" class="glyphicon glyphicon-remove" style="color:#FF0004;"></span> Hesla se shodují </div> </div> <input type="submit" class="col-xs-12 btn btn-primary btn-load btn-lg" data-loading-text="Měním heslo" value="Změnit heslo"> </form> </div><!--/col-sm-6--> </div><!--/row--> </div> {/block} {block name=foot} <script type="text/javascript"> $("input[type=password]").keyup(function(){ var ucase = new RegExp("[A-Z]+"); var lcase = new RegExp("[a-z]+"); var num = new RegExp("[0-9]+"); if($("#password1").val().length >= 8){ $("#8char").removeClass("glyphicon-remove"); $("#8char").addClass("glyphicon-ok"); $("#8char").css("color","#00A41E"); }else{ $("#8char").removeClass("glyphicon-ok"); $("#8char").addClass("glyphicon-remove"); $("#8char").css("color","#FF0004"); } if(ucase.test($("#password1").val())){ $("#ucase").removeClass("glyphicon-remove"); $("#ucase").addClass("glyphicon-ok"); $("#ucase").css("color","#00A41E"); }else{ $("#ucase").removeClass("glyphicon-ok"); $("#ucase").addClass("glyphicon-remove"); $("#ucase").css("color","#FF0004"); } if(lcase.test($("#password1").val())){ $("#lcase").removeClass("glyphicon-remove"); $("#lcase").addClass("glyphicon-ok"); $("#lcase").css("color","#00A41E"); }else{ $("#lcase").removeClass("glyphicon-ok"); $("#lcase").addClass("glyphicon-remove"); $("#lcase").css("color","#FF0004"); } if(num.test($("#password1").val())){ $("#num").removeClass("glyphicon-remove"); $("#num").addClass("glyphicon-ok"); $("#num").css("color","#00A41E"); }else{ $("#num").removeClass("glyphicon-ok"); $("#num").addClass("glyphicon-remove"); $("#num").css("color","#FF0004"); } if($("#password1").val() == $("#password2").val()){ $("#pwmatch").removeClass("glyphicon-remove"); $("#pwmatch").addClass("glyphicon-ok"); $("#pwmatch").css("color","#00A41E"); }else{ $("#pwmatch").removeClass("glyphicon-ok"); $("#pwmatch").addClass("glyphicon-remove"); $("#pwmatch").css("color","#FF0004"); } }); </script> {/block}