stages/dummy: add toggle to throw error for debugging

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2023-01-01 20:53:40 +01:00
parent b9bb27008e
commit 9fdfb8c99b
6 changed files with 46 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { first } from "@goauthentik/common/utils";
import "@goauthentik/elements/forms/HorizontalFormElement";
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
@ -52,6 +53,16 @@ export class DummyStageForm extends ModelForm<DummyStage, string> {
required
/>
</ak-form-element-horizontal>
<ak-form-element-horizontal name="throwError">
<div class="pf-c-check">
<input
type="checkbox"
class="pf-c-check__input"
?checked=${first(this.instance?.throwError, false)}
/>
<label class="pf-c-check__label"> ${t`Throw error?`} </label>
</div>
</ak-form-element-horizontal>
</form>`;
}
}