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