[Forms] Let Angular force required rows
Pass along ng-required values such that Angular may handle tracking of form validity based on the presence of required fields. WTD-530.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<select class='form-control input select'
|
<select class='form-control input select'
|
||||||
ng-model="ngModel[field]"
|
ng-model="ngModel[field]"
|
||||||
ng-options="o.name for o in options"
|
ng-options="o.name for o in options"
|
||||||
|
ng-required="ngRequired"
|
||||||
name="mctControl">
|
name="mctControl">
|
||||||
<option value="" ng-if="!ngModel[field]">- Select One -</option>
|
<option value="" ng-if="!ngModel[field]">- Select One -</option>
|
||||||
<span class='ui-symbol arw colorKey'>v</span>
|
<span class='ui-symbol arw colorKey'>v</span>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<span class='form-control shell'>
|
<span class='form-control shell'>
|
||||||
<span class='field control'>
|
<span class='field control'>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
ng-required="ngRequired"
|
||||||
ng-model="ngModel[field]"
|
ng-model="ngModel[field]"
|
||||||
name="mctControl">
|
name="mctControl">
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ define(
|
|||||||
// Enabled/disabled state
|
// Enabled/disabled state
|
||||||
ngDisabled: "=",
|
ngDisabled: "=",
|
||||||
|
|
||||||
|
// Whether or not input is required
|
||||||
|
ngRequired: "=",
|
||||||
|
|
||||||
// Pattern (for input fields)
|
// Pattern (for input fields)
|
||||||
ngPattern: "=",
|
ngPattern: "=",
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user