Edit Association Diagnostic Profile '; } // ---------------------------------------------------------------------------- // PROFILE VIEW RENDERER // ---------------------------------------------------------------------------- function assoc_render_view($entry) { // Render all field groups as a read-only diagnostic profile block. $def = assoc_load_fields(); $groups = $def['groups'] ?? []; $fields = $def['fields'] ?? []; $by_group = []; foreach ($fields as $f) { $by_group[$f['group']][] = $f; } $out = '
'; $out .= '

Association Diagnostic Profile

'; foreach ($groups as $group) { $group_fields = $by_group[$group] ?? []; if (empty($group_fields)) continue; $out .= '
'; $out .= '
' . assoc_h($group) . '
'; foreach ($group_fields as $f) { $nick = $f['nickname']; $val = $entry[$nick] ?? ''; if ($val === '') $val = '—'; if ($val === 'UNK') $val = 'Unknown — not yet verified'; $out .= '
'; $out .= '' . assoc_h($f['label'] ?? $nick) . ': '; $out .= '' . assoc_h($val) . ''; $out .= '
'; } $out .= '
'; } $out .= '
'; return $out; }