We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Review code

June Anderson
Tera Contributor

Just for sanity check, I modified a line of code to add multiple users.

 

Before code was 

    if (g_form.getValue('add_remove_group') == 'add') {

        var adminRole = g_user.hasRole('admin');

        if (adminRole) {

            g_form.setVisible('add_multiple_users', true);
 
After Code is
    if (g_form.getValue('add_remove_group') == 'add') {

        var userRole = g_user.hasRole('group_manager');

        if (userRole) {

            g_form.setVisible('add_multiple_users', true);
 
Please not very good with JavaScript, can someone please confirm if I am on the right track
1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron

Looks good June.

You can always test client side code using JavaScript debugger (ctrl+shift+Alt+j) on the form

-Anurag

View solution in original post

1 REPLY 1

Anurag Tripathi
Mega Patron

Looks good June.

You can always test client side code using JavaScript debugger (ctrl+shift+Alt+j) on the form

-Anurag