Skip to content

Commit

Permalink
fix:jans-cli getting window too small error in edit user (ref: #3041)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelwahabAdam committed Nov 28, 2022
1 parent 8213541 commit b2fc898
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 _

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit b2fc898

Please sign in to comment.