runopencode / dm-chosen-select-jquery-plugin
dmChosenSelectJQueryPlugin - jQuery chosen select widget for Diem Extended
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Language:JavaScript
Type:symfony1-plugin
Requires
- composer/installers: dev-master
This package is auto-updated.
Last update: 2022-02-01 12:25:40 UTC
README
Author: TheCelavi
Version: 1.0
Stability: Stable
Date: June 24th, 2013
Courtesy of Run Open Code
License: Free for all
dmChosenSelectJQueryPlugin for Diem Extended adds support for jQuery Chosen select plugin for Choice and Doctrine Choice form widget. Can be added to front and to admin, as well as for public pages.
Settings and customization:
Two widgets are available:
- sfWidgetFormDmChoiceChosen
- sfWidgetFormDmDoctrineChoiceChosen
Use them as regular sfWidgetForm* widgets in your forms. They extend basic widgets, and the add several more options:
no_results_text
: No result text in searchtheme
: CSS file to use for styling the chosen selectmax_selected_options
: Maximum available options to select, if select is multipleplaceholder_text_multiple
: Placeholder text for multiple choicesplaceholder_text_single
: Placeholder text for single choice
Regaring theme, see 'config/dm/config.yml':
default:
dmChosenSelectJQueryPlugin:
themes:
admin: dmChosenSelectJQueryPlugin.admin
Under themes
key, you can define your theme and provide path to CSS file. In this example, the path to the CSS file
is acquired via assets.yml
setting, but you can provide a real path to CSS file (not recommended).
In web
dir you can find LESS file to help you start with styling.
Usage in admin/form generator:
To have these fields in admin, for your fields, add in schema.yml: extra: choice_chosen
or extra: doctrine_choice_chosen
.
Example:
Testobj:
actAs:
DmSortable:
columns:
title: { type: string(255), notnull: true }
is_active: { type: boolean, notnull: true, default: false }
keywords: { type: enum, values: ['val 1', 'val 2'] notnull: true, extra: choice_chosen }
related_obj_id: { type: int, notnull: true, extra: doctrine_choice_chosen }