mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
select2ify credential type in add cred modals
This commit is contained in:
parent
8061667ace
commit
b5b619d491
@ -201,6 +201,7 @@
|
||||
.JobSubmission-credentialSubSection {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.JobSubmission-selectedItemLabel, .JobSubmission-label {
|
||||
@ -251,3 +252,7 @@
|
||||
.JobSubmission-previewTagContainer {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.JobSubmission-credentialSubSection .select2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
import jobSubmissionController from './job-submission.controller';
|
||||
|
||||
export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseTypeChange', 'GetSurveyQuestions',
|
||||
function(templateUrl, CreateDialog, Wait, CreateSelect2, ParseTypeChange, GetSurveyQuestions) {
|
||||
export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseTypeChange', 'GetSurveyQuestions', 'i18n',
|
||||
function(templateUrl, CreateDialog, Wait, CreateSelect2, ParseTypeChange, GetSurveyQuestions, i18n) {
|
||||
return {
|
||||
scope: {
|
||||
submitJobId: '=',
|
||||
@ -55,6 +55,12 @@ export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseT
|
||||
multiple: false
|
||||
});
|
||||
|
||||
CreateSelect2({
|
||||
element: `#job-launch-credential-kind-select`,
|
||||
multiple: false,
|
||||
placeholder: i18n._('Select a credential')
|
||||
});
|
||||
|
||||
if(scope.step === 'otherprompts' && scope.ask_variables_on_launch) {
|
||||
ParseTypeChange({
|
||||
scope: scope,
|
||||
|
@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<div class="JobSubmission-credentialSubSection" ng-show="ask_credential_on_launch">
|
||||
<span class="JobSubmission-label" translate>CREDENTIAL TYPE:</span>
|
||||
<select ng-model="credentialKind">
|
||||
<select id="job-launch-credential-kind-select" ng-model="credentialKind">
|
||||
<option ng-repeat="option in credentialTypeOptions" value="{{option.value}}">{{option.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile',
|
||||
function(templateUrl, Rest, GetBasePath, GenerateList, $compile) {
|
||||
export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile', 'CreateSelect2', 'i18n',
|
||||
function(templateUrl, Rest, GetBasePath, GenerateList, $compile, CreateSelect2, i18n) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
@ -17,6 +17,12 @@ export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile'
|
||||
$(element).remove();
|
||||
});
|
||||
|
||||
CreateSelect2({
|
||||
element: `#multi-credential-kind-select`,
|
||||
multiple: false,
|
||||
placeholder: i18n._('Select a credential')
|
||||
});
|
||||
|
||||
scope.showModal = function() {
|
||||
$('#multi-credential-modal').modal('show');
|
||||
};
|
||||
|
@ -50,7 +50,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="MultiCredential-credentialSubSection">
|
||||
<select ng-model="credentialKind">
|
||||
<span class="MultiCredential-selectLabel" translate>CREDENTIAL TYPE:</span>
|
||||
<select id="multi-credential-kind-select" ng-model="credentialKind">
|
||||
<option ng-repeat="option in credentialTypeOptions"
|
||||
value="{{option.value}}">{{option.name}}</option>
|
||||
</select>
|
||||
|
@ -108,5 +108,17 @@
|
||||
.MultiCredential-credentialSubSection {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.MultiCredential-credentialSubSection .select2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.MultiCredential-selectLabel {
|
||||
color: @default-interface-txt;
|
||||
margin-right: 10px;
|
||||
line-height: 24px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user