function panels_edit_submit_subform in Panels 5.2
1 call to panels_edit_submit_subform()
- panels_ajax in includes/
display_edit.inc
File
- includes/
display_edit.inc, line 1376
Code
function panels_edit_submit_subform($display) {
// Check forms to make sure only valid forms can be rendered this way.
$valid_forms = array(
'panels_add_content_config_form',
'panels_edit_pane_config_form',
);
$form_id = $_POST['form_id'];
if (!in_array($form_id, $valid_forms)) {
return panels_ajax_render();
}
$output = drupal_get_form($form_id, $display);
$next = panels_get('next');
if ($next) {
$output = drupal_get_form($next['form'], $display, $next['data']);
$return = panels_get('return');
if (!$return->output) {
$return->output = $output;
}
}
else {
if (!($return = panels_get('return'))) {
$return->type = 'display';
$return->output = $output;
}
else {
if ($return->type == 'display' && !$return->output) {
$return->output = $output;
}
}
}
if ($return->type == 'display') {
$return->output = theme('status_messages') . $return->output;
}
return $return;
}