stages/prompt: add text_read_only field

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-11-08 14:45:52 +01:00
parent ed6659a46d
commit da74304221
8 changed files with 35 additions and 5 deletions

View File

@ -42,6 +42,13 @@ export class PromptStage extends BaseStage<PromptChallenge, PromptChallengeRespo
class="pf-c-form-control"
?required=${prompt.required}
value="">`;
case PromptTypeEnum.TextReadOnly:
return `<input
type="text"
name="${prompt.fieldKey}"
class="pf-c-form-control"
readonly
value="${prompt.placeholder}">`;
case PromptTypeEnum.Username:
return `<input
type="text"

View File

@ -4723,6 +4723,10 @@ msgstr "Test Policy"
msgid "Test Property Mapping"
msgstr "Test Property Mapping"
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text (read-only): Simple Text input, but cannot be edited."
msgstr "Text (read-only): Simple Text input, but cannot be edited."
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text: Simple Text input"
msgstr "Text: Simple Text input"

View File

@ -4675,6 +4675,10 @@ msgstr "Tester la politique"
msgid "Test Property Mapping"
msgstr "Tester le mapping de la propriété"
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text (read-only): Simple Text input, but cannot be edited."
msgstr ""
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text: Simple Text input"
msgstr "Texte : simple champ texte"

View File

@ -4715,6 +4715,10 @@ msgstr ""
msgid "Test Property Mapping"
msgstr ""
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text (read-only): Simple Text input, but cannot be edited."
msgstr ""
#: src/pages/stages/prompt/PromptForm.ts
msgid "Text: Simple Text input"
msgstr ""

View File

@ -49,6 +49,12 @@ export class PromptForm extends ModelForm<Prompt, string> {
>
${t`Text: Simple Text input`}
</option>
<option
value=${PromptTypeEnum.TextReadOnly}
?selected=${this.instance?.type === PromptTypeEnum.TextReadOnly}
>
${t`Text (read-only): Simple Text input, but cannot be edited.`}
</option>
<option
value=${PromptTypeEnum.Username}
?selected=${this.instance?.type === PromptTypeEnum.Username}