<div style="text-align: center; margin: 0 auto; width: 800px; padding-top: 100px;">
{% if error is defined %}
        <div class="ui large error message center aligned">
            <i class="close icon"></i>
            <div  class="ui header center aligned">{{ error }}</div>
        </div>
    {% endif %}

        <div {% if errors is defined %}{% else %}style="display: none;"{% endif %} id="divErrors" class="ui large error message center aligned">
            <i class="close icon"></i>
            <div id="divErrorsContent" class="ui header center aligned">
            {% for error in errors %}
                <span style="font-size: 14px;">{{ error }}<br/></span>
            {% endfor %}
            </div>
        </div>

    {% if success is defined %}
        <div class="ui large success message center aligned">
            <i class="close icon"></i>
            <div  class="ui header center aligned">{{ success }}</div>
        </div>
    {% endif %}
	{% if warnings is defined and (warnings | length) > 0 %}
        <div class="ui large warning message center aligned">
            <i class="close icon"></i>
            <div  class="ui header center aligned">
			{% for warning in warnings %}
                <span style="font-size: 14px;">{{ warning }}<br/></span>
            {% endfor %}
			</div>
        </div>
    {% endif %}
</div>
<div style="text-align: center; margin: 0 auto; width: 500px; padding-top: 20px;">
    
    <div class="ui message">
        <form enctype="multipart/form-data" action="docs.php?action=generate" id="generateForm" method="post" class="ui form">
            <div class="field">
                <label>Magazyn</label>
                <select class="ui fluid search dropdown" name="magazyn" id="selectMagazyn">
                    <option value="0">Wybierz magazyn</option>
                    {% for magazyn in magazyny %}
                        <option value="{{ magazyn.mag_Id }}">{{ magazyn.mag_Nazwa }}</option>
                    {% endfor %}
                </select>
            </div>
            <div class="field">
                <label>Typ dokumentu</label>
                <select class="ui fluid search dropdown" name="typ" id="selectTyp">
                    <option value="1">Wydanie zewnętrzne</option>
                    <option value="2">Przyjęcie zewnętrzne</option>
                </select>
            </div>
            <div style="text-align: left;" class="field">
                <div class="ui checkbox">
                    <input type="checkbox" tabindex="0" value="1" id="multiCheckbox" name="multi" class="hidden">
                    <label>Wystaw więcej dokumentów niż jeden</label>
                </div>
            </div>
            <div class="field">
                <label>Numer zamówienia</label>
                <select class="ui fluid search dropdown" name="zamowienie" id="selectOrder">
                    <option value="0">Wybierz magazyn</option>
                </select>
            </div>
            <div class="field">
                <label>Plik .csv</label>
                <div class="ui input">
                    <input type="file" name="plik" id="selectPlik">
                </div>
            </div>
            <button style="margin-top: 10px" type="button" id="submitForm" class="ui primary button">Generuj</button>
        </form>
    </div>
</div>