Skip to content

Commit

Permalink
feat: refactor link / button plugin name
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelzinh3 committed Jan 10, 2024
1 parent c327bfd commit e01a872
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions app/nossas/plugins/cms_plugins/button.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
from django.utils.translation import ugettext_lazy as _

from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool


from djangocms_frontend.contrib.link.cms_plugins import LinkPlugin

from nossas.plugins.forms.buttonform import MyLinkForm
from nossas.plugins.forms.buttonform import LinkButtonForm

# from nossas.design.cms_plugins import UIPaddingMixin, UIBackgroundMixin, CMSUIPlugin
# from nossas.plugins.models.buttonmodel import Button
# from nossas.plugins.forms.buttonform import ButtonPluginForm


@plugin_pool.register_plugin
class MyLinkPlugin(LinkPlugin):
name = "MyLinkPlugin"
class LinkButtonPlugin(LinkPlugin):
name = _("Link / Botão")
module = "NOSSAS"
form = MyLinkForm
form = LinkButtonForm
# change_form_template = 'nossas/admin/link.html'
# model = Button
# form = ButtonPluginForm
Expand Down
2 changes: 1 addition & 1 deletion app/nossas/plugins/forms/buttonform.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]


class MyLinkForm(LinkForm):
class LinkButtonForm(LinkForm):
link_context = forms.ChoiceField(
label=_("Context"),
choices=CONTEXT_COLORS,
Expand Down

0 comments on commit e01a872

Please sign in to comment.