snapshot: preserve builder section-rules layout refinement

This commit is contained in:
Md Bayazid Bostame
2026-03-27 21:18:03 +01:00
parent 61e3fae18d
commit 855eb8e02f
3 changed files with 31 additions and 33 deletions

View File

@@ -1,4 +1,5 @@
from pathlib import Path
import re
from datetime import timedelta
from tempfile import NamedTemporaryFile
import json
@@ -2746,10 +2747,13 @@ def form_builder_page(request):
cfg = section_configs.get(key)
custom_cfg = custom_section_map.get(key)
is_custom = custom_cfg is not None
raw_title = section_labels.get(key, key)
display_title = re.sub(r'^\d+\.\s*', '', raw_title) if not is_custom else raw_title
section_rule_items.append(
{
'key': key,
'title': section_labels.get(key, key),
'title': raw_title,
'display_title': display_title,
'is_visible': bool(custom_cfg.is_active) if is_custom else (True if not cfg else cfg.is_visible),
'locked': False if is_custom else (key in locked_sections and not can_override_locked_builder_rules),
'is_custom': is_custom,