Page 1 of 1

Options Menu - hide for users

Posted: Sun May 05, 2019 1:54 pm
by gerese
Hi,

In the user form, we have different fields that must be checked by a supervisor after completing. The user no longer needs to be able to modify or delete that record. We created a condition in java that if checked, hide the Save Delete Clone buttons, but the Save Delete Clone options remain active in the Options menu.

Code: Select all

if($('#brn_gestiune_viztehno').val() != 0 || $('#brn_gestiune_vizgesti').val() != 0 ){
$('#nuSaveButton').hide();
$('#nuDeleteButton').hide();
$('#nuCloneButton').hide();
$('input, select').prop('disabled', true);
}
Supervisors can make changes in another form.
#brn_gestiune_viztehno = VIZAT Tehnolog
#brn_gestiune_vizgesti = VIZAT Gestionar

How can I disable Save Delete Clone in the Options menu for users? or How can I disable the entire Options Menu for users?

Thank you.

Re: Options Menu - hide for users

Posted: Sun May 05, 2019 3:14 pm
by kev1n
gerese wrote: How can I disable Save Delete Clone in the Options menu for users? or How can I disable the entire Options Menu for users?
Hi,

Like this:

Code: Select all

 $('#nuOptions').remove();

Please note: Smart users can save even if the save button or the options menu is not visible. To prevent this, you would have to add a check in PHP (Before Save event)

Re: Options Menu - hide for users

Posted: Sun May 05, 2019 10:13 pm
by gerese
Thanks ! and i will try to disable e.keyCode shortcuts for Save, Delete, Clone.

Re: Options Menu - hide for users

Posted: Sun May 05, 2019 11:44 pm
by Janusz
Here is as well some info on that subject:
https://forums.nubuilder.cloud/viewtopic. ... enu#p15381

Re: Options Menu - hide for users

Posted: Mon May 06, 2019 10:05 pm
by kev1n
Janusz wrote:Here is as well some info on that subject:
https://forums.nubuilder.cloud/viewtopic. ... enu#p15381
However, setting permissions using Access Level will completely prevent an action. For example, if the check mark is not set for save, the user cannot save under any circumstances. I don't think that's what gerese wants.