mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
17186 change custom link button color from outline-dark to outline-secondary
This commit is contained in:
parent
96802b4edb
commit
2dacdcec27
27
netbox/extras/migrations/0116_custom_link_button_color.py
Normal file
27
netbox/extras/migrations/0116_custom_link_button_color.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Generated by Django 5.0.8 on 2024-08-22 19:39
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
def update_link_buttons(apps, schema_editor):
|
||||||
|
CustomLink = apps.get_model('extras', 'CustomLink')
|
||||||
|
CustomLink.objects.filter(button_class='outline-dark').update(button_class='outline-secondary')
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('extras', '0115_convert_dashboard_widgets'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customlink',
|
||||||
|
name='button_class',
|
||||||
|
field=models.CharField(default='outline-secondary', max_length=30),
|
||||||
|
),
|
||||||
|
migrations.RunPython(
|
||||||
|
code=update_link_buttons,
|
||||||
|
reverse_code=migrations.RunPython.noop
|
||||||
|
),
|
||||||
|
]
|
@ -84,7 +84,7 @@ class ButtonColorChoices(ChoiceSet):
|
|||||||
"""
|
"""
|
||||||
Map standard button color choices to Bootstrap 3 button classes
|
Map standard button color choices to Bootstrap 3 button classes
|
||||||
"""
|
"""
|
||||||
DEFAULT = 'outline-dark'
|
DEFAULT = 'outline-secondary'
|
||||||
BLUE = 'blue'
|
BLUE = 'blue'
|
||||||
INDIGO = 'indigo'
|
INDIGO = 'indigo'
|
||||||
PURPLE = 'purple'
|
PURPLE = 'purple'
|
||||||
|
Loading…
Reference in New Issue
Block a user