You are here

function bs_shortcodes_button_group_attributes in Bootstrap 3 shortcodes 7

File

includes/bootstrap-shortcodes-attributes.inc, line 1064
Adds attribute callbacks for shortcode wysiwyg integration @author Jurriaan Roelofs

Code

function bs_shortcodes_button_group_attributes($form, $form_state) {
  $form['size'] = array(
    '#type' => 'select',
    '#title' => t('size'),
    '#options' => array(
      '' => t('default'),
      'xs' => t('xs'),
      'sm' => t('sm'),
      'lg' => t('lg'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  $form['justified'] = array(
    '#type' => 'select',
    '#title' => t('justified'),
    '#options' => array(
      '' => t('false'),
      'true' => t('true'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  $form['vertical'] = array(
    '#type' => 'select',
    '#title' => t('vertical'),
    '#options' => array(
      'falsetd>' => t('falsetd>'),
      'true' => t('true'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  $form['dropup'] = array(
    '#type' => 'select',
    '#title' => t('dropup'),
    '#options' => array(
      '' => t('false'),
      'true' => t('true'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  $form['xclass'] = array(
    '#type' => 'textfield',
    '#title' => t('xclass'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  $form['data'] = array(
    '#type' => 'textfield',
    '#title' => t('data'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'button-group',
        ),
      ),
    ),
  );
  return $form;
}