You are here

function sharethis_sharethis_content_type_edit_form in ShareThis 7.2

Sharethis content type edit form.

File

plugins/content_types/sharethis/sharethis.inc, line 55

Code

function sharethis_sharethis_content_type_edit_form($form, &$form_state) {
  $conf = $form_state['conf'];
  $description = t('Context or Global - Use context if available or default to Global.');
  $description .= '<br />';
  $description .= t('External - Useful in iframes (Facebook Tabs, etc.)');
  $form['path'] = array(
    '#type' => 'select',
    '#title' => t('Path to share'),
    '#options' => array(
      'global' => t('Context or Global'),
      'external' => t('External URL'),
    ),
    '#description' => $description,
    '#default_value' => $conf['path'],
  );
  $form['path-external'] = array(
    '#type' => 'textfield',
    '#title' => t('External URL'),
    '#default_value' => $conf['path-external'],
    '#states' => array(
      'visible' => array(
        ':input[name="path"]' => array(
          'value' => 'external',
        ),
      ),
    ),
  );
  return $form;
}