BUGFIX Fixed url_segment undefined error in CMSMain.EditForm, assuming

*all* title fields have a URLSegment field associated with them, which
they don't.
This commit is contained in:
Sean Harvey 2012-05-22 14:04:20 +12:00
parent 4286bf0844
commit b0a026b4c6

View File

@ -31,10 +31,11 @@
self._addActions(); self._addActions();
if(url_segment.length > 0) {
this.bind('change', function(e) { this.bind('change', function(e) {
var title = self.val(); var title = self.val();
// Criteria for defining a "new" page // Criteria for defining a "new" page
if ( (url_segment.val().indexOf("new") == 0) && live_url_segment.val() == "" ) { if ((url_segment.val().indexOf('new') == 0) && live_url_segment.val() == '') {
self.updateRelatedFields(title); self.updateRelatedFields(title);
self.updateURLSegment(title); self.updateURLSegment(title);
} else { } else {
@ -42,6 +43,7 @@
} }
self.updatePanelLabels(title); self.updatePanelLabels(title);
}); });
}
this._super(); this._super();
}, },