Browse Source

Merge pull request #18030 from genoher/feature/Show-Error-Message-When-Fail-Open-Modal

Show error message when open modal fails in mvc.
pull/18052/head
maliming 3 years ago
committed by GitHub
parent
commit
cf7a06c6f4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js

@ -144,7 +144,8 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f
_createContainer(_modalId)
.load(options.viewUrl, $.param(argsWithoutFunc), function (response, status, xhr) {
if (status === "error") {
//TODO: Handle!
var responseJSON = xhr.responseJSON ? xhr.responseJSON : JSON.parse(xhr.responseText);
abp.ajax.showError(responseJSON.error ? responseJSON.error : abp.ajax.defaultError);
return;
};

Loading…
Cancel
Save