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: 1621
Joined: 2008-06-27 14:42
Location: 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
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

Post Reply