From b2fc89878fb8dd3078f7a488810278ff3291a58a Mon Sep 17 00:00:00 2001 From: AbdelwahabAdam Date: Mon, 28 Nov 2022 07:21:56 -0800 Subject: [PATCH] fix:jans-cli getting window too small error in edit user (ref: #3041) --- .../cli_tui/plugins/070_users/edit_user_dialog.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py b/jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py index 5c1f0c878c8..87ab35061c4 100644 --- a/jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py +++ b/jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py @@ -37,9 +37,9 @@ from prompt_toolkit.formatted_text import AnyFormattedText from typing import Any, Optional +from prompt_toolkit.layout import ScrollablePane -from view_uma_dialog import ViewUMADialog from utils.multi_lang import _ @@ -170,7 +170,10 @@ def get_custom_attribute(attribute, multi=False): self.app.getTitledCheckBox(_(claim_prop['displayName']), name=ca['name'], checked=checked, style='class:script-checkbox', jans_help=self.app.get_help_from_schema(self.schema, ca['name'])) ) - self.edit_user_container = HSplit(self.edit_user_content, height=D(), width=D()) + self.edit_user_container = ScrollablePane(content=HSplit(self.edit_user_content, width=D()),) + + + self.dialog = JansDialogWithNav( title=self.title, @@ -248,7 +251,8 @@ def add_claim(dialog) -> None: else: widget = self.app.getTitledText(_(display_name), name=claim_, value='', style='class:script-titledtext', jans_help=self.app.get_help_from_schema(self.schema, claim_)) self.edit_user_content.insert(-1, widget) - self.edit_user_container = HSplit(self.edit_user_content, height=D(), width=D()) + self.edit_user_container = ScrollablePane(content=HSplit(self.edit_user_content, width=D()),) + body = HSplit([Label(_("Select claim to be added to current user.")), claims_checkbox]) buttons = [Button(_("Cancel")), Button(_("OK"), handler=add_claim)]