Commit f929a8e6 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Improve accessibility of two-way user listbox (Bug #1489245)"

parents 2605b864 dcdc13d1
......@@ -35,6 +35,8 @@ $form = pieform(array(
'defaultvalue' => $adminusers,
'lefttitle' => get_string('potentialadmins', 'admin'),
'righttitle' => get_string('currentadmins', 'admin'),
'leftarrowlabel' => get_string('makeadminsintousers', 'admin'),
'rightarrowlabel' => get_string('makeusersintoadmins', 'admin'),
'searchparams' => array(
'query' => '',
'limit' => 250,
......
......@@ -49,6 +49,8 @@ $form = array(
'defaultvalue' => $adminusers,
'lefttitle' => get_string('institutionmembers', 'admin'),
'righttitle' => get_string('currentadmins', 'admin'),
'leftarrowlabel' => get_string('makeadminsintousers', 'admin'),
'rightarrowlabel' => get_string('makeusersintoadmins', 'admin'),
'searchparams' => array('limit' => 100, 'query' => '', 'member' => 1,
'institution' => $institution),
'searchscript' => 'admin/users/userinstitutionsearch.json.php',
......
......@@ -50,6 +50,8 @@ $form = array(
'defaultvalue' => $staffusers,
'lefttitle' => get_string('institutionmembers', 'admin'),
'righttitle' => get_string('institutionstaff', 'admin'),
'leftarrowlabel' => get_string('makestaffintousers', 'admin'),
'rightarrowlabel' => get_string('makeusersintostaff', 'admin'),
'searchparams' => array('limit' => 100, 'query' => '', 'member' => 1,
'institution' => $institution),
'searchscript' => 'admin/users/userinstitutionsearch.json.php',
......
......@@ -34,6 +34,8 @@ $form = pieform(array(
'defaultvalue' => $staffusers,
'lefttitle' => get_string('potentialstaff', 'admin'),
'righttitle' => get_string('currentstaff', 'admin'),
'leftarrowlabel' => get_string('makestaffintousers', 'admin'),
'rightarrowlabel' => get_string('makeusersintostaff', 'admin'),
'searchparams' => array(
'query' => '',
'limit' => 250,
......
......@@ -210,6 +210,8 @@ $string['groupfilequotadescription'] = 'Total storage available in the group\'s
$string['groupadminsforgroup'] = "Group administrators for '%s'";
$string['potentialadmins'] = 'Potential administrators';
$string['currentadmins'] = 'Current administrators';
$string['makeusersintoadmins'] = 'Turn selected users into administrators';
$string['makeadminsintousers'] = 'Turn selected administrators back into users';
$string['groupadminsupdated'] = 'Group administrators have been updated';
$string['groupquotaupdated'] = 'Group quota has been updated';
$string['addnewgroupcategory'] = 'Enter new group category';
......@@ -735,6 +737,8 @@ $string['staffuserspagedescription1'] = 'Here you can choose which users are sta
$string['institutionstaffuserspagedescription1'] = 'Here you can choose which users are staff for your institution. The current staff are in the "Institution staff" field, and potential staff are in the "Institution members" field.';
$string['potentialstaff'] = 'Potential staff';
$string['currentstaff'] = 'Current staff';
$string['makeusersintostaff'] = 'Turn selected users into staff';
$string['makestaffintousers'] = 'Turn selected staff back into users';
$string['staffusersupdated'] = 'Staff users updated';
// Admin Notifications
......
......@@ -51,6 +51,12 @@ function pieform_element_userlist(Pieform $form, $element) {
if (!empty($element['righttitle'])) {
$smarty->assign('righttitle', $element['righttitle']);
}
if (!empty($element['leftarrowlabel'])) {
$smarty->assign('leftarrowlabel', $element['leftarrowlabel']);
}
if (!empty($element['rightarrowlabel'])) {
$smarty->assign('rightarrowlabel', $element['rightarrowlabel']);
}
if (!empty($element['group'])) {
$smarty->assign('group', $element['group']);
......@@ -98,4 +104,4 @@ function pieform_element_userlist_rule_required(Pieform $form, $value, $element)
}
return $form->i18n('rule', 'required', 'required', $element);
}
\ No newline at end of file
}
......@@ -123,6 +123,8 @@
var form = jQuery('select#{{$name}}_members').closest('form')[0];
formchangemanager.setFormState(form, FORM_CHANGED);
}
to.focus();
};
addLoadEvent(function () {
......@@ -153,9 +155,11 @@
<div class="btn-group btn-group-vertical">
<button type="button" name="rightarrow" onClick="{{$name}}_moveopts('potential','members')" class="rightarrow btn btn-primary btn-lg">
<span class="icon icon-long-arrow-right"></span>
<span class="sr-only">{{$rightarrowlabel}}</span>
</button>
<button type="button" name="leftarrow" onClick="{{$name}}_moveopts('members','potential')" class="leftarrow btn btn-primary btn-lg">
<span class="icon icon-long-arrow-left"></span>
<span class="sr-only">{{$leftarrowlabel}}</span>
</button>
</div>
</td>
......
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