Commit 8b7243af authored by Nigel McNie's avatar Nigel McNie

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

parent 348d8da2
......@@ -268,6 +268,8 @@ $string['Institution'] = 'Institution';
// general stuff
$string['notificationssaved'] = 'Notification settings saved';
$string['onlyshowingfirst'] = 'Only showing first';
$string['resultsof'] = 'results of';
$string['installed'] = 'Installed';
$string['errors'] = 'Errors';
......
......@@ -69,6 +69,9 @@ function pieform_element_userlist(Pieform $form, $element) {
$smarty->assign('righttitle', $element['righttitle']);
}
$smarty->assign('onlyshowingfirst', json_encode(get_string('onlyshowingfirst', 'admin')));
$smarty->assign('resultsof', json_encode(get_string('resultsof', 'admin')));
return $smarty->fetch('form/userlist.tpl');
}
......
......@@ -50,9 +50,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