You are here

function msnf_step_remove_step in Multistep Nodeform 6

Menu callback to remove a single step.

1 string reference to 'msnf_step_remove_step'
msnf_menu in ./msnf.module
Implementation of hook_menu().

File

includes/msnf.admin.inc, line 426

Code

function msnf_step_remove_step(&$form_state, $type_name, $step_name) {

  // Load necessary functions for form steps.
  module_load_include('inc', 'msnf', 'includes/msnf.steps');
  $content_type = content_types($type_name);
  $steps = msnf_steps($content_type['type']);
  $step = isset($steps[$step_name]) ? $steps[$step_name] : '';
  if (empty($step)) {
    drupal_not_found();
    exit;
  }
  $form['#submit'][] = 'msnf_step_remove_step_submit';
  $form['#content_type'] = $content_type;
  $form['#step_name'] = $step_name;
  $message = t('This action cannot be undone.');
  return confirm_form($form, t('Are you sure you want to remove the step %label?', array(
    '%label' => t($step['label']),
  )), 'admin/content/node-type/' . $content_type['url_str'] . '/steps', $message, t('Remove'), t('Cancel'));
}