function ctools_user_form_actions_content_type_render

Ctools plugin content type render for the picture form field.

File

plugins/content_types/user_form/user_form_actions.inc, line 19

Code

function ctools_user_form_actions_content_type_render($subtype, $conf, $panel_args, &$context) {
  $block = new stdClass();
  $block->module = t('user-form');
  $block->delta = 'title-options';
  if (isset($context->form)) {
    if (!empty($context->form['actions'])) {
      $block->content['actions'] = $context->form['actions'];
      unset($context->form['actions']);
    }
    // Because we are adding the submit buttons outside the General form
    // we can assume the necessary hidden components should be added as well.
    if (!empty($context->form['form_build_id'])) {
      $block->content['form_build_id'] = $context->form['form_build_id'];
      unset($context->form['form_build_id']);
    }
    if (!empty($context->form['form_token'])) {
      $block->content['form_token'] = $context->form['form_token'];
      unset($context->form['form_token']);
    }
    if (!empty($context->form['form_id'])) {
      $block->content['form_id'] = $context->form['form_id'];
      unset($context->form['form_id']);
    }
  }
  else {
    $block->content = t('User actions / buttons form components.');
  }
  return $block;
}