Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Options Menu - hide for users

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Options Menu - hide for users

Unread post 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.
You do not have the required permissions to view the files attached to this post.
nuBuilderForte .... BIG Like !!!
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Options Menu - hide for users

Unread post 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)
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Options Menu - hide for users

Unread post by gerese »

Thanks ! and i will try to disable e.keyCode shortcuts for Save, Delete, Clone.
nuBuilderForte .... BIG Like !!!
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Options Menu - hide for users

Unread post by Janusz »

Here is as well some info on that subject:
https://forums.nubuilder.cloud/viewtopic. ... enu#p15381
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Options Menu - hide for users

Unread post 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.
Post Reply