1 installer.browser.inc | installer_browser_add_remove_queue_dialog_link($form, &$form_state, $project_name, $op, $title) |
Builds an "add-to-queue-link" button for project detail dialog.
File
- core/
modules/ installer/ installer.browser.inc, line 522 - Various functions that are required by the Installer browse pages.
Code
function installer_browser_add_remove_queue_dialog_link($form, &$form_state, $project_name, $op, $title) {
form_load_include($form_state, 'inc', 'installer', 'installer.browser');
$form['#attached']['js'][] = backdrop_get_path('module', 'layout') . '/js/layout.admin.js';
$form['#attached']['css'][] = backdrop_get_path('module', 'layout') . '/css/layout.admin.css';
if (empty($form_state['project_name'])) {
$form_state['project_name'] = $project_name;
$form_state['op'] = $op;
$form_state['title'] = $title;
}
$form['ajax_link'] = array(
'#type' => 'submit',
'#value' => $form_state['title'],
'#attributes' => array('class' => array('layout-link-button')),
'#ajax' => array(
'callback' => 'installer_browser_add_remove_queue_dialog_link_ajax',
),
'#submit' => array(
'installer_browser_add_remove_queue_dialog_link_submit',
),
);
return $form;
}