mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-12 15:58:38 -05:00
Adds id's to all form groups and new forms
This commit is contained in:
@@ -16,6 +16,7 @@ function AtInputGroupController ($scope, $compile) {
|
||||
let state;
|
||||
let source;
|
||||
let element;
|
||||
let formId;
|
||||
|
||||
vm.init = (_scope_, _form_, _element_) => {
|
||||
form = _form_;
|
||||
@@ -23,6 +24,7 @@ function AtInputGroupController ($scope, $compile) {
|
||||
element = _element_;
|
||||
state = scope.state || {};
|
||||
source = state._source;
|
||||
formId = scope.formId;
|
||||
|
||||
$scope.$watch('state._source._value', vm.update);
|
||||
};
|
||||
@@ -145,7 +147,7 @@ function AtInputGroupController ($scope, $compile) {
|
||||
const tabindex = Number(scope.tab) + index;
|
||||
const col = input._expand ? 12 : scope.col;
|
||||
const component = angular.element(`<${input._component} col="${col}" tab="${tabindex}"
|
||||
state="${state._reference}._group[${index}]">
|
||||
state="${state._reference}._group[${index}]" id="${formId}_${input.id}_group">
|
||||
</${input._component}>`);
|
||||
|
||||
$compile(component)(scope.$parent);
|
||||
@@ -183,7 +185,8 @@ function atInputGroup () {
|
||||
scope: {
|
||||
state: '=',
|
||||
col: '@',
|
||||
tab: '@'
|
||||
tab: '@',
|
||||
formId: '@'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user