Merge "Fix various Networking forms urls"

This commit is contained in:
Jenkins 2015-04-24 19:41:10 +00:00 committed by Gerrit Code Review
commit b81e9f63e6
3 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ class AddView(forms.ModalFormView):
context['network_id'] = self.kwargs['network_id']
args = (self.kwargs['network_id'],)
context['submit_url'] = reverse(self.submit_url, args=args)
context['cancel_url'] = reverse(self.failure_url, args=args)
return context
def get_initial(self):

View File

@ -61,6 +61,7 @@ class CreateView(forms.ModalFormView):
context['network'] = self.get_object()
args = (self.kwargs['network_id'],)
context['submit_url'] = reverse(self.submit_url, args=args)
context['cancel_url'] = reverse(self.url, args=args)
return context
def get_initial(self):

View File

@ -111,6 +111,8 @@ class UpdateView(forms.ModalFormView):
context['network_id'] = port['network_id']
args = (self.kwargs['network_id'], self.kwargs['port_id'],)
context['submit_url'] = reverse(self.submit_url, args=args)
context['cancel_url'] = reverse(self.success_url,
args=(self.kwargs['network_id'],))
return context
def get_initial(self):