silverstripe-cms/javascript/SecurityAdmin_right.js

11 lines
503 B
JavaScript
Raw Normal View History

/**
* CAUTION: Assumes that a MemberTableField-instance is present as an editing form
*/
function action_addmember_right() {
var memberTableFields = document.getElementsBySelector('#Form_EditForm div.MemberTableField');
var tables = document.getElementsBySelector('#Form_EditForm div.MemberTableField table');
var addLinks = document.getElementsBySelector('#Form_EditForm div.MemberTableField a.addlink');
try {
memberTableFields[0].openPopup(null,addLinks[0].href,tables[0]);
} catch(err) {}
}