You are here

function bueditor_button_form in BUEditor 7

Same name and namespace in other branches
  1. 6.2 admin/bueditor.admin.inc \bueditor_button_form()
  2. 6 bueditor.admin.inc \bueditor_button_form()

Button form

1 call to bueditor_button_form()
bueditor_editor_form in admin/bueditor.admin.inc
Editor form.

File

admin/bueditor.admin.inc, line 176

Code

function bueditor_button_form($button = NULL) {
  $button = is_object($button) ? $button : bueditor_button_defaults();
  $form = array();
  $form['title'] = array(
    '#type' => 'textfield',
    '#default_value' => $button->title,
    '#size' => 14,
    '#attributes' => array(
      'class' => array(
        'input-title',
      ),
    ),
  );
  $form['content'] = array(
    '#type' => 'textarea',
    '#default_value' => $button->content,
    '#rows' => 1,
    '#attributes' => array(
      'class' => array(
        'input-content',
      ),
    ),
  );
  $form['icon'] = array(
    '#type' => 'textfield',
    '#default_value' => $button->icon,
    '#size' => 3,
    '#attributes' => array(
      'class' => array(
        'input-icon',
      ),
    ),
  );
  $form['accesskey'] = array(
    '#type' => 'textfield',
    '#default_value' => $button->accesskey,
    '#size' => 2,
    '#maxlength' => 1,
    '#attributes' => array(
      'class' => array(
        'input-key',
      ),
    ),
  );
  $form['weight'] = array(
    '#type' => 'textfield',
    '#default_value' => $button->weight,
    '#size' => 3,
    '#attributes' => array(
      'class' => array(
        'input-weight',
      ),
    ),
  );
  return $form;
}