function taxonomy_access_enable_vocab_submit in Taxonomy Access Control 7
Form submission handler for taxonomy_access_admin_role().
Processes submissions for the vocabulary 'Add' button.
1 string reference to 'taxonomy_access_enable_vocab_submit'
- taxonomy_access_admin_role in ./
taxonomy_access.admin.inc - Form constructor for a form to manage grants by role.
File
- ./
taxonomy_access.admin.inc, line 592 - Administrative interface for taxonomy access control.
Code
function taxonomy_access_enable_vocab_submit($form, &$form_state) {
$rid = $form_state['values']['rid'];
$vid = $form_state['values']['enable_vocab'];
$roles = _taxonomy_access_user_roles();
$vocab = taxonomy_vocabulary_load($vid);
if (taxonomy_access_enable_vocab($vid, $rid)) {
drupal_set_message(t('Vocabulary %vocab enabled successfully for the %role role.', array(
'%vocab' => $vocab->name,
'%role' => $roles[$rid],
)));
}
else {
drupal_set_message(t('The vocabulary could not be enabled.'), 'error');
}
}