2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 13:58:47 +00:00

select2ify part selection

This commit is contained in:
Oliver Walters 2019-07-07 11:24:40 +10:00
parent bd30ac037b
commit f251620917

View File

@ -47,7 +47,7 @@
{% for item in row.data %} {% for item in row.data %}
<td> <td>
{% if item.column.guess == 'Part' %} {% if item.column.guess == 'Part' %}
<select class='select' id='id_part_{{ row.index }}' name='part_select_{{ row.index }}'> <select class='select bomselect' id='id_part_{{ row.index }}' name='part_select_{{ row.index }}'>
<option value=''>---------</option> <option value=''>---------</option>
{% for part in allowed_parts_list %} {% for part in allowed_parts_list %}
<option value='{{ part.id }}'>{{ part.full_name }} - {{ part.description }}</option> <option value='{{ part.id }}'>{{ part.full_name }} - {{ part.description }}</option>
@ -72,3 +72,10 @@
</form> </form>
{% endblock %} {% endblock %}
{% block js_ready %}
{{ block.super }}
$('.bomselect').select2();
{% endblock %}