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

Fix viewacl element for new column names


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 50898d02
......@@ -669,8 +669,8 @@ class View {
foreach ($accessdata as $item) {
$accessrecord = new StdClass;
$accessrecord->view = $this->get('id');
$accessrecord->allowcomments = (bool) $item['allowcomments'];
$accessrecord->approvecomments = (bool) $item['approvecomments'];
$accessrecord->allowcomments = (int) !empty($item['allowcomments']);
$accessrecord->approvecomments = (int) !empty($item['approvecomments']);
if (isset($item['startdate'])) {
$accessrecord->startdate = db_format_timestamp($item['startdate']);
}
......
......@@ -61,13 +61,13 @@ function renderAccessListItem(item) {
var removeButton = BUTTON({'type': 'button'}, '{{str tag=remove}}');
var allowfdbk = INPUT({
'type': 'checkbox',
'name': 'accesslist[' + count + '][allowfeedback]',
'id' : 'allowfeedback' + count,
'name': 'accesslist[' + count + '][allowcomments]',
'id' : 'allowcomments' + count,
'value': 1});
var approvefdbk = INPUT({
'type': 'checkbox',
'name': 'accesslist[' + count + '][approvefeedback]',
'id' : 'approvefeedback' + count,
'name': 'accesslist[' + count + '][approvecomments]',
'id' : 'approvecomments' + count,
'value': 1});
var dateInfo = TABLE(null,
TBODY(null,
......@@ -94,10 +94,10 @@ function renderAccessListItem(item) {
)
);
if (item['approvefeedback']==1) {
if (item['approvecomments']==1) {
setNodeAttribute(allowfdbk,'checked',true);
}
if (item['allowfeedback']==1) {
if (item['allowcomments']==1) {
setNodeAttribute(approvefdbk,'checked',true);
}
var cssClass = 'ai-container';
......
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