Merge branch 'master' into publish-api-to-npm
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> # Conflicts: # web/package-lock.json # web/src/pages/sources/oauth/OAuthSourceForm.ts
This commit is contained in:
		| @ -5,6 +5,7 @@ import PFForm from "@patternfly/patternfly/components/Form/form.css"; | ||||
| import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; | ||||
| import AKGlobal from "../../authentik.css"; | ||||
| import { t } from "@lingui/macro"; | ||||
| import { FormGroup } from "./FormGroup"; | ||||
|  | ||||
| @customElement("ak-form-element-horizontal") | ||||
| export class HorizontalFormElement extends LitElement { | ||||
| @ -43,8 +44,20 @@ export class HorizontalFormElement extends LitElement { | ||||
|     @property() | ||||
|     errorMessage = ""; | ||||
|  | ||||
|     _invalid = false; | ||||
|  | ||||
|     @property({ type: Boolean }) | ||||
|     invalid = false; | ||||
|     set invalid(v: boolean) { | ||||
|         this._invalid = v; | ||||
|         // check if we're in a form group, and expand that form group | ||||
|         const parent = this.parentElement?.parentElement; | ||||
|         if (parent && "expanded" in parent) { | ||||
|             (parent as FormGroup).expanded = true; | ||||
|         } | ||||
|     } | ||||
|     get invalid(): boolean { | ||||
|         return this._invalid; | ||||
|     } | ||||
|  | ||||
|     @property() | ||||
|     name = ""; | ||||
|  | ||||
| @ -30,6 +30,7 @@ export class ModalForm extends ModalButton { | ||||
|                     form?.resetForm(); | ||||
|                 } | ||||
|                 this.loading = false; | ||||
|                 this.locked = false; | ||||
|                 this.dispatchEvent( | ||||
|                     new CustomEvent(EVENT_REFRESH, { | ||||
|                         bubbles: true, | ||||
| @ -39,12 +40,15 @@ export class ModalForm extends ModalButton { | ||||
|             }) | ||||
|             .catch((exc) => { | ||||
|                 this.loading = false; | ||||
|                 this.locked = false; | ||||
|                 throw exc; | ||||
|             }); | ||||
|     } | ||||
|  | ||||
|     renderModalInner(): TemplateResult { | ||||
|         return html`${this.loading ? html`<ak-loading-overlay></ak-loading-overlay>` : html``} | ||||
|         return html`${this.loading | ||||
|                 ? html`<ak-loading-overlay ?topMost=${true}></ak-loading-overlay>` | ||||
|                 : html``} | ||||
|             <section class="pf-c-page__main-section pf-m-light"> | ||||
|                 <div class="pf-c-content"> | ||||
|                     <h1 class="pf-c-title pf-m-2xl"> | ||||
| @ -59,6 +63,7 @@ export class ModalForm extends ModalButton { | ||||
|                 <ak-spinner-button | ||||
|                     .callAction=${() => { | ||||
|                         this.loading = true; | ||||
|                         this.locked = true; | ||||
|                         return this.confirm(); | ||||
|                     }} | ||||
|                     class="pf-m-primary" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer