Home Information - Your home, your data, organized.
Python
Fixed subsystem settings display label
AI Agent94f4891b2eb3
diff --git a/src/hi/apps/config/templates/config/panes/subsystem_edit_content_body.html b/src/hi/apps/config/templates/config/panes/subsystem_edit_content_body.htmlindex d0b91f71..33fa2d3e 100644--- a/src/hi/apps/config/templates/config/panes/subsystem_edit_content_body.html+++ b/src/hi/apps/config/templates/config/panes/subsystem_edit_content_body.html@@ -10,10 +10,10 @@ This is what gets replaced on form submission{% block basic_info %}{% endblock %}{% block additional_actions %}-<h4 class="mb-0 text-muted">+<h4 class="mb-0 text-muted {{ DIVID.ATTR_V2_FORM_DISPLAY_LABEL_CLASS }}">{% for multi_edit_form_data in multi_edit_form_data_list %}{% if selected_subsystem_id == multi_edit_form_data.owner.id|stringformat:'s' %}- {{ multi_edit_form_data.owner.name }}+ {{ multi_edit_form_data.owner.name }} Settings{% endif %}{% empty %}System Settings@@ -39,7 +39,7 @@ This is what gets replaced on form submissionrole="tab"aria-controls="subsystem-{{ multi_edit_form_data.owner.id }}-panel"aria-selected="{% if selected_subsystem_id == multi_edit_form_data.owner.id|stringformat:'s' %}true{% else %}false{% endif %}"- onclick="window.Hi.attr.updateFormAction('{% url 'config_settings' subsystem_id=multi_edit_form_data.owner.id %}', '{{ attr_page_context.container_html_id }}')">+ onclick="window.Hi.attr.updateFormAction('{% url 'config_settings' subsystem_id=multi_edit_form_data.owner.id %}', '{{ attr_page_context.container_html_id }}', '{{ multi_edit_form_data.owner.name }} Settings')">{{ multi_edit_form_data.owner.name }}{% if multi_edit_form_data.error_count > 0 %}<span class="badge badge-danger ml-1">{{ multi_edit_form_data.error_count }}</span>diff --git a/src/hi/constants.py b/src/hi/constants.pyindex 8207ffd3..18b2e269 100644--- a/src/hi/constants.py+++ b/src/hi/constants.py@@ -117,6 +117,7 @@ DIVID = {'ATTR_V2_ATTRIBUTE_HEADER_CLASS': 'attr-v2-attribute-header','ATTR_V2_ATTRIBUTE_ACTIONS_CLASS': 'attr-v2-attribute-actions','ATTR_V2_ATTRIBUTE_VALUE_CLASS': 'attr-v2-attribute-value',+ 'ATTR_V2_FORM_DISPLAY_LABEL_CLASS': 'attr-v2-form-display-label','ATTR_V2_TEXT_VALUE_CLASS': 'attr-v2-text-value','ATTR_V2_SECRET_CHECKBOX_CLASS': 'attr-v2-secret-checkbox','ATTR_V2_INLINE_HISTORY_CLASS': 'attr-v2-inline-history',diff --git a/src/hi/static/js/attr.js b/src/hi/static/js/attr.jsindex 5519a33d..0d82cf74 100644--- a/src/hi/static/js/attr.js+++ b/src/hi/static/js/attr.js@@ -471,28 +471,36 @@// Container-aware utility function for updating form actions and browser history// This is a generic helper that can be called from template onclick handlers- function _updateFormAction(newUrl, containerId) {+ function _updateFormAction(newUrl, containerId, labelText = null) {if (!newUrl || !containerId) {console.warn('Hi.attr.updateFormAction: newUrl and containerId are required');return;}-+// Find the form within the specific containerconst $container = $(`#${containerId}`);if ($container.length === 0) {console.warn('Hi.attr.updateFormAction: Container not found:', containerId);return;}-+const $form = $container.find(Hi.ATTR_V2_FORM_CLASS_SELECTOR);if ($form.length === 0) {console.warn('Hi.attr.updateFormAction: No form found in container:', containerId);return;}-+// Update form action$form.attr('action', newUrl);-++ // Update form display label if provided+ if (labelText) {+ const $label = $container.find(Hi.ATTR_V2_FORM_DISPLAY_LABEL_SELECTOR);+ if ($label.length > 0) {+ $label.text(labelText);+ }+ }+// Update browser history without page reloadhistory.pushState(null, '', newUrl);};diff --git a/src/hi/static/js/main.js b/src/hi/static/js/main.jsindex d8ca7b91..e3561282 100644--- a/src/hi/static/js/main.js+++ b/src/hi/static/js/main.js@@ -98,6 +98,7 @@ATTR_V2_UNDO_BTN_SELECTOR: '.attr-v2-undo-btn',ATTR_V2_FILE_CARD_SELECTOR: '.attr-v2-file-card',ATTR_V2_SECRET_INPUT_WRAPPER_SELECTOR: '.attr-v2-secret-input-wrapper',+ ATTR_V2_FORM_DISPLAY_LABEL_SELECTOR: '.attr-v2-form-display-label',ATTR_V2_SECRET_INPUT_SELECTOR: '.attr-v2-secret-input',ATTR_V2_ICON_SHOW_SELECTOR: '.attr-v2-icon-show',ATTR_V2_ICON_HIDE_SELECTOR: '.attr-v2-icon-hide',