mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
enable input source linking for secret textarea fields
This commit is contained in:
parent
957804e22a
commit
215c3c87e5
@ -93,6 +93,13 @@ function AtInputTextareaSecretController (baseInputController, eventService) {
|
||||
input.value = '';
|
||||
});
|
||||
};
|
||||
|
||||
vm.onLookupClick = () => {
|
||||
if (scope.state._onInputLookup) {
|
||||
const { id, label, required, type } = scope.state;
|
||||
scope.state._onInputLookup({ id, label, required, type });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
AtInputTextareaSecretController.$inject = [
|
||||
|
||||
@ -1,32 +1,61 @@
|
||||
<div class="col-sm-{{::col}} at-InputContainer">
|
||||
<div class="form-group at-u-flat">
|
||||
<at-input-label></at-input-label>
|
||||
|
||||
<div ng-class="{ 'input-group': state._edit }">
|
||||
<div ng-if="state._edit" class="input-group-btn at-InputGroup-button input-group-prepend">
|
||||
<button class="btn at-ButtonHollow--white at-Input-button--fixed-md"
|
||||
ng-disabled="!state._enableToggle && (state._disabled || form.disabled)"
|
||||
ng-click="state._isBeingReplaced = !state._isBeingReplaced">
|
||||
{{ state._buttonText }}
|
||||
<div ng-class="{ 'input-group': state.tagMode }">
|
||||
<div class="input-group-btn at-InputGroup-button input-group-prepend" ng-show="state.tagMode">
|
||||
<button
|
||||
class="btn at-ButtonHollow--white at-Input-button--long-sm"
|
||||
ng-disabled="state._disabled || form.disabled"
|
||||
ng-click="vm.onLookupClick()"
|
||||
>
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
ng-show="ssh && !state.asTag"
|
||||
ng-disabled="state._disabled || form.disabled"
|
||||
class="at-InputFile--hidden"
|
||||
ng-class="{'at-InputFile--drag': drag }"
|
||||
type="file"
|
||||
name="files"
|
||||
/>
|
||||
<div
|
||||
ng-show="state.asTag"
|
||||
class="form-control at-Input at-InputTaggedTextarea"
|
||||
ng-class="{
|
||||
'at-Input--rejected': state._rejected,
|
||||
}"
|
||||
>
|
||||
<div class="at-InputTagContainer">
|
||||
<at-tag
|
||||
icon="external"
|
||||
tag="state._tagValue"
|
||||
remove-tag="state._onRemoveTag(state)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<textarea
|
||||
class="form-control at-Input at-InputTextarea"
|
||||
ng-show="!state.asTag"
|
||||
ng-model="state[state._activeModel]"
|
||||
ng-class="{ 'at-Input--rejected': state._rejected }"
|
||||
ng-attr-rows="{{::state._rows || 6 }}"
|
||||
ng-attr-maxlength="{{ state.max_length || undefined }}"
|
||||
ng-attr-tabindex="{{ tab || undefined }}"
|
||||
ng-attr-placeholder="{{state._placeholder || undefined }}"
|
||||
ng-disabled="state._disabled || form.disabled"
|
||||
/>
|
||||
<div ng-if="state._edit" class="input-group-btn at-InputGroup-button input-group-append">
|
||||
<button
|
||||
class="btn at-ButtonHollow--white at-Input-button--long-sm"
|
||||
ng-disabled="state.asTag || (!state._enableToggle && (state._disabled || form.disabled))"
|
||||
ng-click="state._isBeingReplaced = !state._isBeingReplaced"
|
||||
>
|
||||
<i ng-show="!state._isBeingReplaced" class="fa fa-undo"></i>
|
||||
<i ng-show="state._isBeingReplaced" class="fa fa-undo fa-flip-horizontal"></i>
|
||||
</button>
|
||||
</div>
|
||||
<input ng-show="ssh"
|
||||
ng-disabled="state._disabled || form.disabled"
|
||||
class="at-InputFile--hidden"
|
||||
ng-class="{'at-InputFile--drag': drag }"
|
||||
type="file"
|
||||
name="files" />
|
||||
<textarea class="form-control at-Input at-InputTextarea"
|
||||
ng-model="state[state._activeModel]"
|
||||
ng-class="{ 'at-Input--rejected': state._rejected }"
|
||||
ng-attr-rows="{{::state._rows || 6 }}"
|
||||
ng-attr-maxlength="{{ state.max_length || undefined }}"
|
||||
ng-attr-tabindex="{{ tab || undefined }}"
|
||||
ng-attr-placeholder="{{state._placeholder || undefined }}"
|
||||
ng-disabled="state._disabled || form.disabled" />
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<at-input-message></at-input-message>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user