You are here

function domain_advanced_form in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_admin.inc \domain_advanced_form()
  2. 7.2 domain.admin.inc \domain_advanced_form()

Implement domain_advanced_form.

Parameters

$form_state: The current form state, passed by FormsAPI.

1 string reference to 'domain_advanced_form'
domain_menu in ./domain.module
Implement hook_menu()

File

./domain.admin.inc, line 610
Administration functions for the domain module.

Code

function domain_advanced_form($form_state) {
  $form = array();
  $node_types = node_get_types('names');
  $default = variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
  $form['domain_node'] = array(
    '#type' => 'fieldset',
    '#title' => t('Domain node types'),
    '#collapsible' => TRUE,
  );
  $form['domain_node']['intro'] = array(
    '#value' => t('<p>Check the content types that should be published to all affiliates when new content is created.</p>'),
  );
  foreach ($node_types as $key => $value) {
    $form['domain_node']['domain_node_' . $key] = array(
      '#type' => 'checkbox',
      '#title' => check_plain($value),
      '#default_value' => variable_get('domain_node_' . $key, $default),
    );
  }

  // Some editors will not have full node editing permissions.  This allows us
  // to give selected permissions for nodes within the editor's domain.
  $form['domain_form'] = array(
    '#type' => 'fieldset',
    '#title' => t('Domain node editing'),
    '#collapsible' => TRUE,
  );
  $form['domain_form']['intro'] = array(
    '#value' => t('<p>When editors view domain-access restricted nodes, which form elements should be exposed?</p>'),
  );
  $options = array(
    'log' => t('Log messages'),
    'options' => t('Publishing options'),
    'comment_settings' => t('Comment settings'),
    'path' => t('Path aliasing'),
    'attachments' => t('File attachments'),
  );
  ksort($options);
  $form['domain_form']['domain_form_elements'] = array(
    '#type' => 'checkboxes',
    '#default_value' => variable_get('domain_form_elements', array(
      'options',
      'delete',
      'comment_settings',
      'path',
    )),
    '#options' => $options,
    '#description' => t('Some elements may not be editable for all users due to permission restrictions.'),
  );
  return system_settings_form($form);
}