Skip to content
Snippets Groups Projects
Commit cd101011 authored by Florent Torregrosa's avatar Florent Torregrosa Committed by Florent Torregrosa
Browse files

Issue #3265455 by Grimreaper: Add README.md file and update project page

parent fbbe68f6
No related branches found
No related tags found
No related merge requests found
ENTITY ACCESS PASSWORD
----------------------
* Introduction
* Requirements
* Similar modules
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
This module provides a Form API select element with icons using jQuery UI.
This module is for developers only. It does not provide any user functionality.
With Select icons you can easily create select element with icons of your choice
using nothing but drupal Forms API and some CSS:
```php
$form['fancy_select'] = [
'#type' => 'select_icons',
'#title' => $this->t('Color'),
'#options' => [
'r' => $this->t('Red'),
'g' => $this->t('Green'),
'b' => $this->t('Blue'),
],
// This is where magic happens:
// CSS classes from 'data-class' attribute are used in JavaScript
// when building jQuery UI selectmenu widget.
'#options_attributes' => [
'r' => new Attribute(['data-class' => ['colour', 'red']]),
'g' => new Attribute(['data-class' => ['colour', 'green']]),
'b' => new Attribute(['data-class' => ['colour', 'blue']]),
],
// Don't forget to add proper CSS that will provide icons.
// It is recommended to use sprite sheets for better performance.
'#attached' => [ 'library' => ['my/colours'] ],
];
```
REQUIREMENTS
------------
This module requires the following modules:
* jQuery UI Selectmenu Widget (https://www.drupal.org/project/jquery_ui_selectmenu)
SIMILAR MODULES
---------------
* Select2 Boxes (https://www.drupal.org/project/select2boxes):
Select2 Boxes integrates with Select2 library and provides field widget
plugins while Select Icons integrates with jQuery UI and is for developer.
INSTALLATION
------------
* Install as you would normally install a contributed Drupal module. See:
https://www.drupal.org/docs/extending-drupal/installing-modules
for further information.
CONFIGURATION
-------------
The module has no menu or modifiable settings. There is no configuration.
MAINTAINERS
-----------
Current maintainers:
* Florent Torregrosa (Grimreaper) - https://www.drupal.org/user/2388214
Previous maintainers:
* SiliconMind - https://www.drupal.org/user/90277
* vlad.dancer - https://www.drupal.org/user/903844
This project has been sponsored by:
* Globalbility - https://www.drupal.org/globalbility
Sponsored initial development.
selecticons:
version: VERSION
js:
js/ui.selecticons.js: {}
css:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment