Commit fb0500c9 authored by Earl Miles's avatar Earl Miles
Browse files

Fix the "Panelize it!" button and restore code that got erroneously moved in the D7 port.

parent 518ed126
Loading
Loading
Loading
Loading
+2 −2
Changes for includes/common.inc: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ function panelizer_settings_form_submit(&$form, &$form_state) {
  $panelizer->css = $form_state['values']['css'];
  $panelizer->css_id = $form_state['values']['css_id'];
  $panelizer->pipeline = $form_state['values']['pipeline'];
  drupal_set_message(t('The settings have been updated.'));
  panelizer_save_node_panelizer($panelizer);

  // NOTE: We do not save in the submit so that the form can be re-used.
}

/**
+3 −1
Changes for includes/node.inc: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -136,6 +136,8 @@ function panelizer_edit_node_settings_page($node) {
  ctools_include('common', 'panelizer');
  $output = drupal_build_form($form_id, $form_state);
  if (!empty($form_state['executed'])) {
    drupal_set_message(t('The settings have been updated.'));
    panelizer_save_node_panelizer($panelizer);
    drupal_goto($_GET['q']);
  }

@@ -150,7 +152,7 @@ function panelizer_panelize_node_form(&$form_state) {
  $form = array();

  $form['markup'] = array(
    '#value' => '<p>' . t('This node is not currently panelized.') . '</p>',
    '#markup' => '<p>' . t('This node is not currently panelized.') . '</p>',
  );

  $form['submit'] = array(