Author Topic: What UI elements can be hidden by disabled_actions?  (Read 3423 times)

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
What UI elements can be hidden by disabled_actions?
« on: February 16, 2015, 02:00:28 PM »
I'm please to see the new disabled_actions config option in 1.1.0, and have used it to disable the message import feature, which was the example in the feature request ticket, and was therefore easy to figure out.

But how can we determine what UI elements can be disabled, and what the proper syntax is for each? Will there be a list posted somewhere?

For example, I would like to hide the reply-to field on edit-identities, as well as the link for the protocol handler. I wasn't able to determine a way to do this, which may mean that those UI elements aren't supported, or perhaps I just can't figure the proper syntax.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,637
Re: What UI elements can be hidden by disabled_actions?
« Reply #1 on: February 16, 2015, 02:41:58 PM »
I think the idea of the disabled_actions option is to disable toolbar/menu buttons - the actions, rather than random UI elements. I don't think it can be used to edit the identities form or the settings list. In disabled_actions you put actions in for the format [task].[command] for example mail.import-messages or addressbook.compose. I think getting the name of the command can be trickey, but you can always inspect the element in the page and see the name of the command.

For changing the identities form I'm not sure, I guess you'd have to use the identity_form hook. I've not tried it but the docs suggest it should do what you need.

And I assume the protocol handler is not covered by the dont_override because its not a config option its just a link but it can be removed using the preferences_list hook.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: What UI elements can be hidden by disabled_actions?
« Reply #2 on: February 16, 2015, 03:09:35 PM »
OK, that makes sense. I've only done the message-import so far. The other two I've simply commented out in the appropriate HTML template in the skin folders. I'll probably just continue that practice for those other two. Was thinking that if I could add those to the config, they would persist across future updates. But that's not a big deal, really.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA