GitXplorerGitXplorer
k

ColorPickerBundle

public
4 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
5c288af373e733aaf8ce529d4dbebe0fca227a6b

fix build

kkunicmarko20 committed 6 years ago
Verified
e41b280c9476cdb519ebabe2eecc27200332414c

Merge pull request #4 from kunicmarko20/allow_symfony4

kkunicmarko20 committed 7 years ago
Unverified
3f6b7478f85bb419d7107f1a84422377e33ca86a

allow Symfony4

kkunicmarko20 committed 7 years ago
Unverified
8dc0962b522d109d0678063025aa960e012c143c

Merge pull request #3 from kunicmarko20/issue#2

kkunicmarko20 committed 7 years ago
Unverified
2106be2bda7e406fa3610ad4dc40c9cfc7e94759

Text files should end with a newline character

kkunicmarko20 committed 7 years ago
Unverified
9f00cdb3c4474b8e631964b557d45ffff385e708

fix issue with multiple form types and delagate adding javascript lib to user

kkunicmarko20 committed 7 years ago

README

The README file for this repository.

Color Picker Bundle

Build Status SensioLabsInsight StyleCI Coverage Status

Adds Color Picker Form Type to Symfony.

Built on top of tinyColorPicker.

Documentation

Installation

1. Add to composer.json to the require key

composer require kunicmarko/color-picker-bundle

2. Register the bundle in app/AppKernel.php

$bundles = array(
    // ...
    new KunicMarko\ColorPickerBundle\ColorPickerBundle(),
);

3. Install assets

app/console assets:install

How to use

In your form you can add it like:

// Symfony 2.8 and newer versions
use KunicMarko\ColorPickerBundle\Form\Type\ColorPickerType;

$builder->add('field', ColorPickerType::class);

At the end of your body/layout add:

<script type="text/javascript" src="https://raw.githubusercontent.com/kunicmarko20/ColorPickerBundle/master/{{ asset('bundles/colorpicker/js/jqColorPicker.min.js') }}"></script>
<script type="text/javascript">
    $('.colorpicker').colorPicker();
</script>