You are here

function sharethis_block_block_configure in Sharethis block 7

Implements hook_block_configure().

File

./sharethis_block.module, line 39
Hook implementations for the sharethis_block module.

Code

function sharethis_block_block_configure($delta = '') {
  $form = [];
  switch ($delta) {
    case 'sharethis':
      $form['sharethis_property_id'] = [
        '#type' => 'textfield',
        '#required' => TRUE,
        '#title' => t('Property ID'),
        '#description' => t('The unique property ID from your sharethis account.'),
        '#default_value' => variable_get('sharethis_property_id', ''),
      ];
      $form['sharethis_inline'] = [
        '#type' => 'radios',
        '#options' => [
          '1' => 'Inline',
          '0' => 'Sticky',
        ],
        '#required' => TRUE,
        '#title' => t('Inline or sticky'),
        '#description' => t('Whether to show inline buttons, placed with the block, or sticky buttons on the side or bottom of the page.'),
        '#default_value' => variable_get('sharethis_inline', 0),
      ];
      break;
  }
  return $form;
}