<commit_before>{% extends "part/part_base.html" %}
{% load inventree_extras %}
{% load i18n %}
{% load static %}

{% block sidebar %}
{% url "part-detail" part.id as url %}
{% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %}
{% endblock %}

{% block page_content %}

<div class='panel' id='panel-upload-file'>
    <div class='panel-heading'>
        {% block heading %}
        <h4>{% trans "Upload Bill of Materials" %}</h4>
        {{ wizard.form.media }}
        {% endblock %}
    </div>
    <div class='panel-content'>
        {% block details %}

        <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>
        {% 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.super }}
{% endblock js_ready %}<commit_msg>Template fix for BOM upload<commit_after>{% extends "part/part_base.html" %}
{% load inventree_extras %}
{% load i18n %}
{% load static %}

{% block sidebar %}
{% url "part-detail" part.id as url %}
{% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %}
{% endblock %}

{% block heading %}
{% trans "Upload Bill of Materials" %}
{% endblock %}

{% block actions %}
{% endblock %}

{% block page_info %}
<div class='panel-content'>
    <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>
    {% 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 %}
</div>
{% endblock page_info %}

{% block js_ready %}
{{ block.super }}

enableSidebar('bom-upload');

{% endblock js_ready %}
{'fraction_non_alphanumeric': 0.1741700773078672, 'fraction_numerical': 0.0031832651205093224, 'mean_word_length': 3.0283882783882783, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5009036', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1324, 'n_words': 353}