/** * Draws the JavaScript for enabling/disabling branches. * This should just output some JavaScript code as the body of the 'on_click_branch (ctrl, id)' function. * @access private */ protected function _draw_branch_scripts() { parent::_draw_branch_scripts(); ?> var status_ctrl = ctrl.form ['branch_' + id + '_status']; var priority_ctrl = ctrl.form ['branch_' + id + '_priority']; if (status_ctrl) { status_ctrl.disabled = ! ctrl.checked; } if (priority_ctrl) { priority_ctrl.disabled = ! ctrl.checked; } <?php }