diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html
index aa603be9a..598cd1eb2 100644
--- a/ui/src/app/app.component.html
+++ b/ui/src/app/app.component.html
@@ -65,7 +65,7 @@
- {{ brand.footer.text }}
-
-
+
{{ link.label }}
diff --git a/ui/src/app/schema-form/widget/datalist/datalist.component.html b/ui/src/app/schema-form/widget/datalist/datalist.component.html
index 1471be3b5..b9ac71372 100644
--- a/ui/src/app/schema-form/widget/datalist/datalist.component.html
+++ b/ui/src/app/schema-form/widget/datalist/datalist.component.html
@@ -1,8 +1,9 @@
diff --git a/ui/src/app/schema-form/widget/datalist/datalist.component.ts b/ui/src/app/schema-form/widget/datalist/datalist.component.ts
index ce3244e6f..8324b2753 100644
--- a/ui/src/app/schema-form/widget/datalist/datalist.component.ts
+++ b/ui/src/app/schema-form/widget/datalist/datalist.component.ts
@@ -25,6 +25,7 @@ export class DatalistComponent extends ControlWidget implements AfterViewInit {
} else {
this.control.enable();
}
+ console.log(this.formProperty);
}
getData(query: string): void {
diff --git a/ui/src/app/schema-form/widget/number/float.component.html b/ui/src/app/schema-form/widget/number/float.component.html
index 56e15bc69..7ba661eb1 100644
--- a/ui/src/app/schema-form/widget/number/float.component.html
+++ b/ui/src/app/schema-form/widget/number/float.component.html
@@ -1,8 +1,9 @@
-
diff --git a/ui/src/app/schema-form/widget/number/float.component.ts b/ui/src/app/schema-form/widget/number/float.component.ts
index c7e2083f5..f78495b64 100644
--- a/ui/src/app/schema-form/widget/number/float.component.ts
+++ b/ui/src/app/schema-form/widget/number/float.component.ts
@@ -3,6 +3,7 @@ import {
} from '@angular/core';
import { IntegerWidget } from 'ngx-schema-form';
import { SchemaService } from '../../service/schema.service';
+import { HARD_CODED_REQUIRED_MSG, REQUIRED_MSG_OVERRIDE } from '../../model/messages';
@Component({
selector: 'float-component',
@@ -65,4 +66,8 @@ export class CustomFloatComponent extends IntegerWidget implements AfterViewInit
this.schema.minimum :
this.formProperty.value === null ? null : this.schema.minimum;
}
+
+ getError(error: string): string {
+ return HARD_CODED_REQUIRED_MSG.test(error) ? REQUIRED_MSG_OVERRIDE : error;
+ }
}
diff --git a/ui/src/app/schema-form/widget/number/number.component.html b/ui/src/app/schema-form/widget/number/number.component.html
index c1c78d34c..976150817 100644
--- a/ui/src/app/schema-form/widget/number/number.component.html
+++ b/ui/src/app/schema-form/widget/number/number.component.html
@@ -1,8 +1,9 @@
-
+
{{ schema.title }}
+ required
@@ -21,5 +22,24 @@
[attr.maxLength]="schema.maxLength || null"
[attr.minLength]="schema.minLength || null"
[attr.step]="schema.multipleOf || schema.widget.step"
- [attr.aria-label]="schema.title">
+ [attr.required]="schema.isRequired || null"
+ [attr.aria-invalid]="errorMessages && errorMessages.length > 0"
+ [attr.aria-describedby]="formProperty._canonicalPath + '-help'">
+
+
+ ,
+ error
+
+
+
+ {{ schema.widget.help }}
+
diff --git a/ui/src/app/schema-form/widget/number/number.component.ts b/ui/src/app/schema-form/widget/number/number.component.ts
index 0f4cdcba9..6a1675373 100644
--- a/ui/src/app/schema-form/widget/number/number.component.ts
+++ b/ui/src/app/schema-form/widget/number/number.component.ts
@@ -3,6 +3,7 @@ import {
} from '@angular/core';
import { IntegerWidget } from 'ngx-schema-form';
import { SchemaService } from '../../service/schema.service';
+import { HARD_CODED_REQUIRED_MSG, REQUIRED_MSG_OVERRIDE } from '../../model/messages';
@Component({
selector: 'integer-component',
@@ -18,4 +19,8 @@ export class CustomIntegerComponent extends IntegerWidget {
get required(): boolean {
return this.widgetService.isRequired(this.formProperty);
}
+
+ getError(error: string): string {
+ return HARD_CODED_REQUIRED_MSG.test(error) ? REQUIRED_MSG_OVERRIDE : error;
+ }
}
diff --git a/ui/src/app/schema-form/widget/select/select.component.html b/ui/src/app/schema-form/widget/select/select.component.html
index 832c9bf3f..f8945347d 100644
--- a/ui/src/app/schema-form/widget/select/select.component.html
+++ b/ui/src/app/schema-form/widget/select/select.component.html
@@ -1,8 +1,9 @@
-
+
{{ schema.title }}
+ required
{{ formProperty.parent.schema.title }}
@@ -19,7 +20,11 @@
[formControl]="control"
[attr.name]="name"
class="form-control"
- [attr.aria-label]="schema.title">
+ [attr.aria-label]="schema.title"
+ [ngClass]="{'text-muted': !this.formProperty.value}"
+ [attr.required]="schema.isRequired || null"
+ [attr.aria-invalid]="errorMessages && errorMessages.length > 0"
+ [attr.aria-describedby]="formProperty._canonicalPath + '-help'">
-
+
,
error
-
+
+ {{ schema.widget.help }}
+
diff --git a/ui/src/app/schema-form/widget/string/string.component.html b/ui/src/app/schema-form/widget/string/string.component.html
index a279bad23..9c629f873 100644
--- a/ui/src/app/schema-form/widget/string/string.component.html
+++ b/ui/src/app/schema-form/widget/string/string.component.html
@@ -1,8 +1,9 @@