add i18n management, improvements on admin handling, fix service grid
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<h2 mat-dialog-title>
|
||||
{{ (data.entry ? 'admin.i18n.edit_label' : 'admin.i18n.create_label') | i18n }}
|
||||
</h2>
|
||||
<mat-dialog-content>
|
||||
<form>
|
||||
<mat-form-field appearance="outline" class="full-width">
|
||||
<mat-label>{{ 'admin.i18n.key' | i18n }}</mat-label>
|
||||
<input matInput [(ngModel)]="key" name="key" required
|
||||
[readonly]="data.entry !== null"
|
||||
[placeholder]="'admin.i18n.key_placeholder' | i18n">
|
||||
<mat-hint>{{ 'admin.i18n.key_hint' | i18n }}</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="full-width">
|
||||
<mat-label>{{ 'admin.i18n.value' | i18n }}</mat-label>
|
||||
<textarea matInput [(ngModel)]="value" name="value" required
|
||||
rows="4"
|
||||
[placeholder]="'admin.i18n.value_placeholder' | i18n"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
@if (errorMessage) {
|
||||
<mat-error class="error-message">{{ errorMessage }}</mat-error>
|
||||
}
|
||||
</form>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button (click)="onCancel()">{{ 'admin.cancel' | i18n }}</button>
|
||||
<button mat-raised-button color="primary" (click)="onSave()" [disabled]="saving || !isValid()">
|
||||
@if (saving) {
|
||||
<mat-spinner diameter="20"></mat-spinner>
|
||||
}
|
||||
{{ 'admin.save' | i18n }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
Reference in New Issue
Block a user