Merge "Fix various Networking forms urls"
This commit is contained in:
commit
b81e9f63e6
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user