2
0
Эх сурвалжийг харах

Hide custom actions field when no applicable models selected

The entire field row is now hidden when no selected object types
have registered custom actions, avoiding an empty "Custom actions"
label.
Jason Novinger 22 цаг өмнө
parent
commit
e58deb07e7

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
netbox/project-static/dist/netbox.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 6 - 0
netbox/project-static/src/forms/registeredActions.ts

@@ -40,6 +40,12 @@ export function initRegisteredActions(): void {
     if (noActionsMsg) {
       noActionsMsg.style.display = anyVisible ? 'none' : 'block';
     }
+
+    // Hide the entire field row when no actions are visible
+    const fieldRow = actionsContainer!.closest('.field-row, .mb-3');
+    if (fieldRow) {
+      (fieldRow as HTMLElement).style.display = anyVisible ? '' : 'none';
+    }
   }
 
   // Initial update

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно