mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 05:55:59 -03:30
enable input source linking for secret textarea fields
This commit is contained in:
@@ -93,6 +93,13 @@ function AtInputTextareaSecretController (baseInputController, eventService) {
|
|||||||
input.value = '';
|
input.value = '';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vm.onLookupClick = () => {
|
||||||
|
if (scope.state._onInputLookup) {
|
||||||
|
const { id, label, required, type } = scope.state;
|
||||||
|
scope.state._onInputLookup({ id, label, required, type });
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
AtInputTextareaSecretController.$inject = [
|
AtInputTextareaSecretController.$inject = [
|
||||||
|
|||||||
@@ -1,32 +1,61 @@
|
|||||||
<div class="col-sm-{{::col}} at-InputContainer">
|
<div class="col-sm-{{::col}} at-InputContainer">
|
||||||
<div class="form-group at-u-flat">
|
<div class="form-group at-u-flat">
|
||||||
<at-input-label></at-input-label>
|
<at-input-label></at-input-label>
|
||||||
|
<div ng-class="{ 'input-group': state.tagMode }">
|
||||||
<div ng-class="{ 'input-group': state._edit }">
|
<div class="input-group-btn at-InputGroup-button input-group-prepend" ng-show="state.tagMode">
|
||||||
<div ng-if="state._edit" class="input-group-btn at-InputGroup-button input-group-prepend">
|
<button
|
||||||
<button class="btn at-ButtonHollow--white at-Input-button--fixed-md"
|
class="btn at-ButtonHollow--white at-Input-button--long-sm"
|
||||||
ng-disabled="!state._enableToggle && (state._disabled || form.disabled)"
|
ng-disabled="state._disabled || form.disabled"
|
||||||
ng-click="state._isBeingReplaced = !state._isBeingReplaced">
|
ng-click="vm.onLookupClick()"
|
||||||
{{ state._buttonText }}
|
>
|
||||||
|
<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>
|
</button>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<at-input-message></at-input-message>
|
<at-input-message></at-input-message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user