1 | {% block extras_js %} |
---|
2 | <script type="text/javascript"> |
---|
3 | // URL cargar permisos |
---|
4 | var CARGAR_PERMISOS = "{% url 'users:cargar_permisos' %}" |
---|
5 | </script> |
---|
6 | {% load staticfiles %} |
---|
7 | |
---|
8 | <link rel="shortcut icon" type="image/png" href="{% static 'icon/favicon.ico' %}"/> |
---|
9 | <!-- Bootstrap 3.3.6 --> |
---|
10 | <link rel="stylesheet" href="{% static 'bootstrap-3/css/bootstrap.min.css' %}"> |
---|
11 | <!-- Font Awesome --> |
---|
12 | <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}"> |
---|
13 | |
---|
14 | <link rel="stylesheet" href="{% static 'fonts/font-awesome.min.css' %}"> |
---|
15 | <!-- Ionicons --> |
---|
16 | <link rel="stylesheet" href="{% static 'css/ionicons.min.css' %}"> |
---|
17 | <!-- Theme style --> |
---|
18 | <link rel="stylesheet" href="{% static 'dist/css/AdminLTE.min.css' %}"> |
---|
19 | |
---|
20 | <link rel="stylesheet" href="{% static 'plugins/iCheck/square/blue.css' %}"> |
---|
21 | <script src="{% static 'DataTables/media/js/jquery.js' %}" type="text/javascript"></script> |
---|
22 | |
---|
23 | <!-- Bootstrap 3.3.6 --> |
---|
24 | <script src="{% static 'bootstrap-3/js/bootstrap.min.js' %}" type="text/javascript"></script> |
---|
25 | |
---|
26 | <!-- AdminLTE App --> |
---|
27 | <script src="{% static 'dist/js/app.min.js' %}" type="text/javascript"></script> |
---|
28 | |
---|
29 | <script src="{% static 'plugins/iCheck/icheck.min.js' %}"></script> |
---|
30 | <script type="text/javascript" src="{% static 'users/user_register.js' %}"></script> |
---|
31 | {% endblock extras_js %} |
---|
32 | <form id="form_perfil" method="post"> |
---|
33 | {% csrf_token %} |
---|
34 | <div class="form-group has-feedback"> |
---|
35 | {{ form.first_name }} |
---|
36 | <span class="glyphicon glyphicon-user form-control-feedback"></span> |
---|
37 | </div> |
---|
38 | <div class="form-group has-feedback"> |
---|
39 | {{ form.last_name }} |
---|
40 | <span class="glyphicon glyphicon-user form-control-feedback"></span> |
---|
41 | </div> |
---|
42 | <div class="form-group has-feedback"> |
---|
43 | {{ form.email }} |
---|
44 | <span class="glyphicon glyphicon-envelope form-control-feedback"></span> |
---|
45 | </div> |
---|
46 | {% if 'Administradores' in request.session.grupos %} |
---|
47 | <div class="row"> |
---|
48 | <div class="col-xs-8"> |
---|
49 | <div class="checkbox icheck"> |
---|
50 | <label> |
---|
51 | {{ form.is_staff}} |
---|
52 | </label> |
---|
53 | {{ form.is_staff.label}} |
---|
54 | </div> |
---|
55 | </div> |
---|
56 | <!-- /.col --> |
---|
57 | <div class="col-xs-4"> |
---|
58 | <div class="checkbox icheck"> |
---|
59 | <label> |
---|
60 | {{ form.is_active}} |
---|
61 | </label> |
---|
62 | {{ form.is_active.label}} |
---|
63 | </div> |
---|
64 | </div> |
---|
65 | <!-- /.col --> |
---|
66 | </div> |
---|
67 | <div class="form-group has-feedback"> |
---|
68 | <label> |
---|
69 | Grupos de Usuario |
---|
70 | </label> |
---|
71 | {{ form.groups }} |
---|
72 | </div> |
---|
73 | <div class="form-group has-feedback" id="permisos_form"> |
---|
74 | <label> |
---|
75 | Permisos para el Usuario |
---|
76 | </label> |
---|
77 | {{ form.user_permissions }} |
---|
78 | </div> |
---|
79 | {% endif %} |
---|
80 | <div class="modal-footer"> |
---|
81 | <input type="submit" value="Actualizar Perfil" class="btn btn-primary"/> |
---|
82 | </form> |
---|
83 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
---|
84 | </div> |
---|
85 | <script type="text/javascript"> |
---|
86 | $('#form_perfil').attr("action", (ruta_user)); |
---|
87 | $(function () { |
---|
88 | $('#id_is_active, #id_is_staff').iCheck({ |
---|
89 | checkboxClass: 'icheckbox_square-blue', |
---|
90 | radioClass: 'iradio_square-blue', |
---|
91 | increaseArea: '20%' // optional |
---|
92 | }); |
---|
93 | }); |
---|
94 | </script> |
---|
95 | |
---|