Template fix for BOM upload

This commit is contained in:
Oliver 2021-11-03 11:44:42 +11:00
parent 96a89558b4
commit c636f13ba8

View File

@ -8,58 +8,55 @@
{% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %} {% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %}
{% endblock %} {% endblock %}
{% block page_content %} {% block heading %}
{% trans "Upload Bill of Materials" %}
{% endblock %}
<div class='panel' id='panel-upload-file'> {% block actions %}
<div class='panel-heading'> {% endblock %}
{% block heading %}
<h4>{% trans "Upload Bill of Materials" %}</h4> {% block page_info %}
{{ wizard.form.media }} <div class='panel-content'>
{% endblock %} <p>{% blocktrans with step=wizard.steps.step1 count=wizard.steps.count %}Step {{step}} of {{count}}{% endblocktrans %}
{% if description %}- {{ description }}{% endif %}</p>
<form action="" method="post" class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% block form_buttons_top %}
{% endblock form_buttons_top %}
{% block form_alert %}
<div class='alert alert-info alert-block'>
<strong>{% trans "Requirements for BOM upload" %}:</strong>
<ul>
<li>{% trans "The BOM file must contain the required named columns as provided in the " %} <strong><a href="/part/bom_template/">{% trans "BOM Upload Template" %}</a></strong></li>
<li>{% trans "Each part must already exist in the database" %}</li>
</ul>
</div> </div>
<div class='panel-content'> {% endblock %}
{% block details %}
<p>{% blocktrans with step=wizard.steps.step1 count=wizard.steps.count %}Step {{step}} of {{count}}{% endblocktrans %} <table class='table table-striped' style='margin-top: 12px; margin-bottom: 0px'>
{% if description %}- {{ description }}{% endif %}</p> {{ wizard.management_form }}
{% block form_content %}
{% crispy wizard.form %}
{% endblock form_content %}
</table>
<form action="" method="post" class='js-modal-form' enctype="multipart/form-data"> {% block form_buttons_bottom %}
{% csrf_token %} {% if wizard.steps.prev %}
{% load crispy_forms_tags %} <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}" class="save btn btn-outline-secondary">{% trans "Previous Step" %}</button>
{% endif %}
{% block form_buttons_top %} <button type="submit" class="save btn btn-outline-secondary">{% trans "Upload File" %}</button>
{% endblock form_buttons_top %} </form>
{% endblock form_buttons_bottom %}
{% block form_alert %} </div>
<div class='alert alert-info alert-block'> {% endblock page_info %}
<strong>{% trans "Requirements for BOM upload" %}:</strong>
<ul>
<li>{% trans "The BOM file must contain the required named columns as provided in the " %} <strong><a href="/part/bom_template/">{% trans "BOM Upload Template" %}</a></strong></li>
<li>{% trans "Each part must already exist in the database" %}</li>
</ul>
</div>
{% endblock %}
<table class='table table-striped' style='margin-top: 12px; margin-bottom: 0px'>
{{ wizard.management_form }}
{% block form_content %}
{% crispy wizard.form %}
{% endblock form_content %}
</table>
{% block form_buttons_bottom %}
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}" class="save btn btn-outline-secondary">{% trans "Previous Step" %}</button>
{% endif %}
<button type="submit" class="save btn btn-outline-secondary">{% trans "Upload File" %}</button>
</form>
{% endblock form_buttons_bottom %}
{% endblock details %}
</div>
{% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
enableSidebar('bom-upload');
{% endblock js_ready %} {% endblock js_ready %}