36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
<h2 mat-dialog-title>{{ (isEditMode ? 'admin.system_properties.edit' : 'admin.system_properties.create') | i18n }}</h2>
|
|
|
|
<mat-dialog-content>
|
|
<form [formGroup]="form">
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>{{ 'admin.system_properties.key' | i18n }}</mat-label>
|
|
<input matInput formControlName="key" [placeholder]="'admin.system_properties.key' | i18n" required>
|
|
@if (form.get('key')?.hasError('required')) {
|
|
<mat-error>
|
|
{{ 'admin.system_properties.key_required' | i18n }}
|
|
</mat-error>
|
|
}
|
|
@if (isEditMode) {
|
|
<mat-hint>{{ 'admin.system_properties.key_readonly' | i18n }}</mat-hint>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>{{ 'admin.system_properties.value' | i18n }}</mat-label>
|
|
<textarea matInput formControlName="value" [placeholder]="'admin.system_properties.value' | i18n" rows="5"
|
|
required></textarea>
|
|
@if (form.get('value')?.hasError('required')) {
|
|
<mat-error>
|
|
{{ 'admin.system_properties.value_required' | i18n }}
|
|
</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
</form>
|
|
</mat-dialog-content>
|
|
|
|
<mat-dialog-actions>
|
|
<a mat-raised-button color="primary" (click)="onSubmit()" [disabled]="!form.valid">
|
|
{{ (isEditMode ? 'admin.save' : 'admin.create') | i18n }}
|
|
</a>
|
|
<a mat-button (click)="onCancel()">{{ 'cancel' | i18n }}</a>
|
|
</mat-dialog-actions> |