Commit 91c2594c by David Baumgold

Fix section name validation alerting

parent 8e384a73
...@@ -69,7 +69,7 @@ CMS.Views.Prompt = CMS.Views.Alert.extend({ ...@@ -69,7 +69,7 @@ CMS.Views.Prompt = CMS.Views.Alert.extend({
}), }),
render: function() { render: function() {
if(!window.$body) { window.$body = $(document.body); } if(!window.$body) { window.$body = $(document.body); }
if(this.model.get('shown')) { if(this.options.shown) {
$body.addClass('prompt-is-shown'); $body.addClass('prompt-is-shown');
} else { } else {
$body.removeClass('prompt-is-shown'); $body.removeClass('prompt-is-shown');
......
...@@ -59,16 +59,16 @@ CMS.Views.SectionEdit = Backbone.View.extend({ ...@@ -59,16 +59,16 @@ CMS.Views.SectionEdit = Backbone.View.extend({
this.showView.render(); this.showView.render();
}, },
showErrorMessage: function(model, error, options) { showErrorMessage: function(model, error, options) {
var that = this;
var msg = new CMS.Models.ErrorMessage({ var msg = new CMS.Models.ErrorMessage({
title: "Validation Error", title: "Validation Error",
message: error, message: error,
close: false,
icon: false,
actions: { actions: {
primary: { primary: {
text: "Dismiss", text: "Dismiss",
click: function() { click: function(view) {
this.hide(); view.hide();
that.$("input[type=text]").focus();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment