Merge pull request #4401 from MaximilianKrambach/bodyText

show save feedback on more config fields
This commit is contained in:
Emanuel Schütze 2019-02-25 17:52:00 +01:00 committed by GitHub
commit 5ad99e034b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,15 +44,30 @@
<div class="config-form-group" *ngIf="isExcludedType(configItem.inputType)">
<div *ngIf="configItem.inputType === 'boolean'">
<mat-checkbox formControlName="value">{{ configItem.label | translate }}</mat-checkbox>
<mat-hint class="hint" *ngIf="configItem.helpText && !error">{{ configItem.helpText | translate }}</mat-hint>
<mat-hint class="hint" *ngIf="configItem.helpText && !error">
{{ configItem.helpText | translate }}
</mat-hint>
<div class="error" *ngIf="error">{{ error }}</div>
</div>
<!-- textarea -->
<div *ngIf="configItem.inputType === 'text'">
<mat-form-field>
<textarea rows="10" matInput placeholder="{{ configItem.label | translate }}" [value]="translatedValue"></textarea>
<mat-hint class="hint" *ngIf="configItem.helpText && !error">{{ configItem.helpText | translate }}</mat-hint>
<textarea
formControlName="value"
rows="10"
matInput
placeholder="{{ configItem.label | translate }}"
[value]="translatedValue"
></textarea>
<mat-hint class="hint" *ngIf="configItem.helpText && !error">
{{ configItem.helpText | translate }}
</mat-hint>
<span matSuffix>
<mat-icon pull="right" class="text-success" *ngIf="updateSuccessIcon">
check_circle
</mat-icon>
</span>
</mat-form-field>
</div>
@ -77,11 +92,17 @@
<div *ngIf="configItem.inputType === 'markupText'">
<h4>{{ configItem.label | translate }}</h4>
<editor formControlName="value" [init]="tinyMceSettings"></editor>
<span matSuffix>
<mat-icon pull="right" class="text-success" *ngIf="updateSuccessIcon">check_circle</mat-icon>
</span>
</div>
<!-- Custom Translations -->
<div *ngIf="configItem.inputType === 'translations'">
<os-custom-translation formControlName="value"></os-custom-translation>
<span matSuffix>
<mat-icon pull="right" class="text-success" *ngIf="updateSuccessIcon">check_circle</mat-icon>
</span>
</div>
</div>
</form>