stages/prompt: add sub_text field to add HTML below prompt fields
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -4,6 +4,7 @@ import "codemirror/addon/display/autorefresh";
|
||||
import "codemirror/addon/hint/show-hint";
|
||||
import "codemirror/addon/search/search";
|
||||
import "codemirror/addon/search/searchcursor";
|
||||
import "codemirror/mode/htmlmixed/htmlmixed.js";
|
||||
import "codemirror/mode/javascript/javascript.js";
|
||||
import "codemirror/mode/python/python.js";
|
||||
import "codemirror/mode/xml/xml.js";
|
||||
|
@ -127,6 +127,7 @@ export class PromptStage extends BaseStage<PromptChallenge, PromptChallengeRespo
|
||||
${prompt.required
|
||||
? html`<p class="pf-c-form__helper-text">${t`Required.`}</p>`
|
||||
: html``}
|
||||
<p class="pf-c-form__helper-text">${unsafeHTML(prompt.subText)}</p>
|
||||
</div>`;
|
||||
}
|
||||
// Special types that aren't rendered in a wrapper
|
||||
@ -144,6 +145,7 @@ export class PromptStage extends BaseStage<PromptChallenge, PromptChallengeRespo
|
||||
.errors=${(this.challenge?.responseErrors || {})[prompt.fieldKey]}
|
||||
>
|
||||
${unsafeHTML(this.renderPromptInner(prompt))}
|
||||
<p class="pf-c-form__helper-text">${unsafeHTML(prompt.subText)}</p>
|
||||
</ak-form-element>`;
|
||||
})}
|
||||
${"non_field_errors" in (this.challenge?.responseErrors || {})
|
||||
|
@ -278,6 +278,10 @@ msgstr "Alternatively, if your current device has Duo installed, click on this l
|
||||
msgid "Always require consent"
|
||||
msgstr "Always require consent"
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Any HTML can be used."
|
||||
msgstr "Any HTML can be used."
|
||||
|
||||
#: src/pages/events/EventInfo.ts
|
||||
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts
|
||||
msgid "App"
|
||||
@ -2054,6 +2058,10 @@ msgstr "Healthy outposts"
|
||||
msgid "Healthy sources"
|
||||
msgstr "Healthy sources"
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Help text"
|
||||
msgstr "Help text"
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Hidden: Hidden field, can be used to insert data into form."
|
||||
msgstr "Hidden: Hidden field, can be used to insert data into form."
|
||||
@ -5346,6 +5354,10 @@ msgstr "When selected, incoming assertion's Signatures will be validated against
|
||||
msgid "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
|
||||
msgstr "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "When used in conjunction with a User Write stage, use attributes.foo to write attributes."
|
||||
msgstr "When used in conjunction with a User Write stage, use attributes.foo to write attributes."
|
||||
|
||||
#: src/pages/tenants/TenantForm.ts
|
||||
msgid "When using an external logging solution for archiving, this can be set to \"minutes=5\"."
|
||||
msgstr "When using an external logging solution for archiving, this can be set to \"minutes=5\"."
|
||||
|
@ -282,6 +282,10 @@ msgstr "Sinon, si Duo est installé sur cet appareil, cliquez sur ce lien :"
|
||||
msgid "Always require consent"
|
||||
msgstr "Toujours exiger l'approbation"
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Any HTML can be used."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/events/EventInfo.ts
|
||||
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts
|
||||
msgid "App"
|
||||
@ -2037,6 +2041,10 @@ msgstr "Avant-postes sains"
|
||||
msgid "Healthy sources"
|
||||
msgstr "Sources saines"
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Help text"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Hidden: Hidden field, can be used to insert data into form."
|
||||
msgstr "Caché : champ caché, peut être utilisé pour insérer des données dans le formulaire."
|
||||
@ -5285,6 +5293,10 @@ msgstr "Si activée, les signatures des assertions entrantes seront validées pa
|
||||
msgid "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
|
||||
msgstr "Si activée, toutes les exécutions de cette politique seront enregistrées. Par défaut, seules les erreurs d'exécution sont consignées."
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "When used in conjunction with a User Write stage, use attributes.foo to write attributes."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/tenants/TenantForm.ts
|
||||
msgid "When using an external logging solution for archiving, this can be set to \"minutes=5\"."
|
||||
msgstr "En cas d'utilisation d'une solution de journalisation externe pour l'archivage, cette valeur peut être fixée à \"minutes=5\"."
|
||||
|
@ -278,6 +278,10 @@ msgstr ""
|
||||
msgid "Always require consent"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Any HTML can be used."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/events/EventInfo.ts
|
||||
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts
|
||||
msgid "App"
|
||||
@ -2046,6 +2050,10 @@ msgstr ""
|
||||
msgid "Healthy sources"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Help text"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "Hidden: Hidden field, can be used to insert data into form."
|
||||
msgstr ""
|
||||
@ -5331,6 +5339,10 @@ msgstr ""
|
||||
msgid "When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/prompt/PromptForm.ts
|
||||
msgid "When used in conjunction with a User Write stage, use attributes.foo to write attributes."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/tenants/TenantForm.ts
|
||||
msgid "When using an external logging solution for archiving, this can be set to \"minutes=5\"."
|
||||
msgstr ""
|
||||
|
@ -123,6 +123,9 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
||||
<p class="pf-c-form__helper-text">
|
||||
${t`Name of the form field, also used to store the value.`}
|
||||
</p>
|
||||
<p class="pf-c-form__helper-text">
|
||||
${t`When used in conjunction with a User Write stage, use attributes.foo to write attributes.`}
|
||||
</p>
|
||||
</ak-form-element-horizontal>
|
||||
<ak-form-element-horizontal label=${t`Label`} ?required=${true} name="label">
|
||||
<input
|
||||
@ -157,6 +160,11 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
||||
/>
|
||||
<p class="pf-c-form__helper-text">${t`Optionally pre-fill the input value`}</p>
|
||||
</ak-form-element-horizontal>
|
||||
<ak-form-element-horizontal label=${t`Help text`} name="subText">
|
||||
<ak-codemirror mode="htmlmixed" value="${ifDefined(this.instance?.subText)}">
|
||||
</ak-codemirror>
|
||||
<p class="pf-c-form__helper-text">${t`Any HTML can be used.`}</p>
|
||||
</ak-form-element-horizontal>
|
||||
<ak-form-element-horizontal label=${t`Order`} ?required=${true} name="order">
|
||||
<input
|
||||
type="number"
|
||||
|
Reference in New Issue
Block a user