You are here

function mongodb_block_ui_add_block_form in MongoDB 7

Menu callback: display the custom mongodb_block_ui addition form.

Parameters

array $form: The form array.

array $form_state: The form state.

string $theme: The active theme.

Return value

mixed A render array for the form.

1 string reference to 'mongodb_block_ui_add_block_form'
mongodb_block_ui_menu in mongodb_block_ui/mongodb_block_ui.module
Implements hook_menu().

File

mongodb_block_ui/mongodb_block_ui.admin.inc, line 445
Admin page callbacks for the mongodb_block_ui module.

Code

function mongodb_block_ui_add_block_form(array $form, array &$form_state, $theme) {
  $form = mongodb_block_ui_custom_block_form();
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Block title'),
    '#maxlength' => 64,
    '#description' => t('The title of the block as shown to the user.'),
    '#default_value' => '',
    '#weight' => -20,
  );
  $form['actions'] = array(
    '#tree' => FALSE,
    '#type' => 'container',
    '#attributes' => array(
      'class' => array(
        'form-actions',
      ),
    ),
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save block'),
  );
  $form['#theme_key'] = $theme;
  return $form;
}