roundcube plugin disable button

Forum for things that doesn't really have anything to do with hMailServer. Such as php.ini, beer, etc etc.
Post Reply
User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

roundcube plugin disable button

Post by RvdH » 2021-07-22 16:31

Anyone (Virinum, tunis?) know how to disable a roundcube plugin button from code?

Almost every element you can disable like so:

Code: Select all

$field_id = 'address';
$input_address = new html_inputfield(array (
	'type'      => 'email',
	'disabled' => 'disabled',
	'name'      => '_address',
	'id'        => $field_id,
	'maxlength' => 192
));
But unfortunate this doesn't seem to work for a button element, eg: below doesn't work

Code: Select all

$submit_button = $this->rc->output->button(array(
	'command' => 'plugin.forwarding-save',
	'disabled' => 'disabled',
	'class'   => 'button mainaction submit',
	'label'   => 'save'
));
And yes, of course I can disable it using javascript but i prefer to do it in code
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

Post Reply