This commit is contained in:
2021-12-25 23:17:47 -03:00
parent 7e01974ec8
commit d7d671fb51
68 changed files with 2991 additions and 160 deletions

View File

@ -5,7 +5,7 @@
<div class="col-md-12 h3">Cambio de Cl&aacute;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&aacute;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&aacute;ve anterior inv&aacute;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;