Fix section name validation alerting
This commit is contained in:
@@ -69,7 +69,7 @@ CMS.Views.Prompt = CMS.Views.Alert.extend({
|
||||
}),
|
||||
render: function() {
|
||||
if(!window.$body) { window.$body = $(document.body); }
|
||||
if(this.model.get('shown')) {
|
||||
if(this.options.shown) {
|
||||
$body.addClass('prompt-is-shown');
|
||||
} else {
|
||||
$body.removeClass('prompt-is-shown');
|
||||
|
||||
@@ -59,16 +59,16 @@ CMS.Views.SectionEdit = Backbone.View.extend({
|
||||
this.showView.render();
|
||||
},
|
||||
showErrorMessage: function(model, error, options) {
|
||||
var that = this;
|
||||
var msg = new CMS.Models.ErrorMessage({
|
||||
title: "Validation Error",
|
||||
message: error,
|
||||
close: false,
|
||||
icon: false,
|
||||
actions: {
|
||||
primary: {
|
||||
text: "Dismiss",
|
||||
click: function() {
|
||||
this.hide();
|
||||
click: function(view) {
|
||||
view.hide();
|
||||
that.$("input[type=text]").focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user