mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 11:29:26 +03:00
619fdb506f
* Choices can have value and label
Value and label are set turned to a string.
This will make choices into a Array<{ [key: string]: any; }> | null which at some point it should be a defined interface.
* Auto Updated schema.yml
* Used label and value in choice
Label and Value are used for Dropdown and RadioButtonGroup. Strings are still accepted.
* docs: Updated stages/prompt documentation
* Updated docs for initial-value
Also fixed wrong choice example in previous docs changes
* Check if choice is dict
Choice can of course be anything, we shouldn't assume it's string or dict
* Check if choice is dict for initial value
Same as before, choice can be anything. We check if it's explicitely a dict
* Added tests for dict choices
* ran make lint-fix
* Apply typo fix from code review
Co-authored-by: macmoritz <49832924+macmoritz@users.noreply.github.com>
Signed-off-by: Erik Ahlund <erik@ahlund.me>
* stages/prompt: add PromptChoiceSerializer
choices are now a list of PromptChoiceSerializer instead of a generic DictField.
The PromptChallenge also forces the use of value/label object.
* web: use PromptChoice object
The front end can now safely use choices as an array of PromptChoice instead of it being either a string or an object.
* slight revise
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* small ui
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* Apply suggestion from @dominic-r
Signed-off-by: Dominic R <dominic@sdko.org>
* Apply suggestion from @dominic-r
Signed-off-by: Dominic R <dominic@sdko.org>
* Apply suggestion from @dominic-r
Signed-off-by: Dominic R <dominic@sdko.org>
---------
Signed-off-by: Erik Ahlund <erik@ahlund.me>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Dominic R <dominic@sdko.org>
Co-authored-by: macmoritz <49832924+macmoritz@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Dominic R <dominic@sdko.org>