You are here

function bs_shortcodes_label_attributes in Bootstrap 3 shortcodes 7

File

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

Code

function bs_shortcodes_label_attributes($form, $form_state) {
  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('type'),
    '#options' => array(
      '' => t('default'),
      'primary' => t('primary'),
      'success' => t('success'),
      'info' => t('info'),
      'warning' => t('warning'),
      'danger' => t('danger'),
    ),
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'label',
        ),
      ),
    ),
  );
  $form['xclass'] = array(
    '#type' => 'textfield',
    '#title' => t('xclass'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'label',
        ),
      ),
    ),
  );
  $form['data'] = array(
    '#type' => 'textfield',
    '#title' => t('data'),
    '#size' => 30,
    '#maxlength' => 30,
    '#states' => array(
      'visible' => array(
        ':input[name="shortcode"]' => array(
          'value' => 'label',
        ),
      ),
    ),
  );
  return $form;
}