From f195fea9390f7650c372b3e749c1ad0342e72036 Mon Sep 17 00:00:00 2001 From: Alan Fung Date: Mon, 15 Feb 2016 18:01:13 -0800 Subject: [PATCH] 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 --- horizon/forms/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/horizon/forms/views.py b/horizon/forms/views.py index f6276e31ca..fd6efcc64a 100644 --- a/horizon/forms/views.py +++ b/horizon/forms/views.py @@ -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