Skip to content
Snippets Groups Projects
Commit b0f6c7ac authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Help text and field order.

parent 520b29d1
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.1.11 on 2019-09-27 17:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('categories', '0004_rename_meta_categories_to_meta_terms'),
]
operations = [
migrations.AlterField(
model_name='metaterm',
name='is_archived',
field=models.BooleanField(default=False, help_text='Archived terms can be viewed but not set on content.', verbose_name='Archived'),
),
]
...@@ -51,15 +51,18 @@ class MetaTerm(index.Indexed, MP_Node): ...@@ -51,15 +51,18 @@ class MetaTerm(index.Indexed, MP_Node):
name = models.CharField( name = models.CharField(
max_length=50, unique=True, help_text='Keep the name short, ideally one word.' max_length=50, unique=True, help_text='Keep the name short, ideally one word.'
) )
is_archived = models.BooleanField(default=False, verbose_name=_("Archived")) is_archived = models.BooleanField(
help_text = RichTextField(features=[ default=False, verbose_name=_("Archived"),
'h2', 'h3', 'bold', 'italic', 'link', 'hr', 'ol', 'ul'], blank=True) help_text='Archived terms can be viewed but not set on content.'
)
filter_on_dashboard = models.BooleanField( filter_on_dashboard = models.BooleanField(
default=True, help_text='Make available to filter on dashboard' default=True, help_text='Make available to filter on dashboard'
) )
available_to_applicants = models.BooleanField( available_to_applicants = models.BooleanField(
default=False, help_text='Make available to applicants' default=False, help_text='Make available to applicants'
) )
help_text = RichTextField(features=[
'h2', 'h3', 'bold', 'italic', 'link', 'hr', 'ol', 'ul'], blank=True)
# node tree specific fields and attributes # node tree specific fields and attributes
node_order_index = models.IntegerField(blank=True, default=0, editable=False) node_order_index = models.IntegerField(blank=True, default=0, editable=False)
...@@ -69,14 +72,14 @@ class MetaTerm(index.Indexed, MP_Node): ...@@ -69,14 +72,14 @@ class MetaTerm(index.Indexed, MP_Node):
node_order_by = ['node_order_index', 'name'] node_order_by = ['node_order_index', 'name']
panels = [ panels = [
FieldPanel('parent'),
FieldPanel('name'), FieldPanel('name'),
FieldPanel('parent'),
MultiFieldPanel( MultiFieldPanel(
[ [
FieldPanel('is_archived'), FieldPanel('is_archived'),
FieldPanel('help_text'),
FieldPanel('filter_on_dashboard'), FieldPanel('filter_on_dashboard'),
FieldPanel('available_to_applicants'), FieldPanel('available_to_applicants'),
FieldPanel('help_text'),
], ],
heading="Options", heading="Options",
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment