web/admin: migrate provider forms
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { Form } from "../../elements/forms/Form";
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import "../../elements/forms/HorizontalFormElement";
|
||||
import "../../elements/CodeMirror";
|
||||
|
||||
@customElement("ak-property-mapping-ldap-form")
|
||||
export class PropertyMappingLDAPForm extends Form<LDAPPropertyMapping> {
|
||||
@ -60,7 +61,7 @@ export class PropertyMappingLDAPForm extends Form<LDAPPropertyMapping> {
|
||||
<ak-form-element-horizontal
|
||||
label=${gettext("Expression")}
|
||||
name="expression">
|
||||
<ak-codemirror mode="python" value="${this.mapping?.expression}">
|
||||
<ak-codemirror mode="python" value="${ifDefined(this.mapping?.expression)}">
|
||||
</ak-codemirror>
|
||||
<p class="pf-c-form__helper-text">
|
||||
Expression using Python. See <a href="https://goauthentik.io/docs/property-mappings/expression/">here</a> for a list of all variables.
|
||||
|
||||
@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { Form } from "../../elements/forms/Form";
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import "../../elements/forms/HorizontalFormElement";
|
||||
import "../../elements/CodeMirror";
|
||||
|
||||
@customElement("ak-property-mapping-saml-form")
|
||||
export class PropertyMappingLDAPForm extends Form<SAMLPropertyMapping> {
|
||||
@ -62,7 +63,7 @@ export class PropertyMappingLDAPForm extends Form<SAMLPropertyMapping> {
|
||||
<ak-form-element-horizontal
|
||||
label=${gettext("Friendly Name")}
|
||||
name="friendlyName">
|
||||
<input type="text" value="${ifDefined(this.mapping?.friendlyName)}" class="pf-c-form-control">
|
||||
<input type="text" value="${ifDefined(this.mapping?.friendlyName || "")}" class="pf-c-form-control">
|
||||
<p class="pf-c-form__helper-text">
|
||||
${gettext("Optionally set the `FriendlyName` value of the Assertion attribute.")}
|
||||
</p>
|
||||
@ -70,7 +71,7 @@ export class PropertyMappingLDAPForm extends Form<SAMLPropertyMapping> {
|
||||
<ak-form-element-horizontal
|
||||
label=${gettext("Expression")}
|
||||
name="expression">
|
||||
<ak-codemirror mode="python" value="${this.mapping?.expression}">
|
||||
<ak-codemirror mode="python" value="${ifDefined(this.mapping?.expression)}">
|
||||
</ak-codemirror>
|
||||
<p class="pf-c-form__helper-text">
|
||||
Expression using Python. See <a href="https://goauthentik.io/docs/property-mappings/expression/">here</a> for a list of all variables.
|
||||
|
||||
@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { Form } from "../../elements/forms/Form";
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import "../../elements/forms/HorizontalFormElement";
|
||||
import "../../elements/CodeMirror";
|
||||
|
||||
@customElement("ak-property-mapping-scope-form")
|
||||
export class PropertyMappingScopeForm extends Form<ScopeMapping> {
|
||||
@ -67,7 +68,7 @@ export class PropertyMappingScopeForm extends Form<ScopeMapping> {
|
||||
<ak-form-element-horizontal
|
||||
label=${gettext("Expression")}
|
||||
name="expression">
|
||||
<ak-codemirror mode="python" value="${this.mapping?.expression}">
|
||||
<ak-codemirror mode="python" value="${ifDefined(this.mapping?.expression)}">
|
||||
</ak-codemirror>
|
||||
<p class="pf-c-form__helper-text">
|
||||
Expression using Python. See <a href="https://goauthentik.io/docs/property-mappings/expression/">here</a> for a list of all variables.
|
||||
|
||||
Reference in New Issue
Block a user