webform_toggles.module in Webform 8.5
Same filename and directory in other branches
Provides a form element for toggling a single on/off state.
File
modules/webform_toggles/webform_toggles.moduleView source
<?php
/**
* @file
* Provides a form element for toggling a single on/off state.
*/
use Drupal\Core\Url;
/**
* Implements hook_webform_libraries_info().
*/
function webform_toggles_webform_libraries_info() {
$libraries = [];
$libraries['jquery.toggles'] = [
'title' => t('jQuery: Toggles'),
'description' => t('Toggles is a lightweight jQuery plugin that creates easy-to-style toggle buttons.'),
'notes' => t('Toggles is used to provide a toggle element.'),
'homepage_url' => Url::fromUri('https://github.com/simontabor/jquery-toggles/'),
'download_url' => Url::fromUri('https://github.com/simontabor/jquery-toggles/archive/v4.0.0.zip'),
'version' => '4.0.0',
'elements' => [
'webform_toggle',
'webform_toggles',
],
'optional' => FALSE,
'deprecated' => t('The Toogles library is not being maintained and has major accessibility issues. It has been <a href=":href">deprecated</a>.', [
':href' => 'https://www.drupal.org/project/webform/issues/2890861',
]),
];
return $libraries;
}
Functions
Name | Description |
---|---|
webform_toggles_webform_libraries_info | Implements hook_webform_libraries_info(). |