Can anyone tell my how I can show a select box field in the system configuration as disabled?
I want to have a status field that shows the status of a job (running/not running). When the value is "running" I want to show a button that can stop the job.
My current approach is to have a <frontend_type>select</frontend_type>
for the status and the button uses <depends>
in order to decide if it is shown or not.
So far this works as expected.
But I don't want the select to be editable. Varien_Data_Form_Element_Select
checks for attributes like readonly
and disabled
but how can I activate them?
Is there a simple solution besides writing a custom frontend_model?
As a sidenote: I would not need a select box to do this. A label would be more than enough. Unfortunately the Magento's form.js
seems to stick to input
or select
when checking depends
Thanks in advance! :-)