{% extends "administrador/base.html" %}
{% block title %}usuario{% endblock %}

<!-- CSS Code -->
{% block style_css %}{% endblock %}

<!-- JavaScript Code -->
{% block js_code %}
<script src="{{STATIC_URL}}js/usuarios/change_permissions.js"></script>
{% endblock %}

{% block breadcrumb %}{{ block.super }} <li><a href="/administrador/usuarios/">Usuarios</a></li><li class="active">Usuario</li>{% endblock %}
{% block content %}
<form method="post" class="form-horizontal" action="" width="300px"  enctype='multipart/form-data'>
  {% csrf_token %}
    {{ form.errors }}
    <h3>{{django_user.username}}</h3>
    <input type="hidden" id="django_user_id" value="{{ django_user.id }}">
    {{form}}

    {% for app_label, app_permission in apps_permissions.items %}
      <caption>{{ app_label|upper }}</caption> 
      <br>
      {% for permiso in app_permission %}
        <input class='permiso_chbox' type="checkbox" {{ permiso.checked }} value="{{ permiso.id}}"> {{ permiso.permission}}</input>
      {% endfor %}
    {% endfor %}
</form>
{% endblock %}