You are here

function panels_mini_ui::edit_form_layout in Panels 7.3

Same name and namespace in other branches
  1. 6.3 panels_mini/plugins/export_ui/panels_mini_ui.class.php \panels_mini_ui::edit_form_layout()

File

panels_mini/plugins/export_ui/panels_mini_ui.class.php, line 192

Class

panels_mini_ui
@file

Code

function edit_form_layout(&$form, &$form_state) {
  ctools_include('common', 'panels');
  ctools_include('display-layout', 'panels');
  ctools_include('plugins', 'panels');

  // @todo -- figure out where/how to deal with this.
  $form_state['allowed_layouts'] = 'panels_mini';
  if ($form_state['op'] == 'add' && empty($form_state['item']->display)) {
    $form_state['item']->display = panels_new_display();
  }
  $form_state['display'] =& $form_state['item']->display;

  // Tell the Panels form not to display buttons.
  $form_state['no buttons'] = TRUE;

  // Change the #id of the form so the CSS applies properly.
  $form['#id'] = 'panels-choose-layout';
  $form = panels_choose_layout($form, $form_state);
  if ($form_state['op'] == 'edit') {
    $form['buttons']['next']['#value'] = t('Change');
  }
}