Commit b7431079 authored by Kristina Hoeppner's avatar Kristina Hoeppner Committed by Son Nguyen
Browse files

Edit institution: Change to switchboxes (Bug 1431569)



Change from checkboxes to switchboxes where it
made sense. The help icon placement will be dealt
with as part of the CSS changes.

Change-Id: I4dc34b34754759deb8554a5bc81551b8b94b65a2
Signed-off-by: Kristina Hoeppner's avatarKristina D.C. Hoeppner <kristina@catalyst.net.nz>
parent 3dbd93f1
......@@ -335,16 +335,16 @@ if ($institution || $add) {
if (!get_config('usersuniquebyusername')) {
$elements['registerallowed'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('registrationallowed', 'admin'),
'description' => get_string('registrationalloweddescription3', 'admin'),
'description' => get_string('registrationalloweddescription4', 'admin'),
'defaultvalue' => $data->registerallowed,
'help' => true,
);
$elements['registerconfirm'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('registrationconfirm', 'admin'),
'description' => get_string('registrationconfirmdescription1', 'admin'),
'description' => get_string('registrationconfirmdescription2', 'admin'),
'disabled' => get_config('requireregistrationconfirm') == true,
'defaultvalue' => $data->registerconfirm,
);
......@@ -393,9 +393,9 @@ if ($institution || $add) {
'value' => '<img src="' . $logourl . '" alt="' . get_string('Logo', 'admin') . '">',
);
$elements['deletelogo'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('deletelogo', 'admin'),
'description' => get_string('deletelogodescription', 'admin'),
'description' => get_string('deletelogodescription1', 'admin'),
);
}
if (empty($data->name) || $data->name != 'mahara') {
......@@ -425,15 +425,15 @@ if ($institution || $add) {
);
}
$elements['customthemefs']['elements']['resetcustom'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'class' => 'nojs-hidden-inline',
'title' => get_string('resetcolours', 'admin'),
'description' => get_string('resetcoloursdesc', 'admin'),
'description' => get_string('resetcoloursdesc1', 'admin'),
);
$elements['dropdownmenu'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('dropdownmenu', 'admin'),
'description' => get_string('dropdownmenudescriptioninstitution','admin'),
'description' => get_string('dropdownmenudescriptioninstitution1','admin'),
'defaultvalue' => $data->dropdownmenu,
'help' => true,
);
......@@ -441,9 +441,9 @@ if ($institution || $add) {
// The skins checkbox should be shown for the default institution
if (get_config('skins')) {
$elements['skins'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('skins', 'admin'),
'description' => get_string('skinsinstitutiondescription', 'admin'),
'description' => get_string('skinsinstitutiondescription1', 'admin'),
'defaultvalue' => $data->skins,
);
}
......@@ -470,9 +470,9 @@ if ($institution || $add) {
);
if (get_config('licensemetadata')) {
$elements['licensemandatory'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('licensemandatory', 'admin'),
'description' => get_string('licensemandatorydescription','admin'),
'description' => get_string('licensemandatorydescription1','admin'),
'defaultvalue' => $data->licensemandatory,
);
$elements['licensedefault'] = license_form_el_basic(null, true);
......@@ -490,9 +490,9 @@ if ($institution || $add) {
'defaultvalue' => !empty($data->defaultquota) ? $data->defaultquota : get_config_plugin('artefact', 'file', 'defaultquota'),
);
$elements['updateuserquotas'] = array(
'type' => 'switchbox',
'title' => get_string('updateuserquotas', 'artefact.file'),
'description' => get_string('updateinstitutionuserquotasdesc', 'admin'),
'type' => 'checkbox',
'description' => get_string('updateinstitutionuserquotasdesc1', 'admin'),
);
}
else {
......@@ -505,9 +505,9 @@ if ($institution || $add) {
}
$elements['allowinstitutionpublicviews'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('allowinstitutionpublicviews', 'admin'),
'description' => get_string('allowinstitutionpublicviewsdescription','admin'),
'description' => get_string('allowinstitutionpublicviewsdescription1','admin'),
'defaultvalue' => get_config('allowpublicviews') && $data->allowinstitutionpublicviews,
'disabled' => get_config('allowpublicviews') == false,
'help' => true,
......@@ -538,12 +538,12 @@ if ($institution || $add) {
if ($institution != 'mahara') {
$elements['lockedfields']['elements']['description'] = array(
'type' => 'html',
'value' => get_string('disabledlockedfieldhelp', 'admin', get_field('institution', 'displayname', 'name', 'mahara')),
'value' => get_string('disabledlockedfieldhelp1', 'admin', get_field('institution', 'displayname', 'name', 'mahara')),
);
}
foreach (ArtefactTypeProfile::get_all_fields() as $field => $type) {
$elements['lockedfields']['elements'][$field] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string($field, 'artefact.internal'),
'defaultvalue' => in_array($field, $lockedprofilefields) || ($institution != 'mahara' && in_array($field, $sitelockedfields)),
'disabled' => $institution != 'mahara' && in_array($field, $sitelockedfields)
......
......@@ -318,7 +318,7 @@ $string['advanced'] = 'Advanced';
$string['allowpublicviews'] = 'Allow public pages';
$string['allowpublicviewsdescription1'] = 'Users can create portfolio pages that are accessible to the public rather than only to logged-in users.';
$string['allowinstitutionpublicviews'] = 'Allow institution public pages';
$string['allowinstitutionpublicviewsdescription'] = 'If set to yes, users belonging to this institution will be able to create portfolio pages that are accessible to the public rather than only to logged-in users.';
$string['allowinstitutionpublicviewsdescription1'] = 'If set to "On", users belonging to this institution will be able to create portfolio pages that are accessible to the public rather than only to registered users.';
$string['allowpublicprofiles'] = 'Allow public profiles';
$string['allowpublicprofilesdescription1'] = 'Users can set their profile pages to be accessible to the public rather than only to registered users.';
$string['allowanonymouspages'] = 'Allow anonymous pages';
......@@ -331,7 +331,7 @@ $string['antispam'] = 'Anti-spam';
$string['antispamdescription'] = 'The type of anti-spam measures used on publicly visible forms';
$string['dropdownmenu'] = 'Drop-down navigation';
$string['dropdownmenudescription1'] = 'If set to "On", the main Mahara navigation will use a drop-down format for the sub-navigation.';
$string['dropdownmenudescriptioninstitution'] = 'If checked, the main navigation for the chosen institution theme will use a drop-down format.';
$string['dropdownmenudescriptioninstitution1'] = 'If set to "On", the main navigation will use a drop-down menu.';
$string['commentsortorder'] = 'Comment sort order';
$string['commentsortorderdescription'] = 'Set the sort order for artefact comments when viewed on a page.';
$string['defaultaccountinactiveexpire'] = 'Default account inactivity time';
......@@ -410,7 +410,7 @@ $string['siteoptionspagedescription'] = 'Here you can set some global options th
$string['siteoptionsset'] = 'Site options have been updated.';
$string['sitethemedescription'] = 'The default theme for the site. If your theme is not listed, check the error log.';
$string['skins'] = 'Page skins';
$string['skinsinstitutiondescription'] = 'Allow this institution\'s users to set "skins" on their pages.';
$string['skinsinstitutiondescription1'] = 'If set to "On", the members of this institution can use "skins" on their pages.';
$string['smallviewheaders'] = 'Small page headers';
$string['smallviewheadersdescription1'] = 'Display a small header and site navigation when viewing or editing portfolio pages.';
$string['spamhaus1'] = 'Spamhaus URL blacklist';
......@@ -877,15 +877,15 @@ $string['institutionlanguagedescription'] = 'The default language for users in t
$string['defaultlangforinstitution'] = '%s default';
$string['institutionupdatedsuccessfully'] = 'Institution updated successfully.';
$string['registrationallowed'] = 'Registration allowed';
$string['registrationalloweddescription3'] = 'If checked, people can register for this institution on your site using the registration form. If registration is off, non-members cannot request membership of the institution and members cannot leave the institution or delete their user accounts themselves.';
$string['registrationalloweddescription4'] = 'If set to "On", people can register for this institution using the registration form. If registration is off, non-members cannot request membership of the institution and members cannot leave the institution or delete their user accounts themselves.';
$string['registrationconfirm'] = 'Confirm registration';
$string['registrationconfirmdescription1'] = 'If checked, registration must be approved by an institution administrator. If the check box is greyed out, the site administrator has forced this setting for all institutions.';
$string['registrationconfirmdescription2'] = 'If set to "On", registration must be approved by an institution administrator. If you cannot change this option, the site administrator requires all institutions to have this option turned on.';
$string['defaultmembershipperiod'] = 'Default membership period';
$string['defaultmembershipperioddescription'] = 'How long new members remain associated with the institution.';
$string['showonlineusers'] = 'Show online users';
$string['showonlineusersdescription'] = 'The online users to show to members of this institution. If users are allowed to be in multiple institutions and these have different settings, the most permissive institution settings will be used.';
$string['licensemandatory'] = 'Require license information';
$string['licensemandatorydescription'] = 'If checked, users will be required to select a license when creating artefacts. Otherwise, they will be able to leave the license field blank.';
$string['licensemandatorydescription'] = 'If set to "On", users will be required to select a license when creating artefacts. Otherwise, they will be able to leave the license field blank.';
$string['licensedefault'] = 'Default license';
$string['licensedefaultdescription'] = 'The default license for content created or uploaded by institution members. Users can override this on their account settings page and on the individual items.';
$string['licensedefaultmandatory'] = 'If users are required to choose a license, you need to choose a default license here. If you do not want to choose a default license, do not make it required for users.';
......@@ -893,7 +893,7 @@ $string['licensedefaultmandatory'] = 'If users are required to choose a license,
$string['Logo'] = 'Logo';
$string['logodescription'] = 'You can upload an image here that will be displayed to your institution\'s members in place of the standard header logo. For best results, this image should have the same dimensions as the site logo in your institution\'s theme. As each theme can have a different header height, no exact dimensions can be provided.';
$string['deletelogo'] = 'Delete logo';
$string['deletelogodescription'] = 'Revert to the standard header logo for your institution\'s theme.';
$string['deletelogodescription1'] = 'If set to "On", revert to the standard header logo for your institution\'s theme.';
$string['customtheme'] = 'Custom theme configuration';
$string['customtheme.background'] = 'Background';
$string['customtheme.backgroundfg'] = 'Text on background';
......@@ -909,7 +909,7 @@ $string['customtheme.sidebarlink'] = 'Sidebar link';
$string['customtheme.rowbg'] = 'Row background';
$string['customstylesforinstitution'] = 'Custom styles for %s';
$string['resetcolours'] = 'Reset colours';
$string['resetcoloursdesc'] = 'Restore default colours';
$string['resetcoloursdesc1'] = 'If set to "On", restore the default colours.';
$string['authenticatedby'] = 'Authentication method';
$string['authenticatedbydescription'] = 'How this user authenticates to Mahara';
......@@ -995,10 +995,10 @@ $string['noinstitutionstaticpages'] = 'You do not have permission to edit any in
$string['noinstitutionstaticpagesadmin'] = 'If you are a site administrator, please edit the default static pages in <a href="%s">Configure site</a>.';
$string['Lockedfields'] = 'Locked fields';
$string['disabledlockedfieldhelp'] = 'Note: Disabled checkboxes are for profile fields which are locked in the institution settings for "%s". These profile fields are locked at the site level and cannot be unlocked here.';
$string['disabledlockedfieldhelp1'] = 'Note: If you cannot change one of the options, the profile fields are locked in the institution settings for "%s". These profile fields are locked at the site level and cannot be unlocked here.';
$string['defaultinstitutionquotadescription'] = 'You can set the amount of disk space new users in this institution will have as their quota.';
$string['updateinstitutionuserquotasdesc'] = 'If checked, the default quota you choose above will be applied to all existing members.';
$string['updateinstitutionuserquotasdesc1'] = 'If set to "On", the default quota you choose above will be applied to all existing members.';
// pending institution registrations
$string['approve'] = 'Approve';
......
......@@ -8,4 +8,6 @@ drop-down menu or tabs.</p>
<p>Site-wide themes take on the <strong>site settings</strong>, and if
a user can choose <strong>another institution theme</strong>, the settings there decide whether the
navigation happens via a drop-down menu or tabs.</p>
\ No newline at end of file
navigation happens via a drop-down menu or tabs.</p>
<p>If you cannot change the "On / Off" switch, you have chosen to use the site's default theme. That means that you will also use the site setting for the drop-down menu. If you wish to use the theme that the site uses, but don't want to use the same menu, please select the theme above from the drop-down menu (and not "Site default"). Then you will be able to change the setting for the drop-down navigation.</p>
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