{% extends '_modal.html' %}
{% load i18n %}
{% block modal_id %}asset_import_modal{% endblock %}
{% block modal_title%}{% trans "Import asset" %}{% endblock %}
{% block modal_body %}
<p class="text-success">{% trans "Download template or use export excel format" %}</p>
<form method="post" action="{% url 'assets:asset-import' %}" id="fm_asset_import" enctype="multipart/form-data">
    {% csrf_token %}
    <div class="form-group">
        <label class="control-label" for="id_assets">{% trans "Template" %}</label>
        <a href="{{ MEDIA_URL }}files/asset_import_template.xlsx" style="display: block">{% trans 'Download' %}</a>
    </div>
    <div class="form-group">
        <label class="control-label" for="id_users">{% trans "Asset excel file" %}</label>
        <input id="id_assets" type="file" name="file" />
    </div>
</form>
<p>
    <p class="text-success" id="id_created"></p>
    <p id="id_created_detail"></p>
    <p class="text-warning" id="id_updated"></p>
    <p id="id_updated_detail"></p>
    <p class="text-danger" id="id_failed"></p>
    <p id="id_failed_detail"></p>
</p>
{% endblock %}
{% block modal_confirm_id %}btn_asset_import{% endblock %}
