You are here

function finder_ui_modal_form_pre_render in Finder 7.2

Pre render modal forms to add stuff without screwing the tree.

4 string references to 'finder_ui_modal_form_pre_render'
finder_ui_element_delete_form in modules/finder_ui/includes/element.inc
Finder UI element delete form.
finder_ui_element_form in modules/finder_ui/includes/element.inc
Finder UI element form.
finder_ui_field_form in modules/finder_ui/includes/field.inc
Finder UI field form.
finder_ui_item_form in modules/finder_ui/includes/item.inc
Finder UI item form.

File

modules/finder_ui/includes/common.inc, line 293
common.inc

Code

function finder_ui_modal_form_pre_render($form) {
  $children = element_children($form);
  foreach ($children as $child) {
    if ($child != 'actions') {
      $form['form'][$child] = $form[$child];
      unset($form[$child]);
    }
  }
  $form['form']['#prefix'] = '<div class="finder-ui-modal-form-wrapper">';
  $form['form']['#suffix'] = '</div>';
  $form['actions']['#prefix'] = '<div class="finder-ui-modal-buttons">';
  $form['actions']['#suffix'] = '</div>';
  $actions = $form['actions'];
  unset($form['actions']);
  $form['actions'] = $actions;
  return $form;
}