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