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

Move allow comments setting to view access page


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent fae347da
......@@ -80,6 +80,12 @@ $form = array(
'type' => 'hidden',
'value' => $new,
),
'allowcomments' => array(
'type' => 'checkbox',
'title' => get_string('allowcomments','artefact.comment'),
'description' => get_string('allowcommentsonview','view'),
'defaultvalue' => $view->get('allowcomments'),
),
'template' => array(
'type' => 'checkbox',
'title' => get_string('allowcopying', 'view'),
......@@ -378,6 +384,7 @@ function editaccess_submit(Pieform $form, $values) {
$view->set('copynewgroups', $createfor);
}
$view->set('allowcomments', (int) $values['allowcomments']);
$view->commit();
if ($values['new']) {
......
......@@ -134,13 +134,6 @@ if (!($group || $institution)) {
);
}
$editview['elements']['allowcomments'] = array(
'type' => 'checkbox',
'title' => get_string('allowcomments','artefact.comment'),
'description' => get_string('allowcommentsonview','view'),
'defaultvalue' => $view->get('allowcomments'),
);
if ($new) {
$editview['elements']['submit'] = array(
'type' => 'cancelbackcreate',
......@@ -176,7 +169,6 @@ function editview_submit(Pieform $form, $values) {
$view->set('title', $values['title']);
$view->set('description', $values['description']);
$view->set('tags', $values['tags']);
$view->set('allowcomments', (int) $values['allowcomments']);
if (isset($values['ownerformat']) && $view->get('owner')) {
$view->set('ownerformat', $values['ownerformat']);
}
......
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