Fix issue with some modals are missing backdrop

Some modal views are inheriting from ModalFormMixin directly instead of
from ModalFormView (i.e. NonMembersView). This causes inconsistency with
some modal does not have a backdrop (not inheriting ModalBackdropMixin).
There are 7 places that inherit from ModalFormView directly now, and
they appear to be needing a backdrop; it'd be logical that
ModalFormMixin inherit from ModalBackdropMixin.

Change-Id: Id878a82341c8e84d5c0ca798aa648a8e7940df0e
Closes-Bug: #1545892
This commit is contained in:
Alan Fung 2016-02-15 18:01:13 -08:00
parent cda9604792
commit f195fea939
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class ModalBackdropMixin(object):
return context
class ModalFormMixin(object):
class ModalFormMixin(ModalBackdropMixin):
def get_template_names(self):
if self.request.is_ajax():
if not hasattr(self, "ajax_template_name"):
@ -77,7 +77,7 @@ class ModalFormMixin(object):
return context
class ModalFormView(ModalBackdropMixin, ModalFormMixin, views.HorizonFormView):
class ModalFormView(ModalFormMixin, views.HorizonFormView):
"""The main view class from which all views which handle forms in Horizon
should inherit. It takes care of all details with processing
:class:`~horizon.forms.base.SelfHandlingForm` classes, and modal concerns