{% extends "ui/base-devices.html" %}

{% load url from future %}
{% load icons %}

{% block contentarea %}
<form class="form form-horizontal device-deploy-form" method="POST">
    {% csrf_token %}
    {% for f in form.visible_fields %}
    <div class="control-group {{ f.css_classes }}
        {% if f.errors %}error{% endif %}
    ">
        <label class="control-label {% if f.field.required %}required{% endif %}"
            >{{ f.label }}</label>
        <div class="controls">
            {{ f }}
            {% for e in f.errors %}
                <span class="help-inline">{{ e }}</span>
            {% empty %}
            {%  if f.help_text %}
                <span class="help-inline">{{ f.help_text }}</span>
            {%  endif %}
            {% endfor %}
        </div>
    </div>
    {% endfor %}
<div class="form-actions">
    <div class="control-group" style="white-space:nowrap">
        <button class="btn btn-primary" type="submit" name="deploy">
                {% icon 'fugue-wand-hat' %}&nbsp;Deploy
        </button>
    </div>
</div>
</form>
{% endblock %}
