Commit 9dd79f88 authored by Nigel McNie's avatar Nigel McNie
Browse files

Translate 'Only showing first X of Y results' for the userlist element. Thanks to Heinz.

Conflicts:

	htdocs/lib/form/elements/userlist.php
parent e641c18b
......@@ -381,6 +381,8 @@ $string['invitationsent'] = 'Invitation sent';
// general stuff
$string['notificationssaved'] = 'Notification settings saved';
$string['onlyshowingfirst'] = 'Only showing first';
$string['resultsof'] = 'results of';
$string['installed'] = 'Installed';
$string['errors'] = 'Errors';
......
......@@ -81,6 +81,8 @@ function pieform_element_userlist(Pieform $form, $element) {
$element['searchparams'] = array('query' => '', 'limit' => 100);
}
$smarty->assign('searchparams', json_encode($element['searchparams']));
$smarty->assign('onlyshowingfirst', json_encode(get_string('onlyshowingfirst', 'admin')));
$smarty->assign('resultsof', json_encode(get_string('resultsof', 'admin')));
return $smarty->fetch('form/userlist.tpl');
}
......
......@@ -56,9 +56,9 @@
if(users.count > users.limit) {
replaceChildNodes('{{$name}}_messages',
DIV(null,
'Only showing first ',
{{$onlyshowingfirst}}, ' ',
SPAN({'id': '{{$name}}_userlimit'}, users.limit),
' results of ',
' ', {{$resultsof}}, ' ',
SPAN({'id': '{{$name}}_usercount'}, users.count - counter)
)
);
......
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