mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
update revert link text size in prompt
add revert to multi cred modal
This commit is contained in:
parent
ba22b3426d
commit
8b0876cb3a
@ -177,7 +177,7 @@
|
||||
}
|
||||
|
||||
.JobSubmission-revertLink {
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.JobSubmission-selectedItem {
|
||||
|
@ -248,6 +248,21 @@ export default ['templateUrl', 'Rest', 'GetBasePath', 'generateList', '$compile'
|
||||
}
|
||||
};
|
||||
|
||||
$scope.selectedCredentialsDirty = function() {
|
||||
if ($scope.originalSelectedCredentials) {
|
||||
return !($scope.originalSelectedCredentials.machine === null &&
|
||||
$scope.originalSelectedCredentials.extra.length === 0) &&
|
||||
!_.eq($scope.selectedCredentials,
|
||||
$scope.originalSelectedCredentials);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.revertToDefaultCredentials = function() {
|
||||
$scope.selectedCredentials = _.cloneDeep($scope.originalSelectedCredentials);
|
||||
};
|
||||
|
||||
$scope.removeCredential = function(credToRemove) {
|
||||
$scope.credTags
|
||||
.forEach(function(cred) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="MultiCredential-selectedBar"
|
||||
ng-show="credTags && credTags.length">
|
||||
ng-show="(credTags && credTags.length) || selectedCredentialsDirty()">
|
||||
<span class="MultiCredential-selectedBarLabel" translate>
|
||||
SELECTED:
|
||||
</span>
|
||||
@ -48,6 +48,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="MultiCredential-previewTagRevert">
|
||||
<a class="MultiCredential-revertLink" href="" ng-show="selectedCredentialsDirty()" ng-click="revertToDefaultCredentials()" translate>REVERT</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="MultiCredential-credentialSubSection">
|
||||
<span class="MultiCredential-selectLabel" translate>CREDENTIAL TYPE:</span>
|
||||
@ -67,7 +70,7 @@
|
||||
<button type="button"
|
||||
ng-click="saveForm()"
|
||||
ng-disabled="!credentials || credentials.length === 0"
|
||||
class="Lookup-cancel btn btn-sm Form-saveButton" translate>
|
||||
class="btn btn-sm Form-saveButton" translate>
|
||||
SELECT
|
||||
</button>
|
||||
</div>
|
||||
|
@ -122,3 +122,14 @@
|
||||
line-height: 24px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.MultiCredential-previewTagRevert {
|
||||
flex: 0 0 60px;
|
||||
line-height: 29px;
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.MultiCredential-revertLink {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user