domain_advanced_form

Versions
domain
domain_advanced_form($form_state)

Implement domain_advanced_form.

Parameters

$form_state The current form state, passed by FormsAPI.

Code

./domain.admin.inc, line 602

<?php
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);
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List