Commit 1774bcf8 authored by detraz's avatar detraz

Frontend fix sur les editions de profils de port

parent 54273c29
...@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %} {% endif %}
<form class="form" method="post"> <form class="form" method="post">
{% csrf_token %} {% csrf_token %}
{% massive_bootstrap_form topoform 'room,related,machine_interface,members' %} {% massive_bootstrap_form topoform 'room,related,machine_interface,members,vlan_tagged' %}
{% bootstrap_button action_name icon='ok' button_class='btn-success' %} {% bootstrap_button action_name icon='ok' button_class='btn-success' %}
</form> </form>
<br /> <br />
......
...@@ -1005,7 +1005,7 @@ def new_port_profile(request): ...@@ -1005,7 +1005,7 @@ def new_port_profile(request):
if port_profile.is_valid(): if port_profile.is_valid():
port_profile.save() port_profile.save()
messages.success(request, _("The port profile was created.")) messages.success(request, _("The port profile was created."))
return redirect(reverse('topologie:index')) return redirect(reverse('topologie:index-port-profile'))
return form( return form(
{'topoform': port_profile, 'action_name': _("Create")}, {'topoform': port_profile, 'action_name': _("Create")},
'topologie/topo.html', 'topologie/topo.html',
...@@ -1023,7 +1023,7 @@ def edit_port_profile(request, port_profile, **_kwargs): ...@@ -1023,7 +1023,7 @@ def edit_port_profile(request, port_profile, **_kwargs):
if port_profile.changed_data: if port_profile.changed_data:
port_profile.save() port_profile.save()
messages.success(request, _("The port profile was edited.")) messages.success(request, _("The port profile was edited."))
return redirect(reverse('topologie:index')) return redirect(reverse('topologie:index-port-profile'))
return form( return form(
{'topoform': port_profile, 'action_name': _("Edit")}, {'topoform': port_profile, 'action_name': _("Edit")},
'topologie/topo.html', 'topologie/topo.html',
...@@ -1043,7 +1043,7 @@ def del_port_profile(request, port_profile, **_kwargs): ...@@ -1043,7 +1043,7 @@ def del_port_profile(request, port_profile, **_kwargs):
except ProtectedError: except ProtectedError:
messages.success(request, messages.success(request,
_("Impossible to delete the port profile.")) _("Impossible to delete the port profile."))
return redirect(reverse('topologie:index')) return redirect(reverse('topologie:index-port-profile'))
return form( return form(
{'objet': port_profile, 'objet_name': _("Port profile")}, {'objet': port_profile, 'objet_name': _("Port profile")},
'topologie/delete.html', 'topologie/delete.html',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment