{% extends "layout_inicio.html.twig" %}
{% block javascripts %}
{{ parent() }}
<script src="{{ asset('ace/js/bootbox.js') }}"></script>
{% endblock javascripts %}
{% block jquery %}
{{ parent() }}
<script type="text/javascript">
$(function()
{
$('#frmConfirmaIngreso').submit(function(e){
if ($('#password').val() != $('#confpassword').val())
{
e.preventDefault();
bootbox.dialog({
message: "{{ 'seguridad.contrasena.confirmacion' | trans() }}",
buttons: {
"success" : {
"label" : "OK",
"className" : "btn-sm btn-primary"
}
}
});
}
});
});
function myFunction() {
var x = document.getElementById("password");
if (x.type === "password") {
x.type = "text";
document.getElementById('btnEye').className = 'ace-icon fa fa-eye green bigger-150';
} else {
x.type = "password";
document.getElementById('btnEye').className = 'ace-icon fa fa-eye-slash green bigger-150';
}
}
function myFunctionConf() {
var x = document.getElementById("confpassword");
if (x.type === "password") {
x.type = "text";
document.getElementById('btnEyeConf').className = 'ace-icon fa fa-eye green bigger-150';
} else {
x.type = "password";
document.getElementById('btnEyeConf').className = 'ace-icon fa fa-eye-slash green bigger-150';
}
}
</script>
{% endblock jquery %}
{% block content %}
<div class="widget-box transparent">
<div class="widget-header widget-header-flat" style="text-align: center">
<h4 class="widget-title lighter">
{{ mensaje }}
</h4>
</div>
<div class="widget-body" style="display: block;">
<div class="widget-main no-padding">
<br>
<div class="row">
<div class="col-xs-12">
<div class="set-password">
{% if error_pass is defined %}
<div class="alert alert-danger" style="text-align: center">
<strong>
<i class="ace-icon fa fa-info-circle bigger-150"></i>
{{ error_pass }}
</strong>
<br>
</div>
{% endif %}
<div class="alert alert-info" style="text-align: center">
<strong>
<i class="ace-icon fa fa-info-circle bigger-150"></i>
{{ 'seguridad.contrasena.inicio' | trans() }}
</strong>
<br><br>
{{ textoFuerzaPass | raw }}
<br>
</div>
<form class="form" name="frmConfirmaIngreso" id="frmConfirmaIngreso" action="{{ path('usuario_confirma_ingreso', {'usuario': usuario.id}) }}" method="post">
<table class="table table-bordered">
<tr>
<th style="width: 30%;">
<label>
{% trans %}seguridad.autenticacion.nombre{% endtrans %}:
</label>
</th>
<td>
{{ usuario.nombreCompleto }}
</td>
</tr>
<tr>
<th style="width: 30%;">
<label>
{% trans %}seguridad.autenticacion.user{% endtrans %}:
</label>
</th>
<td>
{{ usuario.username }}
</td>
</tr>
<tr>
<th style="width: 30%;">
<label class="required">
{% trans %}seguridad.autenticacion.password{% endtrans %}:
</label>
</th>
<td colspan="2">
<input name="password" type="password" id="password" required="true" style="width:90%;">
<i class="ace-icon fa fa-eye-slash green bigger-150" id="btnEye" onclick="myFunction()"> </i>
</td>
</tr>
<tr>
<th style="width: 30%;">
<label class="required">
{% trans %}seguridad.autenticacion.repassword{% endtrans %}:
</label>
</th>
<td colspan="2">
<input name="confpassword" type="password" id="confpassword" required="true" style="width:90%;">
<i class="ace-icon fa fa-eye-slash green bigger-150" id="btnEyeConf" onclick="myFunctionConf()"> </i>
</td>
</tr>
</table>
<table class="table table-bordered">
<tr>
<td colspan="3" style="text-align: center;">
<div class="hr hr-8 hr-dotted"></div>
<input class="btn" type="submit" value="{%trans%}botones.accept{% endtrans%}">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}