Skip to content

Commit

Permalink
ZO-4801: Put error alert behind feature toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
wosc committed Feb 27, 2024
1 parent f205e1e commit e2dd9cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/docs/changelog/ZO-4801-error.change
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ZO-4801: Display request errors that occur in JS forms
ZO-4801: Display request errors that occur in JS forms (toggle: `inlineform_alert_error`)
4 changes: 3 additions & 1 deletion core/src/zeit/cms/browser/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ zeit.cms.SubPageForm = gocept.Class.extend({
d.addCallbacks(
MochiKit.Base.bind(self.replace_content, self),
function(error) {
alert('Ein Systemfehler ist aufgetreten: ' + error.req.responseText);
if (window.feature_toggles.inlineform_alert_error) {
alert('Ein Systemfehler ist aufgetreten: ' + error.req.responseText);
}
});
d.addCallback(MochiKit.Base.bind(self.process_post_result, self));
d.addCallback(function(result) {
Expand Down

0 comments on commit e2dd9cc

Please sign in to comment.