You are here

public function SocialContentPicasa::instanceSettingsForm in Social Content 7.2

Instance settings form.

Return value

array Any instance settings that will be included on all instance forms for the current global.

Overrides SocialContent::instanceSettingsForm

File

modules/picasa/social_content_picasa.class.inc, line 94
Social Content Picasa class.

Class

SocialContentPicasa
@file Social Content Picasa class.

Code

public function instanceSettingsForm() {
  $settings = $this->settings['instance'];
  $form = parent::instanceSettingsForm($settings);
  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('Import'),
    '#options' => $this
      ->getImportTypes(),
    '#description' => t('What should be imported.'),
    '#default_value' => isset($settings['type']) ? $settings['type'] : NULL,
    '#required' => TRUE,
    '#attributes' => array(
      'class' => array(
        'social-content-picasa-type',
      ),
    ),
  );
  $form['user_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Picasa User ID'),
    '#description' => t("The Picasa User ID to pull photos from his photostream. E.g. '112664698474339089009'."),
    '#required' => TRUE,
    '#default_value' => isset($settings['user_id']) ? $settings['user_id'] : NULL,
  );
  $form['album_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Picasa Album ID'),
    '#description' => t("The Picasa Album ID to pull photos from. E.g. '5632158210784470017'."),
    '#default_value' => isset($settings['album_id']) ? $settings['album_id'] : NULL,
    '#states' => array(
      'visible' => array(
        '.social-content-picasa-type' => array(
          'value' => 'album',
        ),
      ),
    ),
  );
  return $form;
}