Commit b7eecf56 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Disable the moderate checkbox when comments are not allowed


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 6894c876
......@@ -92,10 +92,22 @@ function renderAccessListItem(item) {
if (item['allowcomments']==1) {
setNodeAttribute(allowfdbk,'checked',true);
if (item['approvecomments'] == 1) {
setNodeAttribute(approvefdbk, 'checked', true);
}
}
if (item['approvecomments']==1) {
setNodeAttribute(approvefdbk,'checked',true);
else {
setNodeAttribute(approvefdbk, 'disabled', true);
}
connect(allowfdbk, 'onclick', function() {
if (allowfdbk.checked) {
approvefdbk.disabled = false;
}
else {
approvefdbk.disabled = true;
approvefdbk.checked = false;
}
});
var cssClass = 'ai-container';
if (item.preset) {
cssClass += ' preset';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment