mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix success_url for notes form
This commit is contained in:
parent
f0933f216c
commit
88ec40e454
@ -15,9 +15,8 @@
|
||||
<form method='POST'>
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form }}
|
||||
|
||||
<input type="submit" value='{% trans "Save Notes" %}'/>
|
||||
{{ form }}
|
||||
|
||||
</form>
|
||||
|
||||
@ -40,6 +39,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
$("#edit-notes").click(function() {
|
||||
location.href = "{% url 'part-notes' part.id %}?edit=1";
|
||||
|
@ -531,6 +531,11 @@ class PartNotes(UpdateView):
|
||||
|
||||
fields = ['notes']
|
||||
|
||||
def get_success_url(self):
|
||||
""" Return the success URL for this form """
|
||||
|
||||
return reverse('part-notes', kwargs={'pk': self.get_object().id})
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
||||
part = self.get_object()
|
||||
|
Loading…
Reference in New Issue
Block a user