|
1 | 1 | <div class="form-group {{::form.htmlClass}}" |
2 | 2 | ng-class="{ '{{'schema-form-' + form.type}}': true, 'has-error': form.disableErrorState !== true && hasError(), 'has-success': form.disableSuccessState !== true && hasSuccess(), 'has-feedback': form.feedback !== false }"> |
3 | | - <label class="control-label {{::form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label> |
| 3 | + <label class="control-label {{::form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle()}" for="{{::fieldId(true, false)}}">{{form.title}}</label> |
4 | 4 |
|
5 | 5 | <input ng-if="!form.fieldAddonLeft && !form.fieldAddonRight" |
6 | 6 | ng-show="::form.key" |
|
9 | 9 | sf-changed="form" |
10 | 10 | placeholder="{{::form.placeholder}}" |
11 | 11 | class="form-control {{::form.fieldHtmlClass}}" |
12 | | - id="{{form.key.slice(-1)[0]}}" |
| 12 | + id="{{::fieldId(true, false)}}" |
13 | 13 | sf-field-model |
14 | 14 | ng-disabled="form.readonly" |
15 | 15 | schema-validate="form" |
16 | | - name="{{form.key.slice(-1)[0]}}" |
17 | | - aria-describedby="{{form.key.slice(-1)[0] + 'Status'}}"> |
| 16 | + name="{{::fieldId(true, false)}}" |
| 17 | + aria-describedby="{{::fieldId(true, true) + '-status'}}"> |
18 | 18 |
|
19 | 19 | <div ng-if="form.fieldAddonLeft || form.fieldAddonRight" |
20 | 20 | ng-class="{'input-group': (form.fieldAddonLeft || form.fieldAddonRight)}"> |
|
27 | 27 | sf-changed="form" |
28 | 28 | placeholder="{{::form.placeholder}}" |
29 | 29 | class="form-control {{::form.fieldHtmlClass}}" |
30 | | - id="{{form.key.slice(-1)[0]}}" |
| 30 | + id="{{::fieldId(true, false)}}" |
31 | 31 | sf-field-model |
32 | 32 | ng-disabled="form.readonly" |
33 | 33 | schema-validate="form" |
34 | | - name="{{form.key.slice(-1)[0]}}" |
35 | | - aria-describedby="{{form.key.slice(-1)[0] + 'Status'}}"> |
| 34 | + name="{{::fieldId(true, false)}}" |
| 35 | + aria-describedby="{{::fieldId(true, true) + '-status'}}"> |
36 | 36 |
|
37 | 37 | <span ng-if="form.fieldAddonRight" |
38 | 38 | class="input-group-addon" |
|
45 | 45 | aria-hidden="true"></span> |
46 | 46 |
|
47 | 47 | <span ng-if="hasError() || hasSuccess()" |
48 | | - id="{{form.key.slice(-1)[0] + 'Status'}}" |
| 48 | + id="{{::fieldId(true, true) + '-status'}}" |
49 | 49 | class="sr-only">{{ hasSuccess() ? '(success)' : '(error)' }}</span> |
50 | 50 |
|
51 | 51 | <div class="help-block" sf-message="form.description"></div> |
|
0 commit comments