mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
moving towards implementing bom upload as a page form rather than a modal form
This commit is contained in:
parent
a23595c28d
commit
3c44fcaf5b
@ -34,7 +34,9 @@
|
||||
<div id='button-toolbar' class="btn-group" role="group" aria-label="...">
|
||||
{% if editing_enabled %}
|
||||
<button class='btn btn-default' type='button' title='Remove selected BOM items' id='bom-item-delete'><span class='glyphicon glyphicon-trash'></span></button>
|
||||
<button class='btn btn-default' type='button' title='Import BOM data' id='bom-upload'><span class='glyphicon glyphicon-open-file'></span></button>
|
||||
<a href="{% url 'upload-bom' part.id %}">
|
||||
<button class='btn btn-default' type='button' title='Import BOM data' id='bom-upload'><span class='glyphicon glyphicon-open-file'></span></button>
|
||||
</a>
|
||||
<button class='btn btn-default' type='button' title='New BOM Item' id='bom-item-new'><span class='glyphicon glyphicon-plus'></span></button>
|
||||
<button class='btn btn-default' type='button' title='Finish Editing' id='editing-finished'><span class='glyphicon glyphicon-ok'></span></button>
|
||||
{% elif part.active %}
|
||||
@ -107,12 +109,6 @@
|
||||
);
|
||||
});
|
||||
|
||||
$("#bom-upload").click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'bom-import' part.id %}",
|
||||
);
|
||||
});
|
||||
|
||||
{% else %}
|
||||
|
||||
$("#validate-bom").click(function() {
|
||||
|
28
InvenTree/part/templates/part/bom_upload/upload_file.html
Normal file
28
InvenTree/part/templates/part/bom_upload/upload_file.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "part/part_base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "part/tabs.html" with tab='bom' %}
|
||||
|
||||
<h4>Upload Bill of Materials</h4>
|
||||
<hr>
|
||||
|
||||
<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>
|
||||
|
||||
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
<input type='hidden' name='form_step' value='select_file'/>
|
||||
|
||||
{% crispy form %]
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
@ -22,12 +22,13 @@ part_detail_urls = [
|
||||
url(r'^edit/?', views.PartEdit.as_view(), name='part-edit'),
|
||||
url(r'^delete/?', views.PartDelete.as_view(), name='part-delete'),
|
||||
url(r'^bom-export/?', views.BomDownload.as_view(), name='bom-export'),
|
||||
url(r'^bom-import/?', views.BomUpload.as_view(), name='bom-import'),
|
||||
url(r'^validate-bom/', views.BomValidate.as_view(), name='bom-validate'),
|
||||
url(r'^duplicate/', views.PartDuplicate.as_view(), name='part-duplicate'),
|
||||
url(r'^make-variant/', views.MakePartVariant.as_view(), name='make-part-variant'),
|
||||
url(r'^pricing/', views.PartPricing.as_view(), name='part-pricing'),
|
||||
|
||||
url(r'^bom-upload/?', views.BomUpload.as_view(template_name='part/bom_upload/upload_file.html'), name='upload-bom'),
|
||||
|
||||
url(r'^variants/?', views.PartDetail.as_view(template_name='part/variants.html'), name='part-variants'),
|
||||
url(r'^stock/?', views.PartDetail.as_view(template_name='part/stock.html'), name='part-stock'),
|
||||
url(r'^allocation/?', views.PartDetail.as_view(template_name='part/allocation.html'), name='part-allocation'),
|
||||
|
Loading…
Reference in New Issue
Block a user