mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
4286bf0844
commit
b0a026b4c6
@ -31,17 +31,19 @@
|
|||||||
|
|
||||||
self._addActions();
|
self._addActions();
|
||||||
|
|
||||||
this.bind('change', function(e) {
|
if(url_segment.length > 0) {
|
||||||
var title = self.val();
|
this.bind('change', function(e) {
|
||||||
// Criteria for defining a "new" page
|
var title = self.val();
|
||||||
if ( (url_segment.val().indexOf("new") == 0) && live_url_segment.val() == "" ) {
|
// Criteria for defining a "new" page
|
||||||
self.updateRelatedFields(title);
|
if ((url_segment.val().indexOf('new') == 0) && live_url_segment.val() == '') {
|
||||||
self.updateURLSegment(title);
|
self.updateRelatedFields(title);
|
||||||
} else {
|
self.updateURLSegment(title);
|
||||||
$('.update', self.parent()).show();
|
} else {
|
||||||
}
|
$('.update', self.parent()).show();
|
||||||
self.updatePanelLabels(title);
|
}
|
||||||
});
|
self.updatePanelLabels(title);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user