mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-25 09:21:48 -05:00
Add implementation for credential_type lookup
This commit is contained in:
@@ -39,7 +39,7 @@ function atFormActionController ($state) {
|
||||
scope.text = 'CANCEL';
|
||||
scope.fill = 'Hollow';
|
||||
scope.color = 'default';
|
||||
scope.action = () => $state.go('^');
|
||||
scope.action = () => $state.go(scope.to || '^');
|
||||
};
|
||||
|
||||
vm.setSaveDefaults = () => {
|
||||
@@ -64,7 +64,8 @@ function atFormAction (pathService) {
|
||||
link,
|
||||
scope: {
|
||||
state: '=',
|
||||
type: '@'
|
||||
type: '@',
|
||||
to: '@'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,16 +19,20 @@ function AtInputLookupController (baseInputController, $state, $stateParams) {
|
||||
|
||||
scope = _scope_;
|
||||
|
||||
scope.$watch(scope.state._resource, () => {
|
||||
if (scope[scope.state._resource]) {
|
||||
scope.state._value = scope[scope.state._resource];
|
||||
scope.state._displayValue = scope[`${scope.state._resource}_name`];
|
||||
}
|
||||
});
|
||||
scope.$watch(scope.state._resource, vm.watchResource);
|
||||
|
||||
vm.check();
|
||||
};
|
||||
|
||||
vm.watchResource = () => {
|
||||
if (scope[scope.state._resource]) {
|
||||
scope.state._value = scope[scope.state._resource];
|
||||
scope.state._displayValue = scope[`${scope.state._resource}_name`];
|
||||
|
||||
vm.check();
|
||||
}
|
||||
};
|
||||
|
||||
vm.search = () => {
|
||||
let params = {};
|
||||
|
||||
@@ -36,7 +40,6 @@ function AtInputLookupController (baseInputController, $state, $stateParams) {
|
||||
params.selected = scope.state._value;
|
||||
}
|
||||
|
||||
console.log(scope.state);
|
||||
$state.go(scope.state._route, params);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user