function commerce_pricelist_role_form_commerce_pricelist_list_form_alter in Commerce Pricelist 7
Implements hook_form_BASE_FORM_ID_alter().
File
- commerce_pricelist_role/
commerce_pricelist_role.module, line 16 - Summary
Code
function commerce_pricelist_role_form_commerce_pricelist_list_form_alter(&$form, $form_state) {
$entity = $form['entity']['#value'];
$form['#validate'][] = 'commerce_pricelist_role_form_validate';
$options = user_roles();
$default = commerce_pricelist_list_filter_get($entity, 'role');
$form['commerce_pricelist_role'] = array(
'#type' => 'checkboxes',
'#title' => t('Which roles should the price list apply to'),
'#options' => $options,
'#default_value' => $default,
);
}