You are here

function kaltura_notifications_settings_form in Kaltura 6.2

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

@TODO: Settings form in URL admin/settings/kaltura/general/notifications

1 call to kaltura_notifications_settings_form()
kaltura_settings_form in includes/kaltura.admin.inc
determine how the general settings form will look like.

File

includes/kaltura.admin.inc, line 861

Code

function kaltura_notifications_settings_form() {
  global $base_url;
  $notification_types = array(
    //'1' => 'only server side notifications',
    '2' => 'only client side notifications',
    '3' => 'both server & client notifications',
  );
  $notification_type_description = t('Enabling server notifications allows the Kaltura video platform to update your Drupal server about the status of ' . 'the media content. This is especially useful when uploading content in various formats that needs to be transcoded. ' . 'In order to support server side notifications, your server must be publicly available on the internet.');
  $form['kaltura_notification_type'] = array(
    '#type' => 'checkbox',
    '#options' => 'Enable server side notifications',
    '#description' => $notification_type_description,
    '#title' => t('Enable server side notifications'),
    '#default_value' => variable_get('kaltura_notification_type', 0),
  );
  $form['kaltura_partner_url2'] = array(
    '#type' => 'textfield',
    '#title' => 'Notification URL',
    '#description' => t('Your Drupal site base URL; path %notification_path will be appended.', array(
      '%notification_path' => 'kaltura/notification_handler',
    )),
    '#default_value' => variable_get('kaltura_partner_url2', $base_url),
  );
  $form['last_notification_url'] = array(
    '#type' => 'hidden',
    '#value' => variable_get('kaltura_partner_url2', ''),
  );
  return $form;
  return system_settings_form($form);
}