Commit b1cda25b authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Adjusting more checkboxes to switchboxes for consistency (Bug 1482447)"

parents a39e5d8d 0e7b8f3a
......@@ -161,19 +161,19 @@ $form['elements']['more'] = array(
'legend' => get_string('moreoptions', 'view'),
'elements' => array(
'allowcomments' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('allowcomments','artefact.comment'),
'description' => get_string('allowcommentsonview','view'),
'defaultvalue' => $view->get('allowcomments'),
),
'approvecomments' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('moderatecomments', 'artefact.comment'),
'description' => get_string('moderatecommentsdescription', 'artefact.comment'),
'defaultvalue' => $view->get('approvecomments'),
),
'template' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('allowcopying', 'view'),
'description' => get_string('templatedescriptionplural1', 'view'),
'defaultvalue' => $view->get('template'),
......@@ -194,7 +194,7 @@ $js = '';
if ($institution) {
if ($institution == 'mahara') {
$form['elements']['more']['elements']['copynewuser'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('copyfornewusers', 'view'),
'description' => get_string('copyfornewusersdescription1', 'view'),
'defaultvalue' => $view->get('copynewuser'),
......@@ -210,7 +210,7 @@ if ($institution) {
$createfor = $view->get_autocreate_grouptypes();
foreach (group_get_grouptype_options() as $grouptype => $grouptypedesc) {
$form['elements']['more']['elements']['copyfornewgroups_'.$grouptype] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => $grouptypedesc,
'defaultvalue' => in_array($grouptype, $createfor),
);
......@@ -221,7 +221,7 @@ if ($institution) {
$i = new Institution($institution);
$instname = hsc($i->displayname);
$form['elements']['more']['elements']['copynewuser'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('copyfornewmembers', 'view'),
'description' => get_string('copyfornewmembersdescription1', 'view', $instname),
'defaultvalue' => $view->get('copynewuser'),
......@@ -229,7 +229,7 @@ if ($institution) {
}
} else {
$form['elements']['more']['elements']['retainview'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('retainviewrights1', 'view'),
'description' => $group ? get_string('retainviewrightsgroupdescription1', 'view') : get_string('retainviewrightsdescription1', 'view'),
'defaultvalue' => $view->get('template') && $view->get('retainview'),
......
......@@ -147,7 +147,7 @@ if ($group) {
$grouproles = $USER->get('grouproles');
if ($grouproles[$group] == 'admin') {
$editview['elements']['locked'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('Locked', 'view'),
'description' => get_string('lockedgroupviewdesc', 'view'),
'defaultvalue' => $view->get('locked'),
......@@ -173,7 +173,7 @@ if (!($group || $institution)) {
if (get_config('allowanonymouspages')) {
$editview['elements']['anonymise'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('anonymise','view'),
'description' => get_string('anonymisedescription','view'),
'defaultvalue' => $view->get('anonymise'),
......
......@@ -98,12 +98,12 @@ for ($i = 0; $i < count($records); $i++) {
);
if (!$allowcomments) {
$elements['allowcomments'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('allowcomments', 'artefact.comment'),
'defaultvalue' => $r->allowcomments,
);
$elements['approvecomments'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('moderatecomments', 'artefact.comment'),
'defaultvalue' => $r->approvecomments,
);
......
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