2019-11-02 01:37:52 +08:00
|
|
|
function configureButtons() {
|
|
|
|
var form = $j('#groupForm')[0];
|
|
|
|
if ( !form ) {
|
|
|
|
console.log("No groupForm found");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ( !canEditGroups ) {
|
|
|
|
console.log("Cannot edit groups");
|
|
|
|
form.elements['action'].disabled = disabled;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var disabled = false;
|
2017-10-01 02:19:32 +08:00
|
|
|
|
2019-11-02 01:37:52 +08:00
|
|
|
if ( form.elements['newGroup[Name]'].value == '' ) {
|
|
|
|
disabled = true;
|
2017-05-19 01:50:56 +08:00
|
|
|
}
|
2019-11-02 01:37:52 +08:00
|
|
|
form.elements['action'].disabled = disabled;
|
2016-03-09 23:43:44 +08:00
|
|
|
}
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
window.focus();
|