mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Check for form object before calling observe() on the element. The CheckBoxRange constructor allows for a null form, so a check for a form object is essential.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70046 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6b5cab8dab
commit
aeeb7bbc7b
@ -102,8 +102,10 @@ CheckBoxRange.prototype = {
|
|||||||
this.form = form;
|
this.form = form;
|
||||||
this.field = field;
|
this.field = field;
|
||||||
this.eventPossibleCheckHappened = this.possibleCheckHappened.bindAsEventListener(this);
|
this.eventPossibleCheckHappened = this.possibleCheckHappened.bindAsEventListener(this);
|
||||||
Event.observe(form, "click", this.eventPossibleCheckHappened);
|
if(form) {
|
||||||
Event.observe(form, "keyup", this.eventPossibleCheckHappened);
|
Event.observe(form, "click", this.eventPossibleCheckHappened);
|
||||||
|
Event.observe(form, "keyup", this.eventPossibleCheckHappened);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
possibleCheckHappened: function(event) {
|
possibleCheckHappened: function(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user