Skip to content

Commit

Permalink
fix navbar.py: import order
Browse files Browse the repository at this point in the history
  • Loading branch information
haricot committed Oct 28, 2020
1 parent 8e763fa commit 76cd22e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cmsplugin_cascade/bootstrap4/navbar.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.forms import widgets
from django.forms.fields import BooleanField, CharField, ChoiceField
from cmsplugin_cascade.fields import SizeField
from .plugin_base import BootstrapPluginBase
from cmsplugin_cascade.bootstrap4.jumbotron import ImageBackgroundMixin, JumbotronFormMixin
from django.conf import settings
from cmsplugin_cascade.bootstrap4.jumbotron import ImageBackgroundMixin
from cmsplugin_cascade.bootstrap4.container import ContainerFormMixin, ContainerGridMixin
from cmsplugin_cascade.image import ImageFormMixin, ImagePropertyMixin

from cmsplugin_cascade.bootstrap4.container import get_widget_choices, ContainerBreakpointsWidget
from cmsplugin_cascade.bootstrap4.image import get_image_tags
from .grid import Breakpoint
from cmsplugin_cascade.link.config import LinkPluginBase
from django.forms import widgets
from django.forms.fields import BooleanField, CharField, ChoiceField

from cms.plugin_pool import plugin_pool
from entangled.forms import EntangledModelFormMixin
from django.core.exceptions import ValidationError

import logging
logger = logging.getLogger('cascade')


class BootstrapNavbarFormMixin(EntangledModelFormMixin):
OPTION_NAV_COLLAPSE = [(c, c) for c in [ "inherit", "navbar-expand","navbar-expand-sm", "navbar-expand-md","navbar-expand-lg", "navbar-expand-xl"] ]
OPTION_NAV_COLOR = [(c, c) for c in [ "inherit", "navbar-light", "navbar-dark"]]
Expand Down Expand Up @@ -145,7 +144,7 @@ class BootstrapNavBrandPlugin(LinkPluginBase):
def get_child_css_classes(cls, obj):
child_css_classes = cls.super(BootstrapNavBrandPlugin, cls).get_child_css_classes(obj)
child_css_classes = obj.glossary.get('child_css_class')
if child_css_class:
if child_css_classes:
child_css_classes.append(css_class)
return css_classes

Expand Down Expand Up @@ -213,7 +212,7 @@ def get_css_classes(cls, obj):
def get_child_css_classes(cls, obj):
child_css_classes = cls.super(BootstrapNavBrandImagePlugin, cls).get_child_css_classes(obj)
child_css_classes = obj.glossary.get('child_css_class')
if child_css_class:
if child_css_classes:
child_css_classes.append(css_class)
return css_classes

Expand Down

0 comments on commit 76cd22e

Please sign in to comment.