web: re-format with prettier
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -7,11 +7,10 @@ import "../buttons/SpinnerButton";
|
||||
|
||||
@customElement("ak-forms-modal")
|
||||
export class ModalForm extends ModalButton {
|
||||
|
||||
@property({ type: Boolean })
|
||||
closeAfterSuccessfulSubmit = true;
|
||||
|
||||
confirm(): Promise<void> {
|
||||
confirm(): Promise<void> {
|
||||
const form = this.querySelector<Form<unknown>>("[slot=form]");
|
||||
if (!form) {
|
||||
return Promise.reject(t`No form found`);
|
||||
@ -29,39 +28,40 @@ export class ModalForm extends ModalButton {
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
renderModalInner(): TemplateResult {
|
||||
return html`<section class="pf-c-page__main-section pf-m-light">
|
||||
<div class="pf-c-content">
|
||||
<h1 class="pf-c-title pf-m-2xl">
|
||||
<slot name="header"></slot>
|
||||
</h1>
|
||||
</div>
|
||||
</section>
|
||||
<section class="pf-c-page__main-section pf-m-light">
|
||||
<slot name="form"></slot>
|
||||
</section>
|
||||
<footer class="pf-c-modal-box__footer">
|
||||
<ak-spinner-button
|
||||
.callAction=${() => {
|
||||
return this.confirm();
|
||||
}}
|
||||
class="pf-m-primary">
|
||||
<slot name="submit"></slot>
|
||||
</ak-spinner-button>
|
||||
<ak-spinner-button
|
||||
.callAction=${async () => {
|
||||
this.resetForms();
|
||||
this.open = false;
|
||||
}}
|
||||
class="pf-m-secondary">
|
||||
${t`Cancel`}
|
||||
</ak-spinner-button>
|
||||
</footer>`;
|
||||
<div class="pf-c-content">
|
||||
<h1 class="pf-c-title pf-m-2xl">
|
||||
<slot name="header"></slot>
|
||||
</h1>
|
||||
</div>
|
||||
</section>
|
||||
<section class="pf-c-page__main-section pf-m-light">
|
||||
<slot name="form"></slot>
|
||||
</section>
|
||||
<footer class="pf-c-modal-box__footer">
|
||||
<ak-spinner-button
|
||||
.callAction=${() => {
|
||||
return this.confirm();
|
||||
}}
|
||||
class="pf-m-primary"
|
||||
>
|
||||
<slot name="submit"></slot> </ak-spinner-button
|
||||
>
|
||||
<ak-spinner-button
|
||||
.callAction=${async () => {
|
||||
this.resetForms();
|
||||
this.open = false;
|
||||
}}
|
||||
class="pf-m-secondary"
|
||||
>
|
||||
${t`Cancel`}
|
||||
</ak-spinner-button>
|
||||
</footer>`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user