mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Merge pull request #2415 from jaredevantabor/fix-2413
Fixes Discard Changes & Save buttons in Settings page
This commit is contained in:
commit
56fc5b104e
@ -317,15 +317,21 @@ export default [
|
||||
"class": "btn Form-cancelButton",
|
||||
"id": "formmodal-cancel-button",
|
||||
onClick: function() {
|
||||
clearApiErrors();
|
||||
populateFromApi();
|
||||
$scope[formTracker.currentFormName()].$setPristine();
|
||||
$('#FormModal-dialog').dialog('close');
|
||||
$state.go('setup');
|
||||
}
|
||||
}, {
|
||||
label: i18n._("Save changes"),
|
||||
onClick: function() {
|
||||
$scope.formSave();
|
||||
$('#FormModal-dialog').dialog('close');
|
||||
$state.go('setup');
|
||||
vm.formSave().then(() => {
|
||||
$scope[formTracker.currentFormName()].$setPristine();
|
||||
$('#FormModal-dialog').dialog('close');
|
||||
}).catch(()=> {
|
||||
event.preventDefault();
|
||||
$('#FormModal-dialog').dialog('close');
|
||||
});
|
||||
},
|
||||
"class": "btn btn-primary",
|
||||
"id": "formmodal-save-button"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user