Options Menu - hide for users

Questions related to customising nuBuilder Forte with Javascript or PHP.

Options Menu - hide for users

Postby gerese » Sun May 05, 2019 9:24 pm

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.
Attachments
poza22.jpg
poza22.jpg (64.32 KiB) Viewed 176 times
nuBuilderForte .... BIG Like !!!
gerese
 
Posts: 12
Joined: Mon Dec 17, 2018 2:43 am

Re: Options Menu - hide for users

Postby kev1n » Sun May 05, 2019 10:44 pm

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)
kev1n
 
Posts: 191
Joined: Mon Oct 15, 2018 2:13 am

Re: Options Menu - hide for users

Postby gerese » Mon May 06, 2019 5:43 am

Thanks ! and i will try to disable e.keyCode shortcuts for Save, Delete, Clone.
nuBuilderForte .... BIG Like !!!
gerese
 
Posts: 12
Joined: Mon Dec 17, 2018 2:43 am

Re: Options Menu - hide for users

Postby Janusz » Mon May 06, 2019 7:14 am

Janusz
 
Posts: 175
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Options Menu - hide for users

Postby kev1n » Tue May 07, 2019 5:35 am



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.
kev1n
 
Posts: 191
Joined: Mon Oct 15, 2018 2:13 am


Return to Custom Code