{% extends "django_msp_sms\base.html" %}
{% block title %}Clientes SMS{% endblock %}

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

<!-- JavaScript Code -->
{% block js_code %}

<script src="{{STATIC_URL}}js/django_msp_sms/ignorar.js"></script>
  <script type="text/javascript">
    $(function () {
      $('#id_cliente').select2();
  });
</script>
{% endblock %}
{% block breadcrumb %}
  {{ block.super }} 
  <li class='active'>Clientes</li>
{% endblock %}
{% block content %}
<div class="page-header">
  <div class='row'>
    <div class="col-sm-2 col-sm-2">
      <h1 style="margin-top: 0;">Clientes <small></small></h1>
    </div>
    <div class="col-sm-5 col-sm-5">
      <form method="GET" action="" class="form-inline" enctype='multipart/form-data'>{% csrf_token %}
        {{ form.errors }}
        {{ form.cliente }}
        {{ form.nombre }}
        {{ form.clave }}
        <button type="submit" class="btn"><i class="glyphicon glyphicon-download-alt"></i> Buscar</button>
      </form>
    </div>
  </div>
</div>
<div class="row center">
  <ul class="pager">
    {% if page_obj.has_previous %}
    <li><a href="?page={{ page_obj.previous_page_number }}">«</a></li>
    {% else %}
    <li class="disabled"><a href="#">«</a></li>
    {% endif %}
    <li class="disabled">Pagina {{ page_obj.number }} de {{ page_obj.paginator.num_pages }}.</li>
    {% if page_obj.has_next %}
    <li><a href="?page={{ page_obj.next_page_number }}">»</a></li>
    {% else %}
    <li class="disabled"><a href="#">»</a></li>
    {% endif %}
  </ul>
</div>
<table class="table tableCell table-hover">
<tbody>
<tr>
  <th>Ignorado</th>
  <th>Nombre</th>
</tr>
  {% for cliente in clientes %}
  <tr>
    <td>

      <a href="/sms/cliente/{{ cliente.id }}/"><input type="checkbox" name="clientes" value="{{ cliente.id }}" {% if cliente.no_enviar_sms == 1 %} checked="checked" {% endif %} ></a>
    </td>
    <td><strong>{{ cliente.nombre }} </strong> </td>
  </tr>
  {% endfor %}
</tbody>
</table>
{% endblock %}