diff --git a/javascript/SecurityAdmin_left.js b/javascript/SecurityAdmin_left.js index 3bd35c96..e5801151 100755 --- a/javascript/SecurityAdmin_left.js +++ b/javascript/SecurityAdmin_left.js @@ -137,13 +137,17 @@ deletegroup = { Behaviour.addLoader(function () { // Set up add page Observable.applyTo($('addgroup_options')); - $('addgroup').onclick = addgroup.button_onclick; - $('addgroup').getElementsByTagName('button')[0].onclick = function() {return false;}; - $('addgroup_options').onsubmit = addgroup.form_submit; + 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')); - $('deletegroup').onclick = deletegroup.button_onclick; - $('deletegroup').getElementsByTagName('button')[0].onclick = function() {return false;}; - $('deletegroup_options').onsubmit = deletegroup.form_submit; + if($('deletegroup')) { + $('deletegroup').onclick = deletegroup.button_onclick; + $('deletegroup').getElementsByTagName('button')[0].onclick = function() {return false;}; + $('deletegroup_options').onsubmit = deletegroup.form_submit; + } }); \ No newline at end of file