device.html 1.53 KB
Newer Older
Nicolas Gelot's avatar
Nicolas Gelot committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% extends "base.html" %}
{% load i18n %}
{% load static %}

{% block title %}{% trans "Generate device report" %}{% endblock %}
{% block body_class %}cards-pf{% endblock %}

{% block contents %}
<div class="container-fluid container-cards-pf">
    <form class="form-horizontal" method="get">
        {% csrf_token %}
        <div class="form-group">
            <label class="col-md-1 col-lg-1" for="id_product">{% trans "Product" %}</label>
            <div class="col-md-3 col-lg-3">
                <select class="form-control" id="id_product">
                    <option value="">----------</option>
                    {% for option in form.product.field.queryset %}
                    <option value="{{ option.pk }}" {% if form.product.value|add:'0' == option.pk %}selected{% endif %}>
                    {{ option.name }}
                    </option>
                    {% endfor %}
                </select>
            </div>

            <label class="col-md-1 col-lg-1" for="id_tag">{% trans "Tag" %}</label>
            <div class="col-md-3 col-lg-3">
                <input id="id_tag" type="text" class="form-control" value="{{ form.tag.value|default:'' }}">
                <p class="help-block">{% trans "Separate multiple values with comma (,)" %}</p>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-1 col-lg-1">
                <button id="btn_search" type="submit" class="btn btn-default btn-lg">{% trans "Search" %}</button>
            </div>
        </div>
    </form>
    {% endblock %}