From 560575e53f796cedc96059ea3ac56358e75bf61d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 31 Aug 2021 22:04:37 -0500 Subject: [PATCH] Fix size of roles multi-select when editing user i.e. for buefy themes --- tailbone/templates/deform/select.pt | 1 + tailbone/views/users.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tailbone/templates/deform/select.pt b/tailbone/templates/deform/select.pt index 8bdc0c7d..4d09f16f 100644 --- a/tailbone/templates/deform/select.pt +++ b/tailbone/templates/deform/select.pt @@ -66,6 +66,7 @@ placeholder '(please choose)'; class string: form-control ${css_class or ''}; :multiple str(multiple).lower(); + native-size size; style style; v-model vmodel; @input input_handler;"> diff --git a/tailbone/views/users.py b/tailbone/views/users.py index 30937c91..6c8000ad 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -217,6 +217,8 @@ class UserView(PrincipalMasterView): size = len(roles) if size < 3: size = 3 + elif size > 20: + size = 20 f.set_widget('roles', dfwidget.SelectWidget(multiple=True, size=size, values=role_values))