src/templates/Security/confirma_ingreso.html.twig line 1

Open in your IDE?
  1. {% extends "layout_inicio.html.twig" %}
  2. {% block javascripts %}
  3.     {{ parent() }}
  4.     <script src="{{ asset('ace/js/bootbox.js') }}"></script>
  5.     
  6. {% endblock javascripts %}
  7. {% block jquery %}
  8.     {{ parent() }}
  9.     <script type="text/javascript">
  10.         $(function()
  11.         {
  12.             $('#frmConfirmaIngreso').submit(function(e){
  13.                 if ($('#password').val() != $('#confpassword').val())
  14.                 {   
  15.                     e.preventDefault();
  16.                     bootbox.dialog({
  17.                         message: "{{ 'seguridad.contrasena.confirmacion' | trans() }}", 
  18.                         buttons: {
  19.                             "success" : {
  20.                                 "label" : "OK",
  21.                                 "className" : "btn-sm btn-primary"
  22.                             }
  23.                         }
  24.                     });
  25.                 }
  26.             });
  27.         });
  28.         
  29.         function myFunction() {
  30.             var x = document.getElementById("password");
  31.             if (x.type === "password") {
  32.               x.type = "text";
  33.               document.getElementById('btnEye').className = 'ace-icon fa fa-eye green bigger-150';
  34.               
  35.             } else {
  36.               x.type = "password";
  37.               document.getElementById('btnEye').className = 'ace-icon fa fa-eye-slash green bigger-150';
  38.             }
  39.             
  40.             
  41.         }
  42.         
  43.         function myFunctionConf() {
  44.             var x = document.getElementById("confpassword");
  45.             if (x.type === "password") {
  46.               x.type = "text";
  47.               document.getElementById('btnEyeConf').className = 'ace-icon fa fa-eye green bigger-150';
  48.               
  49.             } else {
  50.               x.type = "password";
  51.               document.getElementById('btnEyeConf').className = 'ace-icon fa fa-eye-slash green bigger-150';
  52.             }
  53.             
  54.             
  55.         }
  56.         
  57.     </script>    
  58.     
  59. {% endblock jquery %}
  60. {% block content %} 
  61.     <div class="widget-box transparent">
  62.         <div class="widget-header widget-header-flat" style="text-align: center">
  63.             <h4 class="widget-title lighter">
  64.                 {{ mensaje }}
  65.             </h4>
  66.         </div>
  67.         <div class="widget-body" style="display: block;">
  68.             <div class="widget-main no-padding">
  69.                 <br> 
  70.                 <div class="row">
  71.                     <div class="col-xs-12">
  72.                         <div class="set-password">
  73.                             {% if error_pass is defined %}
  74.                                 <div class="alert alert-danger" style="text-align: center">
  75.                                     <strong>
  76.                                         <i class="ace-icon fa fa-info-circle bigger-150"></i>
  77.                                         {{ error_pass }}
  78.                                     </strong>
  79.                                     <br>
  80.                                 </div>
  81.                             {% endif %}
  82.                             <div class="alert alert-info" style="text-align: center">
  83.                                 <strong>
  84.                                     <i class="ace-icon fa fa-info-circle bigger-150"></i>
  85.                                     {{ 'seguridad.contrasena.inicio' | trans() }}
  86.                                 </strong>
  87.                                 <br><br>
  88.                                 {{ textoFuerzaPass | raw }}
  89.                                 <br>
  90.                             </div>
  91.                             <form class="form" name="frmConfirmaIngreso" id="frmConfirmaIngreso" action="{{ path('usuario_confirma_ingreso', {'usuario': usuario.id}) }}" method="post">
  92.                                 <table class="table table-bordered">
  93.                                     <tr>
  94.                                         <th style="width: 30%;">
  95.                                             <label>
  96.                                                 {% trans %}seguridad.autenticacion.nombre{% endtrans %}:
  97.                                             </label>
  98.                                         </th>
  99.                                         <td>
  100.                                             {{ usuario.nombreCompleto }}
  101.                                         </td>
  102.                                     </tr>
  103.                                     <tr>
  104.                                         <th style="width: 30%;">
  105.                                             <label>
  106.                                                 {% trans %}seguridad.autenticacion.user{% endtrans %}:
  107.                                             </label>
  108.                                         </th>
  109.                                         <td>
  110.                                             {{ usuario.username }}
  111.                                         </td>
  112.                                     </tr>
  113.                                     <tr>
  114.                                         <th style="width: 30%;">
  115.                                             <label class="required">
  116.                                                 {% trans %}seguridad.autenticacion.password{% endtrans %}:
  117.                                             </label>
  118.                                         </th>
  119.                                         <td colspan="2">
  120.                                             <input name="password" type="password" id="password" required="true" style="width:90%;">
  121.                                             <i class="ace-icon fa fa-eye-slash green bigger-150" id="btnEye" onclick="myFunction()">&nbsp;</i>
  122.                                         </td>
  123.                                     </tr>
  124.                                     <tr>
  125.                                         <th style="width: 30%;">
  126.                                             <label class="required">
  127.                                                 {% trans %}seguridad.autenticacion.repassword{% endtrans %}:
  128.                                             </label>
  129.                                         </th>
  130.                                         <td colspan="2">
  131.                                             <input name="confpassword" type="password" id="confpassword" required="true" style="width:90%;">
  132.                                             <i class="ace-icon fa fa-eye-slash green bigger-150" id="btnEyeConf" onclick="myFunctionConf()">&nbsp;</i>
  133.                                         </td>
  134.                                     </tr>
  135.                                 </table>
  136.                                 <table class="table table-bordered">
  137.                                     <tr>
  138.                                         <td colspan="3" style="text-align: center;">
  139.                                             <div class="hr hr-8 hr-dotted"></div>
  140.                                             <input class="btn" type="submit" value="{%trans%}botones.accept{% endtrans%}">
  141.                                         </td>
  142.                                     </tr>
  143.                                 </table>
  144.                             </form>
  145.                         </div>
  146.                     </div>
  147.                 </div>    
  148.             </div>                   
  149.         </div>                   
  150.     </div>
  151. {% endblock %}