{% extends "index/base.html" %}{% load staticfiles %}{% load i18n %}
{% block title %}{% trans "Adding objects to the stock" %}{% endblock %}
{% block breadcrumbs %}<a href="/"><img src="{{ STATIC_URL }}img/home.png" /></a> / <a href="{% url 'index:stock' %}">{% trans "List of new or refilled cartridges" %}</a> / {% trans "Adding objects to the stock" %}{% endblock %}
{% block jqueryui %}
    <!-- Dbl;tn cx`nxbrf  -->
    <link rel="stylesheet" href="{{ STATIC_URL }}css/pm_widget.css" />
    <script src="{{ STATIC_URL }}js/pm_widget.js"></script>
    <script src="{{ STATIC_URL }}js/jquery.hotkeys.js"></script>
    <script src="{{ STATIC_URL }}js/hotkeys_bind.js?{{request.CACHEVERSION}}"></script>

    <!-- Виджет календарика -->
    <link rel="stylesheet" href="{{ STATIC_URL }}css/jquery-ui.css?1" />
    <script src="{{ STATIC_URL }}js/jquery-ui.js?1"></script>
    <script src="/dhtml/datepicker.js?{{request.CACHEVERSION}}{{request.LANGUAGE_CODE}}"></script>
    <script src="{{ STATIC_URL }}js/datepicker-{% trans 'lang' %}.js?1"></script>
{% endblock %}
{% block help_url %}
{{ request.HOME_SITE }}/help/{{ request.LANGUAGE_CODE }}/add_items/
{% endblock %}
{% block content %}
    <div class="row">
        <div class="large-6 columns">
            <div class="success_msg"></div>
            <div class="error_msg"></div>
        </div>
    </div>
    <div class="row">
        <div class="large-6 columns">
            <form action="" method="post">
                {% csrf_token %}
                <div  class="marginTop wrapper-manual-number">
                    <label class="required" for="id_manualNumber">{% trans "Number" %}</label>
                    {{ form.manualNumber }}
                    <div class="form_error_text cart_number_error">{% trans "Required field" %}</div>
                    <div class="marginTop">&nbsp;</div>
                </div>
                <div class="row">
                    <div class="large-6 medium-6 columns">
                        <label for="id_filter_ca">{% trans "Filter" %}</label>
                        <input class="inline left" id="id_filter_ca" name="filter_ca" type="text">
                        <img class="inline right filter_spinner" src="{{ STATIC_URL }}img/loader.gif" />
                    </div>
                    <div class="large-6 medium-6 columns">
                        <label class="required" for="id_cartName">{% trans "Cartridge name" %}</label>
                        <div class="input_row">
                            <select class="dinamic_list" id="id_cartName">
                                <option></option>
                            </select>
                            <a class="dj_button add" href="{% url 'index:add_name' %}"></a>
                        </div>
                        <div class="form_error_text cart_name_error">{% trans "Required field" %}</div>
                    </div>
                </div>
                
                <div class="row">
                    <div  class="marginTop wrapper-manual-datetime">
                        <div class="large-6 medium-6 columns">
                            <label for="id_date" class="required">{% trans "Date added" %}</label>
                            <div class="calendar">{{ form.set_date }}</div>
                        </div>
                        <div class="large-6 medium-6 columns">
                            <label for="id_time" class="required">{% trans "Time added" %}</label>
                            {{ form.time }}
                            <div class="form_error_text time_error">{% trans "The field must be seleced" %}</div>
                        </div>
                    </div>
                </div>

                <label class="required marginTop" for="{{ form.storages.id_for_label }}">{% trans "Storage" %}</label>
                <div class="input_row">
                    {{ form.storages }} <a class="dj_button add" href="{% url 'storages:add_s' %}"></a>
                </div>
                <div class="form_error_text cart_sklad_error">{% trans "The field must be seleced" %}</div>

                <label class="marginTop" for="{{ form.doc.id_for_label }}">{% trans "Delivery agreement" %}</label>
                <div class="input_row">
                    {{ form.doc }} <a class="dj_button add" href="{% url 'docs:delivery' %}"></a>
                </div>

                <div class="row">
                    <div class="small-4 columns">
                        <div class="wrapper-counter-items">
                            <label class='required marginTop' for="{{ form.cartCount.id_for_label }}">{% trans "Amount items" %}</label>
                            <div class="input_row">
                                {{ form.cartCount }}
                            </div>
                            <div class="form_error_text cart_count_error">{% trans "The field must be greater than zero" %}</div>
                        </div>
                    </div>
                    <div class="small-4 columns">
                        <label class='marginTop'>{% trans "Manual entry numbers" %}</label>
                        <div class="myswitch">
                            <input id="cmn-toggle-1" class="cmn-toggle-1 cmn-toggle cmn-toggle-round" type="checkbox">
                            <label for="cmn-toggle-1"></label>
                        </div>
                    </div>
                    <div class="small-4 columns">
                        <label class='marginTop'>{% trans "Manual date setting" %}</label>
                        <div class="myswitch">
                            <input id="cmn-toggle-2" class="cmn-toggle-2 cmn-toggle cmn-toggle-round" type="checkbox">
                            <label for="cmn-toggle-2"></label>
                        </div>
                    </div>
                </div>
                
                <div class="marginTop"></div>
                <div class="marginTop">
                    <input type="submit" value='{% trans "Add (Enter)" %}' class="button success add_items no_follow" data="full" />
                    &nbsp;&nbsp;&nbsp;
                    <a href="" class="button back no_follow"/>{% trans "Back" %}</a>&nbsp;&nbsp;&nbsp;
                    <img class="spinner" src="{{ STATIC_URL }}img/loader.gif" />
                </div>
            </form>
        </div>
        <div class="large-6 column">
            <div class="text-right">
                <a class="download_pdf" href="#">{% trans "Download" %}</a>
                <img class="spinner_pdf" src="{{ STATIC_URL }}img/loader.gif" />
                <a href="#" data="full" class="generate_pdf button no_follow"/>{% trans "Generate PDF" %}</a>
                <a href="#" data="full" class="clear_session button no_follow"/>{% trans "Clear session" %}</a>
            </div>
            <div class="session_data">
                <p>{{ session }}</p>
            </div>
        </div>
    </div>
{% endblock %}
