You are here

function kaltura_settings_form in Kaltura 7.2

Same name and namespace in other branches
  1. 5 includes/kaltura.admin.inc \kaltura_settings_form()
  2. 6.2 includes/kaltura.admin.inc \kaltura_settings_form()
  3. 6 includes/kaltura.admin.inc \kaltura_settings_form()

Implements hook_form().

1 string reference to 'kaltura_settings_form'
kaltura_menu in ./kaltura.module
Implements hook_menu().

File

includes/kaltura.admin.inc, line 657
Contains functions for administration use of the kaltura core module.

Code

function kaltura_settings_form() {
  if (variable_get('kaltura_partner_id')) {
    $k_helpers = new KalturaHelpers();
    $mobile = $k_helpers
      ->hasMobileFlavores();
  }
  else {
    $mobile = FALSE;
  }
  $form['kaltura_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Kaltura general settings'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#description' => t('You can perform various advanced administration actions on your media content via Kaltura Management Console. These actions include: setting access control, changing thumbnails, create players, update your email and password, et cetera. Access Kaltura Management Console here: !management_link', array(
      '!management_link' => l('http://www.kaltura.com/index.php/kmc', 'http://www.kaltura.com/index.php/kmc'),
    )),
  );
  $form['kaltura_settings']['kaltura_html5'] = array(
    '#type' => 'fieldset',
    '#title' => t('HTML5 settings mobile delivery'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['kaltura_settings']['kaltura_html5']['add_html5'] = array(
    '#type' => 'checkbox',
    '#title' => t('Support iPhone and iPad with HTML5'),
    '#default_value' => variable_get('kaltura_add_html5', $mobile),
    '#description' => t('The HTML5 video standard is supported in many mobile devices such as Apple’s iPhone and version 2 of the Google Android platform. Some of these popular mobile platforms don’t support Flash plugins and subsequently the video tag is the exclusive mechanism to distribute video in these mobile HTML browsers. By enabling this configuration, the Kaltura videos of this website would play on these devices.'),
    '#disabled' => !$mobile,
  );
  if ($mobile == FALSE) {
    $html5_desc_text_ce = t('Contact your Kaltura server administrator to enable HTML5 players');
    $html5_desc_text_saas = t('Contact Kaltura Sales to enable HTML5 players ') . l('http://site.kaltura.com/contact-us-drupal.html', 'http://site.kaltura.com/contact-us-drupal.html');
    $kaltura_server_url = variable_get('kaltura_server_url');
    $form['kaltura_settings']['kaltura_html5']['html5_text'] = array(
      '#markup' => $kaltura_server_url == 'http://www.kaltura.com' ? $html5_desc_text_saas : $html5_desc_text_ce,
    );
  }
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('submit'),
  );
  return $form;
}