Always pass 'modal' context variable to workflow template

Workflow templates rely on 'modal' context variable to be true for
modal dialogs. Still, when rendering from WorkflowView,
this variable is missing. This causes e.g. absent cancel and close
buttons in flavor creating dialog (and also affects Tuskar UI).

Change-Id: I76b1f0b97c14280db7cb880651e663147103438f
Closes-Bug: #1273874
This commit is contained in:
Dmitry Tantsur 2014-02-19 05:27:52 -05:00
parent 3cc174624e
commit 07be868156
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,8 @@ class WorkflowView(generic.TemplateView):
next = self.request.REQUEST.get(workflow.redirect_param_name, None)
context['REDIRECT_URL'] = next
context['layout'] = self.get_layout()
# For consistency with Workflow class
context['modal'] = 'modal' in context['layout']
if ADD_TO_FIELD_HEADER in self.request.META:
context['add_to_field'] = self.request.META[ADD_TO_FIELD_HEADER]