{% extends 'fittings/base.html' %}
{% load i18n %}
{% load humanize %}
{% load filters %}
{% block page_title %}{% translate "Add Fit" %}{% endblock %}

{% block fittings_block %}
    {% if msg %}
            <div class="alert alert-{{ msg.0 }} alert-dismissible" role="alert">
                    <button type="button" class="close" data-dismiss="alert" aria-label="close">
                        <span aria-hidden="true">&times</span>
                    </button>
                    {% if msg.0 != 'warning' %}<h4>{% if msg.0 == 'danger' %}Oh No!{% elif msg.0 == 'success' %}Success!{% endif %}</h4>{% endif %}
                    <p>{{ msg.1 }}</p>
                </div>
        {% endif %}
    <div class="container col-sm-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                {% translate "Add Fitting" %}
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-10 col-md-offset-1">
                        <form class="form-signin" role="form" action="" method="POST">
                            {% csrf_token %}
                            <div class="form-group">
                                <label for="description" class="col-sm-2 control-label">{% translate "Description" %}</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" name="description" id="description" maxlength="500" rows="3"></textarea>
                                </div>
                            </div>
                            <br>
                            <div class="form-group" >
                                <label for="eft" class="col-sm-2 control-label">{% translate "Fit" %}</label>
                                <div class="col-sm-10" style="margin-top: 5px; margin-bottom: 5px;">
                                    <textarea class="form-control" name="eft" id="eft" rows="50"></textarea>
                                </div>
                            </div>
                            <br>
                            <button class="btn btn-primary btn-block" type="submit">{% translate "Submit" %}</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
