web/admin: only show prompt creation when editing prompt stage (#5572)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-05-10 20:58:13 +02:00 committed by GitHub
parent 3704f4ccf4
commit fd8c1d41db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 8 deletions

View File

@ -95,14 +95,20 @@ export class PromptStageForm extends ModelForm<PromptStage, string> {
<p class="pf-c-form__helper-text"> <p class="pf-c-form__helper-text">
${t`Hold control/command to select multiple items.`} ${t`Hold control/command to select multiple items.`}
</p> </p>
<ak-forms-modal> ${this.instance
? html`<ak-forms-modal>
<span slot="submit"> ${t`Create`} </span> <span slot="submit"> ${t`Create`} </span>
<span slot="header"> ${t`Create Prompt`} </span> <span slot="header"> ${t`Create Prompt`} </span>
<ak-prompt-form slot="form"> </ak-prompt-form> <ak-prompt-form slot="form"> </ak-prompt-form>
<button type="button" slot="trigger" class="pf-c-button pf-m-primary"> <button
type="button"
slot="trigger"
class="pf-c-button pf-m-primary"
>
${t`Create`} ${t`Create`}
</button> </button>
</ak-forms-modal> </ak-forms-modal>`
: html``}
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-form-element-horizontal
label=${t`Validation Policies`} label=${t`Validation Policies`}