Skip to content

Commit 0187848

Browse files
committed
Specification Validation will no longer disable save Button
1 parent 3d8f94e commit 0187848

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/app/configure/configure.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export class ConfigureComponent implements OnInit {
8484
return (this.mqttConnectIcon != 'cast_connected' &&
8585
this.config &&
8686
!this.config.hassiotoken)
87-
|| (this.configureMqttFormGroup.pristine && this.ghPersonalAccessToken.pristine)
87+
|| (this.configureMqttFormGroup.pristine &&
88+
this.ghPersonalAccessToken.pristine &&
89+
this.discoveryLanguageFormControl.pristine)
8890
}
8991
configObservable = this.entityApiService.getConfiguration();
9092
sslFiles: string[] = [];

src/app/specification/entity/entity.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<form [formGroup]="entityFormGroup">
4949
<div class="flexcols">
5050
<mat-form-field class="smallfield">
51-
<mat-label>Name({{specificationMethods?specificationMethods.getMqttLanguageName():""}})</mat-label>
51+
<mat-label>Name({{(specificationMethods?specificationMethods.getMqttLanguageName():"") + (this.entity.id >= 0 ? "," + this.entity.id :"")}})</mat-label>
5252
<input matInput #entityName type="text" class="width150pt" formControlName="name"
5353
[errorStateMatcher]="errorStateMatcher" (change)="onEntityNameValueChange()">
5454
<mat-error *ngIf="entityFormGroup!.get('name')?.hasError('required') != null">

src/app/specification/specification/specification.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ export class SpecificationComponent
739739
}
740740

741741
isValid(): boolean {
742-
if (this.currentSpecification && this.validationMessages.length == 0) {
742+
if (this.currentSpecification ) {
743743
return this.validationForms.valid;
744744
}
745745
return false;

0 commit comments

Comments
 (0)