You are here

function boxes_box_form_submit in Boxes 6

Same name and namespace in other branches
  1. 7 boxes.module \boxes_box_form_submit()

Submit handler for the inline form.

File

./boxes.module, line 321

Code

function boxes_box_form_submit($form, $form_state) {
  $box = boxes_factory($form_state['values']['plugin_key'], $form_state['values']);
  if (module_exists('spaces') && ($space = spaces_get_space())) {
    $space->controllers->boxes
      ->set($box->delta, $box);
  }
  else {
    $box
      ->save();
  }
}