Commit e4f2bf52 authored by Sean Brennan's avatar Sean Brennan Committed by Richard Mansfield

Radio Buttons & yes/no dropdowns vs. Checkboxes

Changed all yes/no dropdowns to checkboxes.
Changed most boolean radios ( on/off, yes/no, enable/disable) throughout site.
Did not change radios for view blocks, or on the register terms page as these looked better with radios.
Signed-off-by: default avatarSean Brennan <sean@catalyst.net.nz>
parent e50dacda
......@@ -101,25 +101,15 @@ $elements['friendscontrol'] = array(
'help' => true
);
$elements['wysiwyg'] = array(
'type' => 'radio',
'type' => 'checkbox',
'defaultvalue' => $prefs->wysiwyg,
'title' => get_string('wysiwygdescr', 'account'),
'separator' => '<br>',
'options' => array(
1 => get_string('on', 'account'),
0 => get_string('off', 'account'),
),
'help' => true,
);
$elements['maildisabled'] = array(
'type' => 'radio',
'type' => 'checkbox',
'defaultvalue' => get_account_preference($USER->get('id'), 'maildisabled'),
'title' => get_string('email'),
'separator' => '<br>',
'options' => array(
0 => get_string('enabled', 'account'),
1 => get_string('disabled', 'account'),
),
'help' => true,
);
$elements['messages'] = array(
......@@ -144,14 +134,9 @@ $elements['lang'] = array(
'ignore' => count($languages) < 2,
);
$elements['addremovecolumns'] = array(
'type' => 'radio',
'options' => array(
1 => get_string('on', 'account'),
0 => get_string('off', 'account'),
),
'type' => 'checkbox',
'defaultvalue' => $prefs->addremovecolumns,
'title' => get_string('showviewcolumns', 'account'),
'separator' => '<br>',
'help' => 'true'
);
// TODO: add a way for plugins (like blog!) to have account preferences
......@@ -181,14 +166,9 @@ if (get_config('userscanhiderealnames')) {
}
if (get_config('homepageinfo')) {
$elements['showhomeinfo'] = array(
'type' => 'radio',
'options' => array(
1 => get_string('on', 'account'),
0 => get_string('off', 'account'),
),
'type' => 'checkbox',
'defaultvalue' => $prefs->showhomeinfo,
'title' => get_string('showhomeinfo', 'account'),
'separator' => '<br>',
'help' => 'true'
);
}
......
......@@ -376,20 +376,18 @@ $siteoptionform = array(
'legend' => get_string('generalsettingslegend', 'admin'),
'elements' => array(
'allowpublicviews' => array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('allowpublicviews', 'admin'),
'description' => get_string('allowpublicviewsdescription', 'admin'),
'defaultvalue' => get_config('allowpublicviews'),
'options' => $yesno,
'help' => true,
'disabled' => in_array('allowpublicviews', $OVERRIDDEN),
),
'allowpublicprofiles' => array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('allowpublicprofiles', 'admin'),
'description' => get_string('allowpublicprofilesdescription', 'admin'),
'defaultvalue' => get_config('allowpublicprofiles'),
'options' => $yesno,
'help' => true,
'disabled' => in_array('allowpublicprofiles', $OVERRIDDEN),
),
......
......@@ -85,14 +85,9 @@ if ($USER->get('admin')) {
);
}
$elements['maildisabled'] = array(
'type' => 'radio',
'type' => 'checkbox',
'defaultvalue' => get_account_preference($user->id, 'maildisabled'),
'title' => get_string('email'),
'separator' => '<br>',
'options' => array(
0 => get_string('enabled', 'account'),
1 => get_string('disabled', 'account'),
),
'help' => true,
);
$elements['expiry'] = array(
......
......@@ -61,20 +61,16 @@ if (get_config('allowgroupcategories')
'defaultvalue' => '');
}
$elements['public'] = array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('publiclyviewablegroup', 'group'),
'description' => get_string('publiclyviewablegroupdescription', 'group'),
'options' => array(true => get_string('yes'),
false => get_string('no')),
'defaultvalue' => 'no',
'help' => true,
'ignore' => !(get_config('createpublicgroups') == 'all' || get_config('createpublicgroups') == 'admins' && $USER->get('admin')));
$elements['usersautoadded'] = array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('usersautoadded', 'group'),
'description' => get_string('usersautoaddeddescription', 'group'),
'options' => array(true => get_string('yes'),
false => get_string('no')),
'defaultvalue' => 'no',
'help' => true,
'ignore' => !$USER->get('admin'));
......
......@@ -84,20 +84,16 @@ if (get_config('allowgroupcategories')
'defaultvalue' => $group_data->category);
}
$elements['public'] = array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('publiclyviewablegroup', 'group'),
'description' => get_string('publiclyviewablegroupdescription', 'group'),
'options' => array(true => get_string('yes'),
false => get_string('no')),
'defaultvalue' => $group_data->public,
'help' => true,
'ignore' => !(get_config('createpublicgroups') == 'all' || get_config('createpublicgroups') == 'admins' && $USER->get('admin')));
$elements['usersautoadded'] = array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('usersautoadded', 'group'),
'description' => get_string('usersautoaddeddescription', 'group'),
'options' => array(true => get_string('yes'),
false => get_string('no')),
'defaultvalue' => $group_data->usersautoadded,
'help' => true,
'ignore' => !$USER->get('admin'));
......
......@@ -104,10 +104,8 @@ class PluginInteractionForum extends PluginInteraction {
'legend' => get_string('settings'),
'elements' => array(
'autosubscribe' => array(
'type' => 'select',
'type' => 'checkbox',
'title' => get_string('autosubscribeusers', 'interaction.forum'),
'options' => array(true => get_string('yes'),
false => get_string('no')),
'description' => get_string('autosubscribeusersdescription', 'interaction.forum'),
'defaultvalue' => isset($autosubscribe) ? $autosubscribe : false,
'rules' => array(
......
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