refactor: Add MultilineInput class for handling multiline text inputs
This commit is contained in:
parent
1774fdebe6
commit
259bdcbd95
1 changed files with 5 additions and 1 deletions
|
|
@ -23,11 +23,15 @@ class PromptInput(BaseInputMixin, ListableInputMixin):
|
||||||
# Applying mixins to a specific input type
|
# Applying mixins to a specific input type
|
||||||
class StrInput(BaseInputMixin, ListableInputMixin, DatabaseLoadMixin): # noqa: F821
|
class StrInput(BaseInputMixin, ListableInputMixin, DatabaseLoadMixin): # noqa: F821
|
||||||
field_type: Optional[SerializableFieldTypes] = FieldTypes.TEXT
|
field_type: Optional[SerializableFieldTypes] = FieldTypes.TEXT
|
||||||
multiline: StrictBoolean = False
|
|
||||||
load_from_db: StrictBoolean = False
|
load_from_db: StrictBoolean = False
|
||||||
"""Defines if the field will allow the user to open a text editor. Default is False."""
|
"""Defines if the field will allow the user to open a text editor. Default is False."""
|
||||||
|
|
||||||
|
|
||||||
|
class MultilineInput(BaseInputMixin):
|
||||||
|
field_type: Optional[SerializableFieldTypes] = FieldTypes.TEXT
|
||||||
|
multiline: StrictBoolean = True
|
||||||
|
|
||||||
|
|
||||||
class SecretStrInput(BaseInputMixin, DatabaseLoadMixin):
|
class SecretStrInput(BaseInputMixin, DatabaseLoadMixin):
|
||||||
field_type: Optional[SerializableFieldTypes] = FieldTypes.PASSWORD
|
field_type: Optional[SerializableFieldTypes] = FieldTypes.PASSWORD
|
||||||
password: StrictBoolean = Field(default=True)
|
password: StrictBoolean = Field(default=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue