mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 22:17:49 +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": [
|
||||
{
|
||||
"name": "Width (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
"control": "textfield"
|
||||
},
|
||||
{
|
||||
"name": "Height (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
"control": "textfield"
|
||||
}
|
||||
],
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$",
|
||||
"property": "preferredSize",
|
||||
"conversion": "number[]"
|
||||
},
|
||||
@ -36,15 +35,14 @@
|
||||
"items": [
|
||||
{
|
||||
"name": "Horizontal grid (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
"control": "textfield"
|
||||
},
|
||||
{
|
||||
"name": "Vertical grid (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
"control": "textfield"
|
||||
}
|
||||
],
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$",
|
||||
"property": "layoutGrid",
|
||||
"conversion": "number[]"
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
|
||||
<mct-control key="item.control"
|
||||
ng-model="ngModel[field]"
|
||||
ng-required="item.required"
|
||||
ng-required="ngRequired"
|
||||
ng-pattern="ngPattern"
|
||||
options="item.options"
|
||||
structure="row"
|
||||
|
Loading…
Reference in New Issue
Block a user