From b0f6c7ac36e432e4090499a4dbdf5c412d08e60e Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Fri, 27 Sep 2019 14:11:32 +0200
Subject: [PATCH] Help text and field order.

---
 .../0005_alter_is_archived_field_on_terms.py   | 18 ++++++++++++++++++
 opentech/apply/categories/models.py            | 13 ++++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)
 create mode 100644 opentech/apply/categories/migrations/0005_alter_is_archived_field_on_terms.py

diff --git a/opentech/apply/categories/migrations/0005_alter_is_archived_field_on_terms.py b/opentech/apply/categories/migrations/0005_alter_is_archived_field_on_terms.py
new file mode 100644
index 000000000..5d34f431c
--- /dev/null
+++ b/opentech/apply/categories/migrations/0005_alter_is_archived_field_on_terms.py
@@ -0,0 +1,18 @@
+# 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'),
+        ),
+    ]
diff --git a/opentech/apply/categories/models.py b/opentech/apply/categories/models.py
index 829230633..a21ec1a12 100644
--- a/opentech/apply/categories/models.py
+++ b/opentech/apply/categories/models.py
@@ -51,15 +51,18 @@ class MetaTerm(index.Indexed, MP_Node):
     name = models.CharField(
         max_length=50, unique=True, help_text='Keep the name short, ideally one word.'
     )
-    is_archived = models.BooleanField(default=False, verbose_name=_("Archived"))
-    help_text = RichTextField(features=[
-        'h2', 'h3', 'bold', 'italic', 'link', 'hr', 'ol', 'ul'], blank=True)
+    is_archived = models.BooleanField(
+        default=False, verbose_name=_("Archived"),
+        help_text='Archived terms can be viewed but not set on content.'
+    )
     filter_on_dashboard = models.BooleanField(
         default=True, help_text='Make available to filter on dashboard'
     )
     available_to_applicants = models.BooleanField(
         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_order_index = models.IntegerField(blank=True, default=0, editable=False)
@@ -69,14 +72,14 @@ class MetaTerm(index.Indexed, MP_Node):
     node_order_by = ['node_order_index', 'name']
 
     panels = [
-        FieldPanel('parent'),
         FieldPanel('name'),
+        FieldPanel('parent'),
         MultiFieldPanel(
             [
                 FieldPanel('is_archived'),
-                FieldPanel('help_text'),
                 FieldPanel('filter_on_dashboard'),
                 FieldPanel('available_to_applicants'),
+                FieldPanel('help_text'),
             ],
             heading="Options",
         ),
-- 
GitLab