mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Add button on part page to duplicate part
- Opens modal form - Takes user to created page
This commit is contained in:
parent
deaaa48b7d
commit
6de58edd41
@ -32,7 +32,7 @@
|
|||||||
<td><a href="{{ part.URL }}">{{ part.URL }}</a></td>
|
<td><a href="{{ part.URL }}">{{ part.URL }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<button class='btn btn-success' id='duplicate-part'>Copy Part</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -95,4 +95,17 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#duplicate-part").click(function() {
|
||||||
|
launchModalForm(
|
||||||
|
"{% url 'part-create' %}",
|
||||||
|
{
|
||||||
|
follow: true,
|
||||||
|
data: {
|
||||||
|
copy_part: {{ part.id }},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user