2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Pass file data through to the next form page

This commit is contained in:
Oliver Walters
2019-06-27 23:49:01 +10:00
parent a9396f4c74
commit 4648db6ce5
6 changed files with 161 additions and 42 deletions

View File

@@ -0,0 +1,38 @@
{% extends "modal_form.html" %}
{% load inventree_extras %}
{% block form %}
<h4>Step 2 of 3 - Select BOM Fields</h4>
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
<input type='hidden' name='form_step' value='select_fields'/>
<table class='table table-striped'>
<thead>
<tr>
</tr>
</thead>
<tbody>
{% for row in bom.rows %}
<tr>
{% for item in row %}
<td>
{{ item }}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</form>
<b>BOM Rows: {{ bom.row_count }}</b>
{% endblock %}

View File

@@ -2,9 +2,13 @@
{% block pre_form_content %}
<h4>Step 1 of 3 - Select BOM File</h4>
{{ block.super }}
<p>Select a BOM file to upload for <b>{{ part.name }} - <i>{{ part.description }}</i></b>.</p>
<p>Select a BOM file to upload for:<br>
<b>{{ part.name }} - <i>{{ part.description }}</i></b>
</p>
<p>The BOM file must contain the required named columns as provided in the <a href="/part/bom_template/">BOM Upload Template</a></a></p>
@@ -14,4 +18,8 @@
<li>Maximum of 1000 lines per BOM</li>
</ul>
{% endblock %}
{% block form_data %}
<input type='hidden' name='form_step' value='select_file'/>
{% endblock %}