Use case: LDAP setups with numeric ID's for usernames: the admin needs to be able to switch to some user's account to check that settings and perms are as expected for that usergroup, etc. I know the co-worker names, but I don't know their ID's in the setup, other than manually checking at the users list and infer it's name from their email.
This line seems to control it at the template for the login box module:
{autocomplete element="#login-switchuser_"|cat:$module_logo_instance type="username"}
which implies that there is a function.autocomplete.php smarty_tiki file.
I managed to make the userrealname display in the dropdown box. But I need that userrealname as label, while keeping the username as option to be used internally (otherwise the switch user does not work, as far as I could see)
1st attempt:
-------
I tried with this type of syntax, but it didnt' work:
{autocomplete element="#login-switchuser_"|cat:$module_logo_instance type="userrealname" options="label:userrealname,value:username"}
since that is what I understood from here:
http://api.jqueryui.com/autocomplete/#option-source
2nd attempt:
-------
I also tried modifying function.autocomplete.php and the
mod-login_box.tpl to end up producing this syntax (as I could see in the
html source of the produced page):
$("#login-switchuser_2").tiki("autocomplete", "userrealname", { source:[label:"userrealname",value:"username"] });
but it didnt' work either.
Any tips on how to write it in the proper jquery and smarty syntax?
r58237?
Fix confirmed, thsk jonnyb!
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |