zoomapi.admin.inc in Zoom API 7
Same filename and directory in other branches
Page callbacks for Zoom API administrative pages.
File
zoomapi.admin.incView source
<?php
/**
* @file
* Page callbacks for Zoom API administrative pages.
*/
/**
* Settings Form.
*/
function zoomapi_settings_form($form, &$form_state) {
// API Key.
$form['zoomapi_key'] = [
'#title' => t('Zoom API Key'),
'#description' => 'https://zoom.us/developer/api/credential',
'#default_value' => variable_get('zoomapi_key', ''),
'#type' => 'textfield',
'#required' => TRUE,
];
// API Secret.
$form['zoomapi_secret'] = [
'#title' => t('Zoom API Secret'),
'#description' => 'https://zoom.us/developer/api/credential',
'#default_value' => variable_get('zoomapi_secret', ''),
'#type' => 'textfield',
'#required' => TRUE,
];
// API URL.
$form['zoomapi_url'] = [
'#title' => t('Zoom API URL'),
'#type' => 'textfield',
'#required' => TRUE,
'#default_value' => variable_get('zoomapi_url', 'api.zoom.us/v1'),
'#field_prefix' => 'https://',
'#field_suffix' => '/',
];
// SendRequests enabled.
$form['zoomapi_sendrequests_enabled'] = [
'#title' => t('Enable API'),
'#type' => 'checkbox',
'#default_value' => variable_get('zoomapi_sendrequests_enabled', TRUE),
'#description' => t('Uncheck this to disable sending API requests to Zoom. This may be useful for debugging API calls without actually sending the request.'),
];
// Enable webhooks.
$form['zoomapi_webhooks_enabled'] = [
'#title' => t('Enable Webhooks'),
'#type' => 'checkbox',
'#default_value' => variable_get('zoomapi_webhooks_enabled', 0),
'#description' => 'https://zoom.github.io/api/?shell#webhooks',
];
$form['zoomapi_webhooks_username'] = [
'#title' => t('HTTP Basic Auth Username'),
'#type' => 'textfield',
'#default_value' => variable_get('zoomapi_webhooks_username', ''),
'#states' => [
'visible' => [
'input[name="zoomapi_webhooks_enabled"]' => [
'checked' => TRUE,
],
],
],
];
$form['zoomapi_webhooks_password'] = [
'#title' => t('HTTP Basic Auth Password'),
'#type' => 'textfield',
'#default_value' => variable_get('zoomapi_webhooks_password', ''),
'#states' => [
'visible' => [
'input[name="zoomapi_webhooks_enabled"]' => [
'checked' => TRUE,
],
],
],
];
return system_settings_form($form);
}
Functions
Name![]() |
Description |
---|---|
zoomapi_settings_form | Settings Form. |