diff --git a/cms/static/js/models/feedback.js b/cms/static/js/models/feedback.js
index 344f6c3ab9..366582ecc1 100644
--- a/cms/static/js/models/feedback.js
+++ b/cms/static/js/models/feedback.js
@@ -1,6 +1,6 @@
CMS.Models.SystemFeedback = Backbone.Model.extend({
defaults: {
- "type": null, // "warning", "confirmation", "error", "announcement", "step-required"
+ "type": null, // "warning", "confirmation", "error", "announcement", "step-required", etc
"title": null,
"message": null,
"shown": true,
@@ -38,3 +38,21 @@ CMS.Models.SystemFeedback = Backbone.Model.extend({
this.set("shown", false);
}
});
+
+CMS.Models.WarningMessage = CMS.Models.SystemFeedback.extend({
+ defaults: $.extend({}, CMS.Models.SystemFeedback.prototype.defaults, {
+ "type": "warning"
+ })
+});
+
+CMS.Models.ErrorMessage = CMS.Models.SystemFeedback.extend({
+ defaults: $.extend({}, CMS.Models.SystemFeedback.prototype.defaults, {
+ "type": "error"
+ })
+});
+
+CMS.Models.ConfirmationMessage = CMS.Models.SystemFeedback.extend({
+ defaults: $.extend({}, CMS.Models.SystemFeedback.prototype.defaults, {
+ "type": "confirmation"
+ })
+});
diff --git a/cms/templates/base.html b/cms/templates/base.html
index 6a6238d15b..a13cd06150 100644
--- a/cms/templates/base.html
+++ b/cms/templates/base.html
@@ -111,8 +111,7 @@
diff --git a/cms/templates/overview.html b/cms/templates/overview.html
index 468ef783e7..af61a3afe9 100644
--- a/cms/templates/overview.html
+++ b/cms/templates/overview.html
@@ -240,8 +240,7 @@ CMS.Views.SectionEdit = Backbone.View.extend({
this.showView.render();
},
showErrorMessage: function(model, error, options) {
- var msg = new CMS.Models.SystemFeedback({
- type: "error",
+ var msg = new CMS.Models.ErrorMessage({
title: "Validation Error",
message: error,
close: false,