function bs_shortcodes_button_attributes in Bootstrap 3 shortcodes 7
File
- includes/
bootstrap-shortcodes-attributes.inc, line 736 - Adds attribute callbacks for shortcode wysiwyg integration @author Jurriaan Roelofs
Code
function bs_shortcodes_button_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'),
'link' => t('link'),
),
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$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',
),
),
),
);
$form['block'] = array(
'#type' => 'select',
'#title' => t('block'),
'#options' => array(
'' => t('false'),
'true' => t('true'),
),
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['dropdown'] = array(
'#type' => 'select',
'#title' => t('dropdown'),
'#options' => array(
'' => t('false'),
'true' => t('true'),
),
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['active'] = array(
'#type' => 'select',
'#title' => t('active'),
'#options' => array(
'' => t('false'),
'true' => t('true'),
),
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['disabled'] = array(
'#type' => 'select',
'#title' => t('disabled'),
'#options' => array(
'' => t('false'),
'true' => t('true'),
),
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['xclass'] = array(
'#type' => 'textfield',
'#title' => t('xclass'),
'#size' => 30,
'#maxlength' => 30,
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['link'] = array(
'#type' => 'textfield',
'#title' => t('link'),
'#size' => 30,
'#maxlength' => 30,
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['target'] = array(
'#type' => 'textfield',
'#title' => t('target'),
'#size' => 30,
'#maxlength' => 30,
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
$form['data'] = array(
'#type' => 'textfield',
'#title' => t('data'),
'#size' => 30,
'#maxlength' => 30,
'#states' => array(
'visible' => array(
':input[name="shortcode"]' => array(
'value' => 'button',
),
),
),
);
return $form;
}