- ${msg(
- "When enabled, global email connection settings will be used and connection settings below will be ignored.",
- )}
-
-
+ {
+ const target = ev.target as HTMLInputElement;
+ this.showConnectionSettings = !target.checked;
+ }}
+ label=${msg("Use global connection settings")}
+ help=${msg(
+ "When enabled, global email connection settings will be used and connection settings below will be ignored.",
+ )}
+ >
${this.renderConnectionSettings()}
- ${msg(
- "When a user returns from the email successfully, their account will be activated.",
- )}
-
-
-
-
-
- ${msg(
- "When enabled, global Email connection settings will be used and connection settings below will be ignored.",
- )}
-
-
+
+ {
+ const target = ev.target as HTMLInputElement;
+ this.showConnectionSettings = !target.checked;
+ }}
+ label=${msg("Use global connection settings")}
+ help=${msg(
+ "When enabled, global email connection settings will be used and connection settings below will be ignored.",
+ )}
+ > {
${this.renderTypes()}
-
-
-
-
-
-
- ${msg(
- `When checked, the placeholder will be evaluated in the same way a property mapping is.
- If the evaluation fails, the placeholder itself is returned.`,
- )}
-
-
+ {
+ this._shouldRefresh = true;
+ }}
+ label=${msg("Required")}
+ >
+ {
+ this._shouldRefresh = true;
+ }}
+ label=${msg("Interpret placeholder as expression")}
+ help=${msg(`When checked, the placeholder will be evaluated in the same way a property mapping is.
+ If the evaluation fails, the placeholder itself is returned.`)}
+ > {
)}
-
-
-
- ${msg(
- `When checked, the initial value will be evaluated in the same way a property mapping is.
- If the evaluation fails, the initial value itself is returned.`,
- )}
-
-
+ {
+ this._shouldRefresh = true;
+ }}
+ label=${msg("Interpret initial value as expression")}
+ help=${msg(`When checked, the initial value will be evaluated in the same way a property mapping is.
+ If the evaluation fails, the initial value itself is returned.`)}
+ >
diff --git a/web/src/components/ak-switch-input.ts b/web/src/components/ak-switch-input.ts
index 8248f51742..5f5e5e506c 100644
--- a/web/src/components/ak-switch-input.ts
+++ b/web/src/components/ak-switch-input.ts
@@ -4,7 +4,7 @@ import { AKElement } from "#elements/Base";
import { IDGenerator } from "@goauthentik/core/id";
-import { html, nothing } from "lit";
+import { html, nothing, TemplateResult } from "lit";
import { customElement, property, query } from "lit/decorators.js";
@customElement("ak-switch-input")
@@ -35,14 +35,30 @@ export class AkSwitchInput extends AKElement {
@property({ type: String })
help = "";
+ /**
+ * For more complex help instructions, provide a template result.
+ */
+ @property({ type: Object })
+ public bighelp!: TemplateResult | TemplateResult[];
+
@query("input.pf-c-switch__input[type=checkbox]")
checkbox!: HTMLInputElement;
#fieldID: string = IDGenerator.randomID();
+ protected renderHelp() {
+ const helpText = this.help.trim();
+
+ return [
+ helpText
+ ? html`