You are here

function linkedin_insights_tag_admin_settings_form in LinkedIn Insights Tag 7

Provides module settings configuration form.

1 string reference to 'linkedin_insights_tag_admin_settings_form'
linkedin_insights_tag_menu in ./linkedin_insights_tag.module
Implements hook_menu().

File

./linkedin_insights_tag.admin.inc, line 11
Administrative page callbacks for the linkedin_insights_tag module.

Code

function linkedin_insights_tag_admin_settings_form($form_state) {
  $form['account'] = array(
    '#type' => 'fieldset',
    '#title' => t('LinkedIn Insight Tag settings'),
  );
  $form['account']['linkedin_insights_tag__partner_id'] = array(
    '#title' => t('LinkedIn Partner ID'),
    '#type' => 'textfield',
    '#default_value' => variable_get('linkedin_insights_tag__partner_id', ''),
    '#size' => 25,
    '#maxlength' => 50,
    '#required' => TRUE,
    '#description' => t('Partner ID provided by Linkedin Insights.'),
  );
  $form['account']['linkedin_insights_tag__image_only'] = [
    '#type' => 'checkbox',
    '#title' => t('Force image usage only'),
    '#description' => t('Choose this option whenever you want to force the tracking to only use the image pixel and not javascript.'),
    '#default_value' => variable_get('linkedin_insights_tag__image_only', 0),
  ];
  $form['tracking']['role_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Roles'),
  );
  $form['tracking']['role_settings']['linkedin_insights_tag__roles'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Add tracking for specific roles'),
    '#default_value' => variable_get('linkedin_insights_tag__roles', array()),
    '#options' => array_map('check_plain', user_roles()),
    '#description' => t('If none of the roles are selected, all users will be tracked. If a user has any of the roles checked, that user will be tracked.'),
  );
  return system_settings_form($form);
}