You are here

function panels_export_export_form in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_export/panels_export.module \panels_export_export_form()

Form to choose a group of panels to export.

1 string reference to 'panels_export_export_form'
panels_export_export in panels_export/panels_export.module
Page callback to export panels in bulk.

File

panels_export/panels_export.module, line 75
panels_export.module

Code

function panels_export_export_form(&$form_state) {
  foreach ($form_state['exportables'] as $module => $panels) {
    $form['modules'] = array(
      '#prefix' => '<div class="clear-block">',
      '#suffix' => '</div>',
      '#tree' => TRUE,
    );
    $form['modules'][$module] = array(
      '#type' => 'checkboxes',
      '#options' => $panels,
      '#default_value' => array(),
    );
  }
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Module name'),
    '#description' => t('Enter the module name to export code to.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Export'),
  );
  $form['#action'] = url('admin/panels/export/results');
  $form['#exportables'] = $form_state['exportables'];
  return $form;
}