From 513de6b62bbd4056397a9eeb62e662cfcc76095c Mon Sep 17 00:00:00 2001 From: Matthew Grotke Date: Wed, 27 May 2026 22:20:33 -0400 Subject: [PATCH] Development --- docker/routlin-dash/app/view_page.py | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/docker/routlin-dash/app/view_page.py b/docker/routlin-dash/app/view_page.py index 0fb5234..9a472b1 100644 --- a/docker/routlin-dash/app/view_page.py +++ b/docker/routlin-dash/app/view_page.py @@ -1246,7 +1246,7 @@ def _render_item(item, tokens, inherited_req=None): '' 'Hostname (Opt):' '' - '
' + '
' '' '' @@ -1291,6 +1291,7 @@ def _render_item(item, tokens, inherited_req=None): return ( '
' '' + '
' '
' f'' '/' @@ -1299,6 +1300,7 @@ def _render_item(item, tokens, inherited_req=None): f'{e(dotted)}' '' '
' + '
' ) if t == 'editable_list': @@ -1396,11 +1398,17 @@ def _render_field(item, tokens): depends = item.get('depends', []) validate_attr = f' data-validate="{e(validate)}"' if validate else '' depends_attr = f' data-depends="{e(",".join(depends))}"' if depends else '' - dyn_hint = '' if validate else '' + if validate: + return ( + f'
' + f'
' + f'
' + f'{hint_html}
' + ) return ( f'
' f'' - f'{hint_html}{dyn_hint}
' + f'{hint_html}
' ) if input_type == 'number': @@ -1419,12 +1427,12 @@ def _render_field(item, tokens): return ( '
' f'' - f'
{inp}{dyn_hint_html}
' + f'
{inp}{dyn_hint_html}
' f'{hint_html}
' ) return ( f'
' - f'{inp}{dyn_hint_html}{hint_html}
' + f'
{inp}{dyn_hint_html}
{hint_html}
' ) if input_type == 'textarea': @@ -1550,12 +1558,19 @@ def _render_field(item, tokens): depends = item.get('depends', []) validate_attr = f' data-validate="{e(validate)}"' if validate else '' depends_attr = f' data-depends="{e(",".join(depends))}"' if depends else '' - dyn_hint = '' if validate else '' + if validate: + return ( + f'
' + f'
' + f'
' + f'{hint_html}
' + ) return ( f'
' f'' - f'{hint_html}{dyn_hint}
' + f'{hint_html}
' )