From 957804e22a13b0bb910b6e1a392cf3c31c35e808 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 12 Mar 2019 20:26:42 -0400 Subject: [PATCH] enable input source linking for textarea fields --- .../input-source-lookup.partial.html | 12 ++--- .../client/lib/components/input/_index.less | 19 ++++++++ .../components/input/textarea.directive.js | 13 +++++- .../components/input/textarea.partial.html | 45 ++++++++++++++----- 4 files changed, 71 insertions(+), 18 deletions(-) diff --git a/awx/ui/client/features/credentials/input-source-lookup.partial.html b/awx/ui/client/features/credentials/input-source-lookup.partial.html index 844fb5887d..74de2429f2 100644 --- a/awx/ui/client/features/credentials/input-source-lookup.partial.html +++ b/awx/ui/client/features/credentials/input-source-lookup.partial.html @@ -18,11 +18,13 @@ {{::vm.strings.get('inputSources.SELECTED')}} - +
+ +
{ - baseInputController.call(vm, 'input', scope, element, form); + vm.init = (_scope_, element, form) => { + baseInputController.call(vm, 'input', _scope_, element, form); + scope = _scope_; vm.check(); }; + + vm.onLookupClick = () => { + if (scope.state._onInputLookup) { + const { id, label, required, type } = scope.state; + scope.state._onInputLookup({ id, label, required, type }); + } + }; } AtInputTextareaController.$inject = ['BaseInputController']; diff --git a/awx/ui/client/lib/components/input/textarea.partial.html b/awx/ui/client/lib/components/input/textarea.partial.html index bc0738dc9f..4eb276f35f 100644 --- a/awx/ui/client/lib/components/input/textarea.partial.html +++ b/awx/ui/client/lib/components/input/textarea.partial.html @@ -1,17 +1,40 @@
- - - +
+
+ +
+
+
+ +
+
+