You are here

function mb_comment_admin in More Buttons 7

Provides the central MB Content settings form.

1 string reference to 'mb_comment_admin'
mb_comment_menu in mb_comment/mb_comment.module
Implements hook_menu().

File

mb_comment/mb_comment.admin.inc, line 11

Code

function mb_comment_admin() {
  $module = 'mb_comment';
  $mb_comment_mappings = mb_get_mappings($module);
  $mb_comment_values = mb_get_values($module);
  $form['#mappings'] = $mb_comment_mappings;
  foreach ($mb_comment_mappings as $type => $v) {

    // It makes no sense to use the MB Content module with the content type panel.
    if ($type == 'panel') {
      continue;
    }

    // Provide "Cancel" button settings.
    $form[$module][$type][$module . '_cancel_' . $type] = array(
      '#type' => 'select',
      '#options' => mb_cancel_button_positions(),
      '#default_value' => variable_get($module . '_cancel_' . $type, 0),
    );
  }
  $form['submit']['save'] = array(
    '#type' => 'submit',
    '#name' => 'save',
    '#value' => t('Save'),
  );
  $form['submit']['reset'] = array(
    '#type' => 'submit',
    '#name' => 'reset',
    '#value' => t('Reset to defaults'),
  );
  return $form;
}