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 2175e1d
Show file tree
Hide file tree
Showing 3 changed files with 5 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
1 change: 1 addition & 0 deletions core/src/zeit/cms/content/feature-toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<author_lookup_in_hdok>true</author_lookup_in_hdok>
<content_caching>true</content_caching>
<embed_cmp_thirdparty>true</embed_cmp_thirdparty>
<inlineform_alert_error>true</inlineform_alert_error>
<breakingnews_with_channel>true</breakingnews_with_channel>
<push_new_articles_ua_author_tag>true</push_new_articles_ua_author_tag>
<reference_index>true</reference_index>
Expand Down

0 comments on commit 2175e1d

Please sign in to comment.