From 842913659aa4d42303b6df418733e31b0f28e6d6 Mon Sep 17 00:00:00 2001 From: Jocadbz Date: Tue, 9 Jun 2026 18:54:37 -0300 Subject: [PATCH] Model form: hide height when non-rack, disable side selector for patch panels Added toggleRackHeight() to show/hide the height-in-units field when the rack-mountable checkbox changes. Added togglePatchMode() to disable the port side selector when is_patch_panel is checked, with an explanatory note that all ports get doubled to front+back anyway. Also initializes both states on page load so edit view reflects saved values. --- templates/model_form.html | 42 +++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/templates/model_form.html b/templates/model_form.html index 9f2625f..540b30a 100644 --- a/templates/model_form.html +++ b/templates/model_form.html @@ -9,13 +9,28 @@
- - + +
- - + + +
@@ -33,7 +48,7 @@ {{range $i, $p := .Model.Ports}}
- +
{{end}} @@ -48,11 +63,26 @@ {{end}}