You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When creating a "Button" via Bootstrap4 "Link / Button" plugin, element should look like a button (but user must set "Type" to see button).
Link type
Type
Describe the solution you'd like
Ideas:
A. User is forced to choose type. ⚠️ But forcing choice for Link type of "Link" is unnecessary.
B. Form sets type dynamically. ⚠️ But what if user already made correct "Type" choice before changing "Link type"?
Describe alternatives you've considered
Editor always must choose "Type", but won't know that unless they see link (set as "Button") does not look like a button, or have learned already to set "Type".
Additional context
Solution proposed by AI, which could be integrated into bootstrap4_link/extend.py, is to require the field:
fromdjangoimportformsfromdjangocms_bootstrap4.contrib.bootstrap4_link.modelsimportBootstrap4LinkclassBootstrap4LinkForm(forms.ModelForm):
classMeta:
model=Bootstrap4Linkfields="__all__"def__init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# example: make link_context and link_size optionalself.fields["link_context"].required=Falseself.fields["link_size"].required=False
Important
How to prevent "Primary" being set for Links? It is okay if it is (CSS supports it), but it is unnecessary.
Is your feature request related to a problem? Please describe.
When creating a "Button" via Bootstrap4 "Link / Button" plugin, element should look like a button (but user must set "Type" to see button).
Describe the solution you'd like
Ideas:
Describe alternatives you've considered
Editor always must choose "Type", but won't know that unless they see link (set as "Button") does not look like a button, or have learned already to set "Type".
Additional context
Solution proposed by AI, which could be integrated into
bootstrap4_link/extend.py, is to require the field:Important
How to prevent "Primary" being set for Links? It is okay if it is (CSS supports it), but it is unnecessary.