function deploy_ui_plan_confirm_form in Deploy - Content Staging 7.3
Same name and namespace in other branches
- 7.2 modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php \deploy_ui_plan_confirm_form()
Form for confirming the user wants to deploy this plan.
1 string reference to 'deploy_ui_plan_confirm_form'
- deploy_ui_plan::deploy_page in modules/
deploy_ui/ plugins/ export_ui/ deploy_ui_plan.class.php - Renders the deployment plan page.
File
- modules/
deploy_ui/ plugins/ export_ui/ deploy_ui_plan.class.php, line 406 - Deploy UI for managing deployment plans.
Code
function deploy_ui_plan_confirm_form($form, $form_state) {
$plan = $form_state['plan'];
$path = "admin/structure/deploy/plans/list/{$plan->name}";
if (!empty($_REQUEST['cancel_path']) && !url_is_external($_REQUEST['cancel_path'])) {
$path = $_REQUEST['cancel_path'];
}
if (empty($plan->processor) || $plan->fetch_only) {
drupal_set_message(t("The plan @name can't be deployed in push fashion because it missing a processor plugin or is configured <em>fetch-only</em>.", array(
'@name' => $plan->name,
)), 'error');
drupal_goto($path);
}
$form = array();
$form = confirm_form($form, t('Are you sure you want to deploy %title?', array(
'%title' => $plan->name,
)), $path, t("Deploying a plan will push its content to all its endpoints."), t('Deploy'), t('Cancel'));
return $form;
}