Step 1
Get the root element id of the task done button. It consists of
Span-->Span-->Button. So, we need to get the root (first) span element id and
pass get the button instance then disable it.
Ex : page_x002e_data-form_x002e_task-edit_x0023_default_prop_transitions-Next
Step 2
Get the instance of the button by passing the id.
Ex : YAHOO.widget.Button.getButton('page_x002e_data-form_x002e_task-edit_x0023_default_prop_transitions-Next');
Step 3
Use Alfresco.util.disableYUIButton method to disable the YUI
button. This Alfresco.util.disableYUIButton method accepts the instance of the
YUI button.
Ex: Alfresco.util.disableYUIButton(YAHOO.widget.Button.getButton('page_x002e_data-form_x002e_task-edit_x0023_default_prop_transitions-Next'));
The above example disables the "Task Done" button in task-edit
page in alfresco share.