| 1 layout.admin.inc | layout_settings_form_path_ajax($form, &$form_state) |
AJAX handler for layout_settings_form().
Returns updated contexts and information about path matching.
File
- core/
modules/ layout/ layout.admin.inc, line 1182 - Admin page callbacks for the Layout module.
Code
function layout_settings_form_path_ajax($form, &$form_state) {
$is_new = $form_state['is_new'];
$layout_name = $form_state['layout_name'];
$commands[] = ajax_command_remove('.l-messages');
$commands[] = ajax_command_html('#layout-messages', theme('status_messages'));
$commands[] = ajax_command_html('#layout-path-description', _layout_path_matches_description($form['path']['#value'], $layout_name, $is_new));
$commands[] = ajax_command_html('#layout-contexts', backdrop_render($form['context_wrapper']));
foreach ($form_state['additional_paths'] as $i => $additional_path) {
$description = _layout_path_matches_description($additional_path, $layout_name, $is_new);
$commands[] = ajax_command_html("#layout-path-description-$i", $description);
}
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}