Hello,
Helped with some guides i’ve extended view.edit.php for my custom module to disable some fileds based on user’s role.
This works very well, now i need to disable new record creation while permitting only to edit existing data(both in editview, detailview and quickcreate).
Hi,
You can use a simple workaround for this-
As you have successfully disabled some fields based on roles, extend the same logic and within that condition add a jQuery statement to hide the create button.
This is not a perfect solution, just a workaround to get things done quickly.
Hope this helps.
Yeah, you need to insert your jquery logic in all the places where the create button is being displayed from.
I’ll still look for a proper way instead of a workaround for this and post if i found any.
Update…i was able to inercept Create button and Top Subpanel but i’m not able to make jquery selection of Top Left Action Button,inmy case “Create Items” both on detail view and list view.
Seems that that portion is placed in different location…any hint?
See attached Screenshot…but of course…not an elegant way…hope to find anything else better…
Thank you
In your folder, there would be a file named “Menu.php” The Options that you mention are rendered from this files.
Replace the Create Button’s line by your own with your Role permission check.