{% extends "admin/change_form.html" %}

{% block field_sets %}
{{ block.super }}
<script>
(function () {
  const form = document.getElementById("projectbrief_form");
  if (!form) return;
  const fieldsets = form.querySelectorAll("fieldset.module.aligned");
  if (!fieldsets.length || form.querySelector(".project-brief-field-header")) return;
  const briefFieldset = fieldsets[0];
  const titleRow = briefFieldset.querySelector(".form-row.field-title");
  if (!titleRow) return;
  const header = document.createElement("div");
  header.className = "project-brief-field-header";
  header.innerHTML = "<span>Field</span><span>Lock</span><span>Show on website</span>";
  briefFieldset.classList.add("project-brief-fieldset");
  briefFieldset.insertBefore(header, titleRow);
})();
</script>
{% endblock %}
