mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<button class='btn btn-success' id='duplicate-part'>Copy Part</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -95,4 +95,17 @@
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#duplicate-part").click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'part-create' %}",
|
||||
{
|
||||
follow: true,
|
||||
data: {
|
||||
copy_part: {{ part.id }},
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user