mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
[Forms] Handle required flag in composite controls
Handle the ng-required flag in composite controls. WTD-593.
This commit is contained in:
parent
d54524a96c
commit
6a6797bf53
@ -18,15 +18,14 @@
|
|||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"name": "Width (px)",
|
"name": "Width (px)",
|
||||||
"control": "textfield",
|
"control": "textfield"
|
||||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Height (px)",
|
"name": "Height (px)",
|
||||||
"control": "textfield",
|
"control": "textfield"
|
||||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pattern": "^(\\d*[1-9]\\d*)?$",
|
||||||
"property": "preferredSize",
|
"property": "preferredSize",
|
||||||
"conversion": "number[]"
|
"conversion": "number[]"
|
||||||
},
|
},
|
||||||
@ -36,15 +35,14 @@
|
|||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"name": "Horizontal grid (px)",
|
"name": "Horizontal grid (px)",
|
||||||
"control": "textfield",
|
"control": "textfield"
|
||||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Vertical grid (px)",
|
"name": "Vertical grid (px)",
|
||||||
"control": "textfield",
|
"control": "textfield"
|
||||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pattern": "^(\\d*[1-9]\\d*)?$",
|
||||||
"property": "layoutGrid",
|
"property": "layoutGrid",
|
||||||
"conversion": "number[]"
|
"conversion": "number[]"
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
|
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
|
||||||
<mct-control key="item.control"
|
<mct-control key="item.control"
|
||||||
ng-model="ngModel[field]"
|
ng-model="ngModel[field]"
|
||||||
ng-required="item.required"
|
ng-required="ngRequired"
|
||||||
ng-pattern="ngPattern"
|
ng-pattern="ngPattern"
|
||||||
options="item.options"
|
options="item.options"
|
||||||
structure="row"
|
structure="row"
|
||||||
|
Loading…
Reference in New Issue
Block a user