how to keep open edit mode if server response with error? Now, when I click submit and send data to API, my form automatically is close, but I want to close edit mode only if server response with success, and stay opened if a response with an error. Thank you
<form editable-form name="tableform" onaftersave="saveTableConfig()" oncancel="cancel()">
<span editable-textarea="currentKlupa.description" e-name="description" e-
rows="3">Text</span>
</form>
$scope.saveTableConfig = function () {
var config = {
headers: {
'Content-Type': 'application/xml',
'X-HTTP-Method-Override': 'PUT'
}
};
var configCopy = angular.copy($scope.currentConfig);
$http.post(serviceBase + 'cd/saa/' + $stateParams.aaaID + '/config', configCopy, config)
.success(function (data, status, headers, config) {
Notification.success({message: $filter('translate')('BENCH_EDITED_SUCCESSFULLY'), delay: 3000, positionY: 'bottom', positionX: 'right'});
})
.error(function (data, status, header, config) {
Notification.error({message: $filter('translate')('BENCH_EDITED_ERROR'), positionY: 'bottom', positionX: 'right'});
});
};