You are here

function views_ui_clone_display_form in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \views_ui_clone_display_form()

From to clone a display from a view.

2 string references to 'views_ui_clone_display_form'
template_preprocess_views_ui_edit_tab in includes/admin.inc
views_ui_clone_display in includes/admin.inc
AJAX callback to add a display.

File

includes/admin.inc, line 1770
admin.inc Provides the Views' administrative interface.

Code

function views_ui_clone_display_form(&$form_state) {
  $view =& $form_state['view'];
  $display_id = $form_state['display_id'];
  $form['clone_display'] = array(
    '#type' => 'submit',
    '#value' => t('Clone display'),
    '#submit' => array(
      'views_ui_clone_display_form_submit',
    ),
  );
  $form['#id'] = 'views-clone-display-form';
  $form['#action'] = url("admin/build/views/nojs/clone-display/{$view->name}/{$display_id}");
  $form['#attributes'] = array(
    'class' => 'views-ajax-form',
  );
  return $form;
}