UI: Get rid of 'multiple directives with 'exportAs' set to ngForm'

This commit is contained in:
Igor Kulikov 2020-04-27 10:39:18 +03:00
parent 3d71a5ba0e
commit 0289b0c1a2
57 changed files with 86 additions and 97 deletions

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #entityAliasForm="ngForm" [formGroup]="entityAliasFormGroup" (ngSubmit)="save()" style="min-width: 480px;"> <form [formGroup]="entityAliasFormGroup" (ngSubmit)="save()" style="min-width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ (isAdd ? 'alias.add' : 'alias.edit') | translate }}</h2> <h2>{{ (isAdd ? 'alias.add' : 'alias.edit') | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #entityAliasesForm="ngForm" [formGroup]="entityAliasesFormGroup" (ngSubmit)="save()" style="width: 700px;"> <form [formGroup]="entityAliasesFormGroup" (ngSubmit)="save()" style="width: 700px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ title | translate }}</h2> <h2>{{ title | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #addWidgetForm="ngForm" [formGroup]="addWidgetFormGroup" (ngSubmit)="add()" style="min-width: 400px;"> <form [formGroup]="addWidgetFormGroup" (ngSubmit)="add()" style="min-width: 400px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>attribute.add-widget-to-dashboard</h2> <h2 translate>attribute.add-widget-to-dashboard</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,8 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #attributeForm="ngForm" <form class="mat-elevation-z1"
class="mat-elevation-z1"
[formGroup]="attributeFormGroup" (ngSubmit)="update()" style="width: 400px; padding: 5px;"> [formGroup]="attributeFormGroup" (ngSubmit)="update()" style="width: 400px; padding: 5px;">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<tb-value-input <tb-value-input

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #widgetForm="ngForm"> <form>
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>layout.select</h2> <h2 translate>layout.select</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #stateForm="ngForm" [formGroup]="stateFormGroup" (ngSubmit)="save()"> <form [formGroup]="stateFormGroup" (ngSubmit)="save()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>dashboard.select-state</h2> <h2 translate>dashboard.select-state</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -18,7 +18,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { NgForm } from '@angular/forms'; import { FormGroup, NgForm } from '@angular/forms';
@Component({ @Component({
selector: 'tb-details-panel', selector: 'tb-details-panel',
@ -33,14 +33,14 @@ export class DetailsPanelComponent extends PageComponent {
@Input() isReadOnly = false; @Input() isReadOnly = false;
@Input() isAlwaysEdit = false; @Input() isAlwaysEdit = false;
theFormValue: NgForm; theFormValue: FormGroup;
@Input() @Input()
set theForm(value: NgForm) { set theForm(value: FormGroup) {
this.theFormValue = value; this.theFormValue = value;
} }
get theForm(): NgForm { get theForm(): FormGroup {
return this.theFormValue; return this.theFormValue;
} }

View File

@ -19,7 +19,7 @@ import { ErrorStateMatcher } from '@angular/material/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { FormControl, FormGroupDirective, NgForm } from '@angular/forms'; import { FormControl, FormGroup, FormGroupDirective, NgForm } from '@angular/forms';
import { EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models'; import { EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models';
import { BaseData, HasId } from '@shared/models/base-data'; import { BaseData, HasId } from '@shared/models/base-data';
import { EntityId } from '@shared/models/id/entity-id'; import { EntityId } from '@shared/models/id/entity-id';
@ -40,7 +40,7 @@ export class AddEntityDialogComponent extends
DialogComponent<AddEntityDialogComponent, BaseData<HasId>> implements OnInit, ErrorStateMatcher { DialogComponent<AddEntityDialogComponent, BaseData<HasId>> implements OnInit, ErrorStateMatcher {
entityComponent: EntityComponent<BaseData<HasId>>; entityComponent: EntityComponent<BaseData<HasId>>;
detailsForm: NgForm; detailsForm: FormGroup;
entitiesTableConfig: EntityTableConfig<BaseData<HasId>>; entitiesTableConfig: EntityTableConfig<BaseData<HasId>>;
translations: EntityTypeTranslation; translations: EntityTypeTranslation;
@ -87,7 +87,7 @@ export class AddEntityDialogComponent extends
const componentRef = viewContainerRef.createComponent(componentFactory, 0, injector); const componentRef = viewContainerRef.createComponent(componentFactory, 0, injector);
this.entityComponent = componentRef.instance; this.entityComponent = componentRef.instance;
this.entityComponent.isEdit = true; this.entityComponent.isEdit = true;
this.detailsForm = this.entityComponent.entityNgForm; this.detailsForm = this.entityComponent.entityForm;
} }
helpLinkId(): string { helpLinkId(): string {

View File

@ -37,7 +37,7 @@ import { AppState } from '@core/core.state';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { BaseData, HasId } from '@shared/models/base-data'; import { BaseData, HasId } from '@shared/models/base-data';
import { EntityType, EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models'; import { EntityType, EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models';
import { NgForm } from '@angular/forms'; import { FormGroup, NgForm } from '@angular/forms';
import { EntityComponent } from './entity.component'; import { EntityComponent } from './entity.component';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { EntityAction } from '@home/models/entity/entity-component.models'; import { EntityAction } from '@home/models/entity/entity-component.models';
@ -68,7 +68,7 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
entityTabsComponentRef: ComponentRef<EntityTabsComponent<BaseData<HasId>>>; entityTabsComponentRef: ComponentRef<EntityTabsComponent<BaseData<HasId>>>;
entityTabsComponent: EntityTabsComponent<BaseData<HasId>>; entityTabsComponent: EntityTabsComponent<BaseData<HasId>>;
detailsForm: NgForm; detailsForm: FormGroup;
entitiesTableConfigValue: EntityTableConfig<BaseData<HasId>>; entitiesTableConfigValue: EntityTableConfig<BaseData<HasId>>;
isEditValue = false; isEditValue = false;
@ -189,7 +189,7 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit
this.entityComponentRef = viewContainerRef.createComponent(componentFactory, 0, injector); this.entityComponentRef = viewContainerRef.createComponent(componentFactory, 0, injector);
this.entityComponent = this.entityComponentRef.instance; this.entityComponent = this.entityComponentRef.instance;
this.entityComponent.isEdit = this.isEdit; this.entityComponent.isEdit = this.isEdit;
this.detailsForm = this.entityComponent.entityNgForm; this.detailsForm = this.entityComponent.entityForm;
this.subscriptions.push(this.entityComponent.entityAction.subscribe((action) => { this.subscriptions.push(this.entityComponent.entityAction.subscribe((action) => {
this.entityAction.emit(action); this.entityAction.emit(action);
})); }));

View File

@ -30,7 +30,7 @@ import { AuditLogMode } from '@shared/models/audit-log.models';
import { DebugEventType, EventType } from '@shared/models/event.models'; import { DebugEventType, EventType } from '@shared/models/event.models';
import { AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models'; import { AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models';
import { NULL_UUID } from '@shared/models/id/has-uuid'; import { NULL_UUID } from '@shared/models/id/has-uuid';
import { NgForm } from '@angular/forms'; import { FormGroup, NgForm } from '@angular/forms';
import { PageLink } from '@shared/models/page/page-link'; import { PageLink } from '@shared/models/page/page-link';
@Directive() @Directive()
@ -94,7 +94,7 @@ export abstract class EntityTabsComponent<T extends BaseData<HasId>,
} }
@Input() @Input()
detailsForm: NgForm; detailsForm: FormGroup;
private entityTabsSubject = new BehaviorSubject<Array<MatTab>>(null); private entityTabsSubject = new BehaviorSubject<Array<MatTab>>(null);

View File

@ -35,8 +35,6 @@ export abstract class EntityComponent<T extends BaseData<HasId>,
entityForm: FormGroup; entityForm: FormGroup;
@ViewChild('entityNgForm', {static: true}) entityNgForm: NgForm;
isEditValue: boolean; isEditValue: boolean;
@Input() @Input()

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #importForm="ngForm" [formGroup]="importFormGroup" (ngSubmit)="importFromJson()"> <form [formGroup]="importFormGroup" (ngSubmit)="importFromJson()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{ importTitle }}</h2> <h2 translate>{{ importTitle }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #relationForm="ngForm" [formGroup]="relationFormGroup" (ngSubmit)="save()" style="min-width: 600px;"> <form [formGroup]="relationFormGroup" (ngSubmit)="save()" style="min-width: 600px;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2>{{ (isAdd ? 'relation.add' : 'relation.edit' ) | translate }}</h2> <h2>{{ (isAdd ? 'relation.add' : 'relation.edit' ) | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #widgetActionForm="ngForm" [formGroup]="widgetActionFormGroup" (ngSubmit)="save()" style="min-width: 480px;"> <form [formGroup]="widgetActionFormGroup" (ngSubmit)="save()" style="min-width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ (isAdd ? 'widget-config.add-action' : 'widget-config.edit-action' ) | translate }}</h2> <h2>{{ (isAdd ? 'widget-config.add-action' : 'widget-config.edit-action' ) | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #dataKeyForm="ngForm" [formGroup]="dataKeyFormGroup" (ngSubmit)="save()" style="min-width: 480px;"> <form [formGroup]="dataKeyFormGroup" (ngSubmit)="save()" style="min-width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ 'datakey.configuration' | translate }}</h2> <h2>{{ 'datakey.configuration' | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>
@ -39,7 +39,7 @@
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions fxLayoutAlign="end center">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || dataKeyForm.invalid || !dataKeyForm.dirty"> [disabled]="(isLoading$ | async) || dataKeyFormGroup.invalid || !dataKeyFormGroup.dirty">
{{ 'action.save' | translate }} {{ 'action.save' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -16,7 +16,6 @@
--> -->
<form #formContainer class="tb-multiple-input" <form #formContainer class="tb-multiple-input"
#multipleInputForm="ngForm"
[formGroup]="multipleInputFormGroup" [formGroup]="multipleInputFormGroup"
tb-toast toastTarget="{{ toastTargetId }}" tb-toast toastTarget="{{ toastTargetId }}"
(ngSubmit)="save()" novalidate autocomplete="off"> (ngSubmit)="save()" novalidate autocomplete="off">
@ -103,12 +102,12 @@
*ngIf="entityDetected && settings.showActionButtons"> *ngIf="entityDetected && settings.showActionButtons">
<button mat-button color="primary" type="button" <button mat-button color="primary" type="button"
(click)="discardAll()" style="max-height: 50px; margin-right:20px;" (click)="discardAll()" style="max-height: 50px; margin-right:20px;"
[disabled]="!multipleInputForm.dirty"> [disabled]="!multipleInputFormGroup.dirty">
{{ 'action.undo' | translate }} {{ 'action.undo' | translate }}
</button> </button>
<button mat-button mat-raised-button color="primary" type="submit" <button mat-button mat-raised-button color="primary" type="submit"
style="max-height: 50px; margin-right:20px;" style="max-height: 50px; margin-right:20px;"
[disabled]="!multipleInputForm.dirty || multipleInputForm.invalid"> [disabled]="!multipleInputFormGroup.dirty || multipleInputFormGroup.invalid">
{{ 'action.save' | translate }} {{ 'action.save' | translate }}
</button> </button>
</div> </div>

View File

@ -27,7 +27,7 @@ import { IWidgetSubscription } from '@core/api/widget-api.models';
import { isDefined, isEqual, isUndefined } from '@core/utils'; import { isDefined, isEqual, isUndefined } from '@core/utils';
import { EntityType } from '@shared/models/entity-type.models'; import { EntityType } from '@shared/models/entity-type.models';
import * as _moment from 'moment'; import * as _moment from 'moment';
import { FormBuilder, FormGroup, NgForm, ValidatorFn, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms';
import { RequestConfig } from '@core/http/http-utils'; import { RequestConfig } from '@core/http/http-utils';
import { AttributeService } from '@core/http/attribute.service'; import { AttributeService } from '@core/http/attribute.service';
import { AttributeData, AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models'; import { AttributeData, AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models';
@ -90,7 +90,6 @@ interface MultipleInputWidgetSource {
export class MultipleInputWidgetComponent extends PageComponent implements OnInit, OnDestroy { export class MultipleInputWidgetComponent extends PageComponent implements OnInit, OnDestroy {
@ViewChild('formContainer', {static: true}) formContainerRef: ElementRef<HTMLElement>; @ViewChild('formContainer', {static: true}) formContainerRef: ElementRef<HTMLElement>;
@ViewChild('multipleInputForm', {static: true}) multipleInputForm: NgForm;
@Input() @Input()
ctx: WidgetContext; ctx: WidgetContext;
@ -453,7 +452,7 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni
if (tasks.length) { if (tasks.length) {
forkJoin(tasks).subscribe( forkJoin(tasks).subscribe(
() => { () => {
this.multipleInputForm.resetForm(); this.multipleInputFormGroup.reset(undefined, {emitEvent: false});
this.multipleInputFormGroup.markAsPristine(); this.multipleInputFormGroup.markAsPristine();
if (this.settings.showResultMessage) { if (this.settings.showResultMessage) {
this.ctx.showSuccessToast(this.translate.instant('widgets.input-widgets.update-successful'), this.ctx.showSuccessToast(this.translate.instant('widgets.input-widgets.update-successful'),
@ -467,13 +466,13 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni
} }
}); });
} else { } else {
this.multipleInputForm.resetForm(); this.multipleInputFormGroup.reset(undefined, {emitEvent: false});
this.multipleInputFormGroup.markAsPristine(); this.multipleInputFormGroup.markAsPristine();
} }
} }
public discardAll() { public discardAll() {
this.multipleInputForm.resetForm(); this.multipleInputFormGroup.reset(undefined, {emitEvent: false});
this.sources.forEach((source) => { this.sources.forEach((source) => {
for (const key of this.visibleKeys(source)) { for (const key of this.visibleKeys(source)) {
this.multipleInputFormGroup.get(key.formId).patchValue(key.value, {emitEvent: false}); this.multipleInputFormGroup.get(key.formId).patchValue(key.value, {emitEvent: false});

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #addEntitiesToCustomerForm="ngForm" [formGroup]="addEntitiesToCustomerFormGroup" (ngSubmit)="assign()"> <form [formGroup]="addEntitiesToCustomerFormGroup" (ngSubmit)="assign()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ assignToCustomerTitle | translate }}</h2> <h2>{{ assignToCustomerTitle | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>
@ -42,8 +42,8 @@
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions fxLayoutAlign="end center">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || addEntitiesToCustomerForm.invalid [disabled]="(isLoading$ | async) || addEntitiesToCustomerFormGroup.invalid
|| !addEntitiesToCustomerForm.dirty"> || !addEntitiesToCustomerFormGroup.dirty">
{{ 'action.assign' | translate }} {{ 'action.assign' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #assignToCustomerForm="ngForm" [formGroup]="assignToCustomerFormGroup" (ngSubmit)="assign()"> <form [formGroup]="assignToCustomerFormGroup" (ngSubmit)="assign()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ assignToCustomerTitle | translate }}</h2> <h2>{{ assignToCustomerTitle | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>
@ -41,8 +41,8 @@
<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> <div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || assignToCustomerForm.invalid [disabled]="(isLoading$ | async) || assignToCustomerFormGroup.invalid
|| !assignToCustomerForm.dirty"> || !assignToCustomerFormGroup.dirty">
{{ 'action.assign' | translate }} {{ 'action.assign' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -26,7 +26,7 @@
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<mat-card-content style="padding-top: 16px;"> <mat-card-content style="padding-top: 16px;">
<form #generalSettingsForm="ngForm" [formGroup]="generalSettings" (ngSubmit)="save()"> <form [formGroup]="generalSettings" (ngSubmit)="save()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>admin.base-url</mat-label> <mat-label translate>admin.base-url</mat-label>
@ -36,7 +36,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div fxLayout="row" fxLayoutAlign="end center" style="width: 100%;" class="layout-wrap"> <div fxLayout="row" fxLayoutAlign="end center" style="width: 100%;" class="layout-wrap">
<button mat-button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || generalSettingsForm.invalid || !generalSettingsForm.dirty" <button mat-button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || generalSettings.invalid || !generalSettings.dirty"
type="submit">{{'action.save' | translate}} type="submit">{{'action.save' | translate}}
</button> </button>
</div> </div>

View File

@ -28,7 +28,7 @@
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<mat-card-content style="padding-top: 16px;"> <mat-card-content style="padding-top: 16px;">
<form #mailSettingsForm="ngForm" [formGroup]="mailSettings" (ngSubmit)="save()"> <form [formGroup]="mailSettings" (ngSubmit)="save()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>admin.mail-from</mat-label> <mat-label translate>admin.mail-from</mat-label>
@ -97,10 +97,10 @@
</mat-form-field> </mat-form-field>
<div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px"> <div fxLayout="row" fxLayoutAlign="end center" fxLayout.xs="column" fxLayoutAlign.xs="end" fxLayoutGap="16px">
<button mat-raised-button type="button" <button mat-raised-button type="button"
[disabled]="(isLoading$ | async) || mailSettingsForm.invalid" (click)="sendTestMail()"> [disabled]="(isLoading$ | async) || mailSettings.invalid" (click)="sendTestMail()">
{{'admin.send-test-mail' | translate}} {{'admin.send-test-mail' | translate}}
</button> </button>
<button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || mailSettingsForm.invalid || !mailSettingsForm.dirty" <button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || mailSettings.invalid || !mailSettings.dirty"
type="submit">{{'action.save' | translate}} type="submit">{{'action.save' | translate}}
</button> </button>
</div> </div>

View File

@ -28,7 +28,7 @@
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<mat-card-content style="padding-top: 16px;"> <mat-card-content style="padding-top: 16px;">
<form #securitySettingsForm="ngForm" [formGroup]="securitySettingsFormGroup" (ngSubmit)="save()"> <form [formGroup]="securitySettingsFormGroup" (ngSubmit)="save()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<mat-expansion-panel [expanded]="true"> <mat-expansion-panel [expanded]="true">
<mat-expansion-panel-header> <mat-expansion-panel-header>
@ -140,7 +140,7 @@
</section> </section>
</mat-expansion-panel> </mat-expansion-panel>
<div fxLayout="row" fxLayoutAlign="end center" style="width: 100%;" class="layout-wrap"> <div fxLayout="row" fxLayoutAlign="end center" style="width: 100%;" class="layout-wrap">
<button mat-button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || securitySettingsForm.invalid || !securitySettingsForm.dirty" <button mat-button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || securitySettingsFormGroup.invalid || !securitySettingsFormGroup.dirty"
type="submit">{{'action.save' | translate}} type="submit">{{'action.save' | translate}}
</button> </button>
</div> </div>

View File

@ -62,7 +62,7 @@
[fxShow]="!isEdit && entity?.customerIsPublic && (assetScope === 'customer' || assetScope === 'tenant')"> [fxShow]="!isEdit && entity?.customerIsPublic && (assetScope === 'customer' || assetScope === 'tenant')">
{{ 'asset.asset-public' | translate }} {{ 'asset.asset-public' | translate }}
</div> </div>
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>asset.name</mat-label> <mat-label translate>asset.name</mat-label>

View File

@ -58,7 +58,7 @@
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [fxShow]="!isPublic" [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [fxShow]="!isPublic" [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>customer.title</mat-label> <mat-label translate>customer.title</mat-label>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #widgetForm="ngForm" [formGroup]="widgetFormGroup" (ngSubmit)="add()" style="width: 900px;"> <form [formGroup]="widgetFormGroup" (ngSubmit)="add()" style="width: 900px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>widget.add</h2> <h2 translate>widget.add</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -90,7 +90,7 @@
</button> </button>
</div> </div>
</div> </div>
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>dashboard.title</mat-label> <mat-label translate>dashboard.title</mat-label>

View File

@ -216,7 +216,7 @@
(closeDetails)="onEditWidgetClosed()" (closeDetails)="onEditWidgetClosed()"
(toggleDetailsEditMode)="onRevertWidgetEdit()" (toggleDetailsEditMode)="onRevertWidgetEdit()"
(applyDetails)="saveWidget()" (applyDetails)="saveWidget()"
[theForm]="tbEditWidget.widgetForm"> [theForm]="tbEditWidget.widgetFormGroup">
<div class="details-buttons"> <div class="details-buttons">
<div [tb-help]="helpLinkIdForWidgetType()"></div> <div [tb-help]="helpLinkIdForWidgetType()"></div>
</div> </div>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #settingsForm="ngForm" (ngSubmit)="save()"> <form (ngSubmit)="save()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{settings ? 'dashboard.settings' : 'layout.settings'}}</h2> <h2 translate>{{settings ? 'dashboard.settings' : 'layout.settings'}}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #widgetForm="ngForm" [formGroup]="widgetFormGroup"> <form [formGroup]="widgetFormGroup">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<tb-widget-config <tb-widget-config
[aliasController]="aliasController" [aliasController]="aliasController"

View File

@ -49,8 +49,6 @@ export class EditWidgetComponent extends PageComponent implements OnInit, OnChan
@Input() @Input()
widgetLayout: WidgetLayout; widgetLayout: WidgetLayout;
@ViewChild('widgetForm', {static: true}) widgetForm: NgForm;
widgetFormGroup: FormGroup; widgetFormGroup: FormGroup;
widgetConfig: WidgetConfigComponentData; widgetConfig: WidgetConfigComponentData;

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #widgetForm="ngForm" [formGroup]="layoutsFormGroup" (ngSubmit)="save()"> <form [formGroup]="layoutsFormGroup" (ngSubmit)="save()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>layout.manage</h2> <h2 translate>layout.manage</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #dashboardCustomersForm="ngForm" style="width: 600px;" <form style="width: 600px;"
[formGroup]="dashboardCustomersFormGroup" (ngSubmit)="submit()"> [formGroup]="dashboardCustomersFormGroup" (ngSubmit)="submit()">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2>{{ titleText | translate }}</h2> <h2>{{ titleText | translate }}</h2>
@ -43,8 +43,8 @@
<span fxFlex></span> <span fxFlex></span>
<button mat-button mat-raised-button color="primary" <button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || dashboardCustomersForm.invalid [disabled]="(isLoading$ | async) || dashboardCustomersFormGroup.invalid
|| !dashboardCustomersForm.dirty"> || !dashboardCustomersFormGroup.dirty">
{{ actionName | translate }} {{ actionName | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #stateForm="ngForm" [formGroup]="stateFormGroup" (ngSubmit)="save()" style="min-width: 480px;"> <form [formGroup]="stateFormGroup" (ngSubmit)="save()" style="min-width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{ isAdd ? 'dashboard.add-state' : 'dashboard.edit-state' }}</h2> <h2 translate>{{ isAdd ? 'dashboard.add-state' : 'dashboard.edit-state' }}</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #statesForm="ngForm" [formGroup]="statesFormGroup" (ngSubmit)="save()" style="min-width: 480px;"> <form [formGroup]="statesFormGroup" (ngSubmit)="save()" style="min-width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>dashboard.manage-states</h2> <h2 translate>dashboard.manage-states</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #deviceCredentialsForm="ngForm" [formGroup]="deviceCredentialsFormGroup" (ngSubmit)="save()" style="min-width: 350px;"> <form [formGroup]="deviceCredentialsFormGroup" (ngSubmit)="save()" style="min-width: 350px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>device.device-credentials</h2> <h2 translate>device.device-credentials</h2>
<span fxFlex></span> <span fxFlex></span>
@ -63,8 +63,8 @@
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions fxLayoutAlign="end center">
<button *ngIf="!isReadOnly" mat-raised-button color="primary" <button *ngIf="!isReadOnly" mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || deviceCredentialsForm.invalid [disabled]="(isLoading$ | async) || deviceCredentialsFormGroup.invalid
|| !deviceCredentialsForm.dirty"> || !deviceCredentialsFormGroup.dirty">
{{ 'action.save' | translate }} {{ 'action.save' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -74,7 +74,7 @@
[fxShow]="!isEdit && entity?.customerIsPublic && (deviceScope === 'customer' || deviceScope === 'tenant')"> [fxShow]="!isEdit && entity?.customerIsPublic && (deviceScope === 'customer' || deviceScope === 'tenant')">
{{ 'device.device-public' | translate }} {{ 'device.device-public' | translate }}
</div> </div>
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>device.name</mat-label> <mat-label translate>device.name</mat-label>

View File

@ -62,7 +62,7 @@
[fxShow]="!isEdit && entity?.customerIsPublic && (entityViewScope === 'customer' || entityViewScope === 'tenant')"> [fxShow]="!isEdit && entity?.customerIsPublic && (entityViewScope === 'customer' || entityViewScope === 'tenant')">
{{ 'entity-view.entity-view-public' | translate }} {{ 'entity-view.entity-view-public' | translate }}
</div> </div>
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>entity-view.name</mat-label> <mat-label translate>entity-view.name</mat-label>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #changePasswordForm="ngForm" [formGroup]="changePassword" (ngSubmit)="onChangePassword()"> <form [formGroup]="changePassword" (ngSubmit)="onChangePassword()">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2 translate>profile.change-password</h2> <h2 translate>profile.change-password</h2>
<span fxFlex></span> <span fxFlex></span>
@ -48,7 +48,7 @@
<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> <div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || changePasswordForm.invalid"> [disabled]="(isLoading$ | async) || changePassword.invalid">
{{ 'profile.change-password' | translate }} {{ 'profile.change-password' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -35,7 +35,7 @@
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<mat-card-content style="padding-top: 16px;"> <mat-card-content style="padding-top: 16px;">
<form #profileForm="ngForm" [formGroup]="profile" (ngSubmit)="save()"> <form [formGroup]="profile" (ngSubmit)="save()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>user.email</mat-label> <mat-label translate>user.email</mat-label>
@ -74,7 +74,7 @@
<span fxFlex></span> <span fxFlex></span>
<button mat-button mat-raised-button color="primary" <button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || profileForm.invalid || !profileForm.dirty"> [disabled]="(isLoading$ | async) || profile.invalid || !profile.dirty">
{{ 'action.save' | translate }} {{ 'action.save' | translate }}
</button> </button>
</div> </div>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #ruleNodeForm="ngForm" (ngSubmit)="add()" style="min-width: 650px;"> <form (ngSubmit)="add()" style="min-width: 650px;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2 translate>rulenode.add</h2> <h2 translate>rulenode.add</h2>
<span fxFlex></span> <span fxFlex></span>
@ -42,7 +42,7 @@
<span fxFlex></span> <span fxFlex></span>
<button mat-button mat-raised-button color="primary" <button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || tbRuleNode.ruleNodeForm.invalid || !tbRuleNode.ruleNodeForm.dirty"> [disabled]="(isLoading$ | async) || tbRuleNode.ruleNodeFormGroup.invalid || !tbRuleNode.ruleNodeFormGroup.dirty">
{{ 'action.add' | translate }} {{ 'action.add' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #ruleNodeLinkForm="ngForm" [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 900px;"> <form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 900px;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2 translate>rulenode.add-link</h2> <h2 translate>rulenode.add-link</h2>
<span fxFlex></span> <span fxFlex></span>

View File

@ -16,7 +16,7 @@
--> -->
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #ruleNodeForm="ngForm" [formGroup]="ruleNodeFormGroup"> <form [formGroup]="ruleNodeFormGroup">
<fieldset [disabled]="(isLoading$ | async) || !isEdit || isReadOnly"> <fieldset [disabled]="(isLoading$ | async) || !isEdit || isReadOnly">
<section *ngIf="ruleNode.component.type !== ruleNodeType.RULE_CHAIN"> <section *ngIf="ruleNode.component.type !== ruleNodeType.RULE_CHAIN">
<section fxLayout="column" fxLayout.gt-sm="row"> <section fxLayout="column" fxLayout.gt-sm="row">

View File

@ -32,8 +32,6 @@ import { RuleNodeConfigComponent } from './rule-node-config.component';
}) })
export class RuleNodeDetailsComponent extends PageComponent implements OnInit, OnChanges { export class RuleNodeDetailsComponent extends PageComponent implements OnInit, OnChanges {
@ViewChild('ruleNodeForm', {static: true}) ruleNodeForm: NgForm;
@ViewChild('ruleNodeConfigComponent') ruleNodeConfigComponent: RuleNodeConfigComponent; @ViewChild('ruleNodeConfigComponent') ruleNodeConfigComponent: RuleNodeConfigComponent;
@Input() @Input()

View File

@ -16,7 +16,7 @@
--> -->
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #ruleNodeLinkForm="ngForm" [formGroup]="ruleNodeLinkFormGroup"> <form [formGroup]="ruleNodeLinkFormGroup">
<tb-link-labels <tb-link-labels
required required
formControlName="labels" formControlName="labels"

View File

@ -33,8 +33,6 @@ import { TranslateService } from '@ngx-translate/core';
}) })
export class RuleNodeLinkComponent implements ControlValueAccessor, OnInit { export class RuleNodeLinkComponent implements ControlValueAccessor, OnInit {
@ViewChild('ruleNodeLinkForm', {static: true}) ruleNodeLinkForm: NgForm;
private requiredValue: boolean; private requiredValue: boolean;
get required(): boolean { get required(): boolean {
return this.requiredValue; return this.requiredValue;

View File

@ -107,7 +107,7 @@
(closeDetails)="onEditRuleNodeClosed()" (closeDetails)="onEditRuleNodeClosed()"
(toggleDetailsEditMode)="onRevertRuleNodeEdit()" (toggleDetailsEditMode)="onRevertRuleNodeEdit()"
(applyDetails)="saveRuleNode()" (applyDetails)="saveRuleNode()"
[theForm]="tbRuleNode.ruleNodeForm"> [theForm]="tbRuleNode.ruleNodeFormGroup">
<div class="details-buttons"> <div class="details-buttons">
<div [tb-help]="helpLinkIdForRuleNodeType()"></div> <div [tb-help]="helpLinkIdForRuleNodeType()"></div>
</div> </div>
@ -148,7 +148,7 @@
(closeDetails)="onEditRuleNodeLinkClosed()" (closeDetails)="onEditRuleNodeLinkClosed()"
(toggleDetailsEditMode)="onRevertRuleNodeLinkEdit()" (toggleDetailsEditMode)="onRevertRuleNodeLinkEdit()"
(applyDetails)="saveRuleNodeLink()" (applyDetails)="saveRuleNodeLink()"
[theForm]="tbRuleNodeLink.ruleNodeLinkForm"> [theForm]="tbRuleNodeLink.ruleNodeLinkFormGroup">
<div class="details-buttons"> <div class="details-buttons">
<div [tb-help]="'ruleEngine'"></div> <div [tb-help]="'ruleEngine'"></div>
</div> </div>

View File

@ -52,7 +52,7 @@
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>rulechain.name</mat-label> <mat-label translate>rulechain.name</mat-label>

View File

@ -40,7 +40,7 @@
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>tenant.title</mat-label> <mat-label translate>tenant.title</mat-label>

View File

@ -18,7 +18,7 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { NgForm } from '@angular/forms'; import { FormGroup, NgForm } from '@angular/forms';
import { UserComponent } from '@modules/home/pages/user/user.component'; import { UserComponent } from '@modules/home/pages/user/user.component';
import { Authority } from '@shared/models/authority.enum'; import { Authority } from '@shared/models/authority.enum';
import { ActivationMethod, activationMethodTranslations, User } from '@shared/models/user.model'; import { ActivationMethod, activationMethodTranslations, User } from '@shared/models/user.model';
@ -46,7 +46,7 @@ export interface AddUserDialogData {
}) })
export class AddUserDialogComponent extends DialogComponent<AddUserDialogComponent, User> implements OnInit { export class AddUserDialogComponent extends DialogComponent<AddUserDialogComponent, User> implements OnInit {
detailsForm: NgForm; detailsForm: FormGroup;
user: User; user: User;
activationMethods = Object.keys(ActivationMethod); activationMethods = Object.keys(ActivationMethod);
@ -71,7 +71,7 @@ export class AddUserDialogComponent extends DialogComponent<AddUserDialogCompone
this.user = {} as User; this.user = {} as User;
this.userComponent.isEdit = true; this.userComponent.isEdit = true;
this.userComponent.entity = this.user; this.userComponent.entity = this.user;
this.detailsForm = this.userComponent.entityNgForm; this.detailsForm = this.userComponent.entityForm;
} }
cancel(): void { cancel(): void {

View File

@ -55,7 +55,7 @@
</button> </button>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>user.email</mat-label> <mat-label translate>user.email</mat-label>

View File

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<form #saveWidgetTypeAsForm="ngForm" [formGroup]="saveWidgetTypeAsFormGroup" (ngSubmit)="saveAs()"> <form [formGroup]="saveWidgetTypeAsFormGroup" (ngSubmit)="saveAs()">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>widget.save-widget-type-as</h2> <h2 translate>widget.save-widget-type-as</h2>
<span fxFlex></span> <span fxFlex></span>
@ -48,8 +48,8 @@
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions fxLayoutAlign="end center">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || saveWidgetTypeAsForm.invalid [disabled]="(isLoading$ | async) || saveWidgetTypeAsFormGroup.invalid
|| !saveWidgetTypeAsForm.dirty"> || !saveWidgetTypeAsFormGroup.dirty">
{{ 'action.saveAs' | translate }} {{ 'action.saveAs' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"

View File

@ -36,7 +36,7 @@
</button> </button>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding" fxLayout="column">
<form #entityNgForm="ngForm" [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>widgets-bundle.title</mat-label> <mat-label translate>widgets-bundle.title</mat-label>

View File

@ -24,7 +24,7 @@
</mat-progress-bar> </mat-progress-bar>
<span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span> <span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span>
<mat-card-content> <mat-card-content>
<form #createPasswordForm="ngForm" [formGroup]="createPassword" (ngSubmit)="onCreatePassword()"> <form [formGroup]="createPassword" (ngSubmit)="onCreatePassword()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding"> <div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span> <span style="height: 50px;"></span>

View File

@ -18,7 +18,7 @@
<div class="tb-login-content mat-app-background tb-dark" fxFlex fxLayoutAlign="center center"> <div class="tb-login-content mat-app-background tb-dark" fxFlex fxLayoutAlign="center center">
<mat-card style="height: 100%; max-height: 525px; overflow-y: auto;"> <mat-card style="height: 100%; max-height: 525px; overflow-y: auto;">
<mat-card-content> <mat-card-content>
<form #loginForm="ngForm" class="tb-login-form" [formGroup]="loginFormGroup" (ngSubmit)="login()"> <form class="tb-login-form" [formGroup]="loginFormGroup" (ngSubmit)="login()">
<fieldset [disabled]="isLoading$ | async" fxLayout="column"> <fieldset [disabled]="isLoading$ | async" fxLayout="column">
<div fxLayout="column" fxLayoutAlign="start center" style="padding: 15px 0;"> <div fxLayout="column" fxLayoutAlign="start center" style="padding: 15px 0;">
<tb-logo class="login-logo"></tb-logo> <tb-logo class="login-logo"></tb-logo>

View File

@ -24,7 +24,7 @@
</mat-progress-bar> </mat-progress-bar>
<span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span> <span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span>
<mat-card-content> <mat-card-content>
<form #requestPasswordResetForm="ngForm" [formGroup]="requestPasswordRequest" (ngSubmit)="sendResetPasswordLink()"> <form [formGroup]="requestPasswordRequest" (ngSubmit)="sendResetPasswordLink()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding"> <div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span> <span style="height: 50px;"></span>

View File

@ -27,7 +27,7 @@
</mat-progress-bar> </mat-progress-bar>
<span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span> <span style="height: 4px;" *ngIf="!(isLoading$ | async)"></span>
<mat-card-content> <mat-card-content>
<form #resetPasswordForm="ngForm" [formGroup]="resetPassword" (ngSubmit)="onResetPassword()"> <form [formGroup]="resetPassword" (ngSubmit)="onResetPassword()">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding"> <div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span> <span style="height: 50px;"></span>

View File

@ -16,7 +16,7 @@
--> -->
<form class="tb-node-script-test-dialog" <form class="tb-node-script-test-dialog"
#nodeScriptTestForm="ngForm" [formGroup]="nodeScriptTestFormGroup" (ngSubmit)="save()"> [formGroup]="nodeScriptTestFormGroup" (ngSubmit)="save()">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar fxLayout="row" color="primary">
<h2>{{ 'rulenode.test-script-function' | translate }}</h2> <h2>{{ 'rulenode.test-script-function' | translate }}</h2>
<span fxFlex></span> <span fxFlex></span>