From bdf7ecf5096b157629b902d10c4c83eab3ea48bd Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Fri, 19 Jan 2018 12:41:30 +0000
Subject: [PATCH] Make the categories collapsible

---
 opentech/public/projects/models.py                         | 7 ++++++-
 .../templates/projects/widgets/options_widget.html         | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/opentech/public/projects/models.py b/opentech/public/projects/models.py
index d1d2462ee..9dc4f6dac 100644
--- a/opentech/public/projects/models.py
+++ b/opentech/public/projects/models.py
@@ -10,6 +10,7 @@ from modelcluster.fields import ParentalKey
 from wagtail.wagtailadmin.edit_handlers import (
     FieldPanel,
     InlinePanel,
+    MultiFieldPanel,
     PageChooserPanel,
     StreamFieldPanel,
 )
@@ -124,7 +125,11 @@ class ProjectPage(FundingMixin, BasePage):
         InlinePanel('contact_details', label="Contact Details"),
         InlinePanel('related_pages', label="Related Projects"),
     ] + FundingMixin.content_panels + [
-        FieldPanel('categories', widget=CategoriesWidget),
+        MultiFieldPanel(
+            [FieldPanel('categories', widget=CategoriesWidget)],
+            heading="Categories",
+            classname="collapsible collapsed",
+        ),
     ]
 
     def category_options(self):
diff --git a/opentech/public/projects/templates/projects/widgets/options_widget.html b/opentech/public/projects/templates/projects/widgets/options_widget.html
index db195aa39..7c87506fb 100644
--- a/opentech/public/projects/templates/projects/widgets/options_widget.html
+++ b/opentech/public/projects/templates/projects/widgets/options_widget.html
@@ -1,5 +1,5 @@
 <li>
-<h2>{{ widget.attrs.label_tag }}</h2>
+<h1>{{ widget.attrs.label_tag }}</h1>
 <fieldset>
 {% with id=widget.attrs.id %}
 <ul{% if id %} id="{{ id }}"{% endif %}class="fields {% if widget.attrs.class %}{{ widget.attrs.class }}{% endif %}">{% for group, options, index in widget.optgroups %}
-- 
GitLab