You are here

function vimeo_video_uploader_admin_form in Vimeo Video Uploader 7.2

Same name and namespace in other branches
  1. 7 vimeo_video_uploader.inc \vimeo_video_uploader_admin_form()

Function provide form for Vimeo Video Uploader Configuration page.

1 string reference to 'vimeo_video_uploader_admin_form'
vimeo_video_uploader_menu in ./vimeo_video_uploader.module
Implements hook_menu().

File

./vimeo_video_uploader.inc, line 11
Include file for the Vimeo Video Uploader.

Code

function vimeo_video_uploader_admin_form($form, &$form_state) {
  $form['vimeo_auth'] = array(
    '#type' => 'fieldset',
    '#title' => t('Vimeo Video Upload Configuration'),
    '#description' => t("Before Configuring, Read <a target='_blank' href='https://www.drupal.org/node/2726121'>Documentation page</a>."),
  );
  $form['vimeo_auth']['client_id'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('vimeo_video_uploader_client_id'),
    '#title' => t('Enter (Vimeo Client Identifier)'),
    '#required' => TRUE,
  );
  $form['vimeo_auth']['client_secret'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('vimeo_video_uploader_client_secret'),
    '#title' => t('Enter (Vimeo Client Secrets)'),
    '#required' => TRUE,
  );
  $form['vimeo_auth']['access_token'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('vimeo_video_uploader_access_token'),
    '#title' => t('Enter generated (Your new Access token)'),
    '#required' => TRUE,
  );
  $content_types = node_type_get_types();
  $content_types_val = array(
    '' => "-Select-",
  );
  foreach ($content_types as $type) {
    $content_types_val[$type->type] = $type->name;
  }
  $form['vimeo_auth']['content_type_select'] = array(
    '#type' => 'select',
    '#title' => t('Select the Content Types from which you have to upload video to Vimeo'),
    '#options' => $content_types_val,
    '#default_value' => variable_get('vimeo_video_uploader_content_type_select'),
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}