You are here

function oembed_provider_ui::edit_form in oEmbed 6.0

Same name and namespace in other branches
  1. 7 plugins/export_ui/oembed_provider_ui.class.php \oembed_provider_ui::edit_form()
  2. 7.0 plugins/export_ui/oembed_provider_ui.class.php \oembed_provider_ui::edit_form()

Provide the actual editing form.

Overrides ctools_export_ui::edit_form

File

plugins/export_ui/oembed_provider_ui.class.php, line 8

Class

oembed_provider_ui

Code

function edit_form(&$form, &$form_state) {
  parent::edit_form($form, $form_state);
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#description' => t('A human-readable title for the provider.'),
    '#size' => 32,
    '#maxlength' => 255,
    '#required' => TRUE,
    '#default_value' => $form_state['item']->title,
  );
  $form['endpoint'] = array(
    '#type' => 'textfield',
    '#title' => t('Endpoint'),
    '#description' => t('The endpoint where OEmbed requests are going to be sent.'),
    '#size' => 32,
    '#maxlength' => 255,
    '#required' => TRUE,
    '#default_value' => $form_state['item']->endpoint,
  );
  $form['scheme'] = array(
    '#type' => 'textarea',
    '#title' => t('Schemes'),
    '#description' => t('Newline separated list of schemes like !example', array(
      '!example' => 'http://*.revision3.com/*',
    )),
    '#required' => TRUE,
    '#default_value' => $form_state['item']->scheme,
  );
}