How can you set #access to false for the vertical tab "Translation" (entity translation) on the node edit form?
When using entity translation and a user has the permission to edit a node and edit translations, a new vertical tab is injected in the node edit form:
Translation
Translation is published. Do notflag translation as outdated
[x] This translation is published
[ ] Flag translation as outdated
Since I have editors that need to edit translations but shall not have access to this v-tab (it is being confused with the Publishing options for the node, leading to people altering the translation status where the node in its entirety should be unpublished/published instead).
Using hook_form_alter()
in a custom module, I do not find any trace of the above form element in the $form
array. According to a grep search, it is defined in the file /modules/entity_translation/includes/translation.handler.inc:1051
. I assume it is being cached somehow, as that part of the code is not being executed when the form is built (breakpoints do not trigger).
Worst case, I could use Javascript to hide the form element, but I would rather not have to rely on such a hack. If possible, I would like to set #access to false for the editor role (or similar).