src/app/features/public-form/public-form-format-warning/public-form-format-warning.component.ts
Warn admins that a public form is stored in the multi form format, which the fields of this admin view cannot represent.
The form keeps working for the people filling it in, only its configuration has to be changed elsewhere until the admin UI supports the format.
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | app-public-form-format-warning |
| standalone | true |
| imports | |
| templateUrl | ./public-form-format-warning.component.html |
No results matching.
Properties |
|
Inputs |
| entity | |
Type : Entity
|
|
|
the entity being edited (PublicFormConfig) |
|
| Readonly isMultiFormConfig |
Type : unknown
|
Default value : computed(
() => !!(this.entity() as PublicFormConfig | undefined)?.forms?.length,
)
|
import {
ChangeDetectionStrategy,
Component,
computed,
input,
} from "@angular/core";
import { Entity } from "app/core/entity/model/entity";
import { HintBoxComponent } from "app/core/common-components/hint-box/hint-box.component";
import { PublicFormConfig } from "../public-form-config";
/**
* Warn admins that a public form is stored in the multi form format,
* which the fields of this admin view cannot represent.
*
* The form keeps working for the people filling it in, only its configuration
* has to be changed elsewhere until the admin UI supports the format.
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: "app-public-form-format-warning",
templateUrl: "./public-form-format-warning.component.html",
imports: [HintBoxComponent],
})
export class PublicFormFormatWarningComponent {
/** the entity being edited (PublicFormConfig) */
entity = input<Entity>();
readonly isMultiFormConfig = computed(
() => !!(this.entity() as PublicFormConfig | undefined)?.forms?.length,
);
}
@if (isMultiFormConfig()) {
<app-hint-box type="warning" class="margin-bottom-regular">
<div>
<strong i18n>This form uses the newer multi-step format</strong>
<p i18n>
Forms that create several records at once cannot be configured here yet.
The form itself keeps working for the people filling it in, but the
fields below do not show its actual setup and saving this page can break
it. Please contact your technical support team if you need changes.
</p>
</div>
</app-hint-box>
}