Preserve add-to-field after form error.

Fixes bug 1037302.

Change-Id: I827f1b74efc6835dfac1fdcdc7c2a7c12af421eb
This commit is contained in:
Gabriel Hurley
2012-09-07 15:41:00 -07:00
parent 85b0bfe68e
commit 8756b3b2ad
4 changed files with 12 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ from django.views import generic
from horizon import exceptions
from horizon import messages
from horizon.forms.views import ADD_TO_FIELD_HEADER
from horizon.openstack.common import jsonutils
@@ -93,6 +94,8 @@ class WorkflowView(generic.TemplateView):
context['REDIRECT_URL'] = next
if self.request.is_ajax():
context['modal'] = True
if ADD_TO_FIELD_HEADER in self.request.META:
context['add_to_field'] = self.request.META[ADD_TO_FIELD_HEADER]
return context
def get_template_names(self):