You are here

function simple_access_node_type_submit in Simple Access 7.2

Same name and namespace in other branches
  1. 6.2 simple_access.module \simple_access_node_type_submit()

Submit callback for the node type alter form.

1 string reference to 'simple_access_node_type_submit'
simple_access_form_node_type_form_alter in ./simple_access.module
Implements hook_form_FORM_ID_alter().

File

./simple_access.module, line 432
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function simple_access_node_type_submit(&$form, &$form_state) {
  $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
  $type = $form_state['values']['type'];
  if ($op == t('Save content type')) {
    variable_set('simple_access_' . $type, $form_state['values']['simple_access']);
  }
}