From 01e984c560a177f42ddc35a4d74e52b70356179d Mon Sep 17 00:00:00 2001 From: TheRON Date: Sat, 6 Jun 2026 11:41:24 -0400 Subject: [PATCH] Updated --- .../assoc_profile/assoc_profile_manage.php | 71 +++++++++++++++---- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/hubzilla/addon/assoc_profile/assoc_profile_manage.php b/hubzilla/addon/assoc_profile/assoc_profile_manage.php index d796a74..f10a884 100644 --- a/hubzilla/addon/assoc_profile/assoc_profile_manage.php +++ b/hubzilla/addon/assoc_profile/assoc_profile_manage.php @@ -3,7 +3,7 @@ /** * Association Profile — Management Renderer * Operator-only. Called from assoc_profile.php content router. - * v0.2.0 — search, filter, paginate, bulk export, import with diff, delete. + * v0.3.0 — tabbed edit form; all other functions unchanged from v0.2.0. */ // ---------------------------------------------------------------------------- @@ -165,7 +165,7 @@ function assoc_render_add_association_form() { } // ---------------------------------------------------------------------------- -// EDIT ASSOCIATION +// EDIT ASSOCIATION — tabbed by field group // ---------------------------------------------------------------------------- function assoc_render_edit_association_form($slug) { @@ -183,6 +183,15 @@ function assoc_render_edit_association_form($slug) { $name = $entry['assoc_legal_name'] ?? $slug; + // Short tab labels — operator-defined groups map to shorter labels for tab nav + $tab_labels = [ + 'Identity' => 'Identity', + 'Physical Structure' => 'Buildings', + 'Governance and Management' => 'Governance', + 'Legal and Compliance' => 'Compliance', + 'Record' => 'Record', + ]; + $out = '
'; $out .= '
'; $out .= '
'; @@ -203,12 +212,39 @@ function assoc_render_edit_association_form($slug) { $out .= ''; $out .= ''; + // Tab nav + $out .= ''; - $out .= '
'; - $out .= '

' . assoc_h($group) . '

'; + // Tab panes + $out .= '
'; + $first = true; + foreach ($groups as $group) { + $group_fields = $by_group[$group] ?? []; + if (empty($group_fields)) continue; + $tab_id = 'tab-' . preg_replace('/[^a-z0-9]/', '-', strtolower($group)); + $active = $first ? 'show active' : ''; + + $out .= '
'; foreach ($group_fields as $f) { $nick = $f['nickname']; @@ -239,30 +275,35 @@ function assoc_render_edit_association_form($slug) { } $out .= ''; } else { - $width = in_array($nick, ['assoc_legal_name','assoc_street','assoc_cai_listing', + $wide = in_array($nick, ['assoc_legal_name','assoc_street','assoc_cai_listing', 'assoc_bbb_standing','assoc_idfpr_complaint', 'assoc_litigation_active','assoc_liens_active', - 'assoc_mgmt_contact']) ? '100%' : '24rem'; + 'assoc_mgmt_contact']); $out .= ''; + value="' . assoc_h($val) . '"' + . ($wide ? '' : ' style="max-width:24rem;"') . '>'; } $out .= '
'; } - $out .= '
'; - } - $out .= '
'; - $out .= ''; + $out .= '
'; // tab-pane + $first = false; + } + $out .= '
'; // tab-content + + // Save bar below tabs + $out .= '
'; + $out .= ' '; $out .= 'Cancel'; - $out .= '
'; + $out .= '
'; + $out .= ''; // Delete section $out .= '
'; $out .= '
Delete Association
'; - $out .= '

This removes ' . assoc_h($name) . ' from the registry permanently. '; - $out .= 'You must also remove the corresponding entry from vs01/config.json manually.

'; + $out .= '

Permanently removes ' . assoc_h($name) . ' from the registry. '; + $out .= 'You must also remove the entry from vs01/config.json manually.

'; $out .= '
'; $out .= assoc_csrf_token();