mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Merge pull request #6630 from jlmitch5/select2CredentialType
select2ify credential type in add cred modals
This commit is contained in:
commit
be3b0ff330
@ -201,6 +201,7 @@
|
|||||||
.JobSubmission-credentialSubSection {
|
.JobSubmission-credentialSubSection {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
.JobSubmission-selectedItemLabel, .JobSubmission-label {
|
.JobSubmission-selectedItemLabel, .JobSubmission-label {
|
||||||
@ -251,3 +252,7 @@
|
|||||||
.JobSubmission-previewTagContainer {
|
.JobSubmission-previewTagContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.JobSubmission-credentialSubSection .select2 {
|
||||||
|
width: 50% !important;
|
||||||
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
import jobSubmissionController from './job-submission.controller';
|
import jobSubmissionController from './job-submission.controller';
|
||||||
|
|
||||||
export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseTypeChange', 'GetSurveyQuestions',
|
export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseTypeChange', 'GetSurveyQuestions', 'i18n',
|
||||||
function(templateUrl, CreateDialog, Wait, CreateSelect2, ParseTypeChange, GetSurveyQuestions) {
|
function(templateUrl, CreateDialog, Wait, CreateSelect2, ParseTypeChange, GetSurveyQuestions, i18n) {
|
||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
submitJobId: '=',
|
submitJobId: '=',
|
||||||
@ -55,6 +55,12 @@ export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseT
|
|||||||
multiple: false
|
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) {
|
if(scope.step === 'otherprompts' && scope.ask_variables_on_launch) {
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="JobSubmission-credentialSubSection" ng-show="ask_credential_on_launch">
|
<div class="JobSubmission-credentialSubSection" ng-show="ask_credential_on_launch">
|
||||||
<span class="JobSubmission-label" translate>CREDENTIAL TYPE:</span>
|
<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>
|
<option ng-repeat="option in credentialTypeOptions" value="{{option.value}}">{{option.name}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile',
|
export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile', 'CreateSelect2', 'i18n',
|
||||||
function(templateUrl, Rest, GetBasePath, GenerateList, $compile) {
|
function(templateUrl, Rest, GetBasePath, GenerateList, $compile, CreateSelect2, i18n) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
@ -17,6 +17,12 @@ export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile'
|
|||||||
$(element).remove();
|
$(element).remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
CreateSelect2({
|
||||||
|
element: `#multi-credential-kind-select`,
|
||||||
|
multiple: false,
|
||||||
|
placeholder: i18n._('Select a credential')
|
||||||
|
});
|
||||||
|
|
||||||
scope.showModal = function() {
|
scope.showModal = function() {
|
||||||
$('#multi-credential-modal').modal('show');
|
$('#multi-credential-modal').modal('show');
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="MultiCredential-credentialSubSection">
|
<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"
|
<option ng-repeat="option in credentialTypeOptions"
|
||||||
value="{{option.value}}">{{option.name}}</option>
|
value="{{option.value}}">{{option.name}}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -108,5 +108,17 @@
|
|||||||
.MultiCredential-credentialSubSection {
|
.MultiCredential-credentialSubSection {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
margin-bottom: 15px;
|
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