{% extends 'layouts/master-page' %}
{% block title %}{{hostname}} - Fixes{% endblock %}
{% block head %}
  <!-- javascript -->
  <script type="text/javascript" src="/static/js/custom/pager.js"></script>
  
{% endblock %}
{% block content %}

  <button id="filter-toggle" type="button" class="btn btn-primary btn-xs" data-toggle="collapse" data-target="#filterdiv">
  Hide/Show filter
</button>
  
  <div id="filterdiv" class="collapse well well-small">  
    <form method="POST" id="filter" class="nav form-search">
         
<!--
      {{ form.csrf_token }}
-->
    
      {{ form.r }}
      {{ form.pageLentgh }}
      {{ form.hostname }}
      
      <table class="searchTable">
        <tr>
          <td class="text">{{ form.package.label }}</td><td>{{ form.package(size=30) }}</td>
          <td class="text">{{ form.urgency.label }}</td><td>{{ form.urgency() }}</td>
          <td class="text">{{ form.remotely_exp.label }}</td><td>{{ form.remotely_exp() }}</td>
          
          <td class="text">{{ form.skipped.label }}</td><td>{{ form.skipped() }}</td>
          <td class="text">{{ form.submit.label }}</td><td>{{ form.submit() }}</td>
        </tr>
      </table>
      
<!--
      <input name="r" id="r" type="hidden" value=0 />  
      <table class="searchTable">
        <tr>
          <td class="text">Package</td>
          <td>
            <input name="package" id="package" type="text" value={% if filters is defined and filters['package'] != "all" %}"{{filters['package']}}"{% else %}"all"{% endif %}/>
          </td>
          <td class="text">Urgency</td>
          <td>
            <select name="urgency" id="urgency">
              <option value="all">all</option>
              <option value="" {% if filters is defined and filters['urgency'] == "" %}selected{% endif %}>unknown</option>
              <option value="negligible" {% if filters is defined and filters['urgency'] == "negligible" %}selected{% endif %}>negligible</option>
              <option value="low" {% if filters is defined and filters['urgency'] == "low" %}selected{% endif %}>low</option>
              <option value="medium" {% if filters is defined and filters['urgency'] == "medium" %}selected{% endif %}>medium</option>
              <option value="high" {% if filters is defined and filters['urgency'] == "high" %}selected{% endif %}>high</option>
              <option value="critical" {% if filters is defined and filters['urgency'] == "critical" %}selected{% endif %}>critical</option>
            </select>
          </td>
          <td class="text">Remotely exp</td>
          <td>
            <select name="remotely_exp" id="remotely_exp">
              <option value="all">all</option>
              <option value="unknown" {% if filters is defined and filters['remotely_exp'] == "unknown" %}selected{% endif %}>unknown</option>
              <option value="yes" {% if filters is defined and filters['remotely_exp'] == "yes" %}selected{% endif %}>yes</option>
              <option value="no" {% if filters is defined and filters['remotely_exp'] == "no" %}selected{% endif %}>no</option>
            </select>
          </td>
          <td class="text">OS Version</td>
            <td>
              <select name="os_version" id="os_version">
                <option value="all">all</option>
              {% for os_version in os_versions %}
                <option value="{{ os_version }}" {% if filters is defined and filters['os_version'] == "{{ os_version }}" %}selected{% endif %}>{{ os_version }}</option>
              {% endfor %}
              </select>
            </td>
          <td>Source</td>
          <td>
            <select name="src" id="src">
              <option value="all">all</option>
              <option value="debsecan" {% if filters is defined and filters['src'] == "debsecan" %}selected{% endif %}>debsecan</option>
              <option value="ubuntu" {% if filters is defined and filters['src'] == "ubuntu" %}selected{% endif %}>ubuntu</option>
              <option value="cve" {% if filters is defined and filters['src'] == "cve" %}selected{% endif %}>cve</option>
            </select>
          </td>
          <td class="text">Skipped</td>
          <td>
            <select name="skipped" id="skipped">
              <option value="false">false</option>
              <option value="true" {% if filters is defined and filters['skipped'] == "true" %}selected{% endif %}>true</option>
            </select>
          </td>
        </tr>

    </table>
    <input type="submit" value="Search"/>
-->
  </form>
</div>
  {% if fixes != None %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  <!-- Search results -->
  {% include 'subpages/fixes_table.html' %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  {% endif %}
  
{% endblock %}
