MINOR Fixed JS undefined errors with 'addgroup' and 'deletegroup' elements

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63802 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-10-08 01:10:59 +00:00
parent 7d9bfd8c39
commit 1e578a32cb

View File

@ -137,13 +137,17 @@ deletegroup = {
Behaviour.addLoader(function () {
// Set up add page
Observable.applyTo($('addgroup_options'));
if($('addgroup')) {
$('addgroup').onclick = addgroup.button_onclick;
$('addgroup').getElementsByTagName('button')[0].onclick = function() {return false;};
$('addgroup_options').onsubmit = addgroup.form_submit;
}
// Set up delete page
Observable.applyTo($('deletegroup_options'));
if($('deletegroup')) {
$('deletegroup').onclick = deletegroup.button_onclick;
$('deletegroup').getElementsByTagName('button')[0].onclick = function() {return false;};
$('deletegroup_options').onsubmit = deletegroup.form_submit;
}
});