Files
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<div class="col-md-12 h3">Cambio de Cláve</div>
|
||||
</div>
|
||||
<br />
|
||||
<form class="form-horizontal" method="post" action="{{url('', ['p' => 'auth', 'a' => 'do_change_pass'])}}">
|
||||
<form class="form-horizontal" method="post" action="{{$urls->base}}/auth/password/change">
|
||||
<div class="form-group">
|
||||
<div class="col-md-2">Cláve anterior</div>
|
||||
<div class="col-md-3"><input type="password" name="old" class="form-control" /></div>
|
||||
@ -32,7 +32,7 @@
|
||||
$(document).ready(function() {
|
||||
var status = [0, 0, 0, 0];
|
||||
$("input[name='old']").blur(function(e) {
|
||||
$.post('{!!nUrl('auth', 'check_pass', ['ajax' => 'true'])!!}', {"password": $(this).val()}, function(data) {
|
||||
$.post('{!!$urls->base!!}}/auth/password/check', {"password": $(this).val()}, function(data) {
|
||||
if (data == 'KO') {
|
||||
$('#msg1').html('<span class="label label-danger"><span class="glyphicon glyphicon-warning-sign"></span> Cláve anterior inválida.</span>');
|
||||
status[1] = 0;
|
||||
@ -43,7 +43,7 @@ $(document).ready(function() {
|
||||
});
|
||||
})
|
||||
$("input[name='new']").blur(function(e) {
|
||||
var result = zxcvbn($(this).val(), user_inputs=[$("input[name='old']").val(), '{{\App\Contract\Auth::User()->name}}']);
|
||||
var result = zxcvbn($(this).val(), user_inputs=[$("input[name='old']").val(), '{{$user->name}}']);
|
||||
if (result.score < 3) {
|
||||
$('#msg2').html('<span class="label label-danger"><span class="glyphicon glyphicon-warning-sign"></span> Nivel ' + result.score + '</span>');
|
||||
status[2] = 0;
|
||||
|
Reference in New Issue
Block a user