Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 8dc0962

Browse files
authored
Merge pull request #3 from kunicmarko20/issue#2
Multiple ColorPickerTypes in form
2 parents 3ab13c1 + 2106be2 commit 8dc0962

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ use KunicMarko\ColorPickerBundle\Form\Type\ColorPickerType;
4747
4848
$builder->add('field', ColorPickerType::class);
4949
```
50+
51+
At the end of your body/layout add:
52+
```
53+
<script type="text/javascript" src="{{ asset('bundles/colorpicker/js/jqColorPicker.min.js') }}"></script>
54+
<script type="text/javascript">
55+
$('.colorpicker').colorPicker();
56+
</script>
57+
```
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{% block color_picker_widget %}
22
<input {{ block('widget_attributes') }} value="{{ value|default('#FF0000') }}"/>
3-
4-
<script type="text/javascript" src="{{ asset('bundles/colorpicker/js/jqColorPicker.min.js') }}"></script>
5-
<script type="text/javascript">
6-
$('.colorpicker').colorPicker();
7-
</script>
83
{% endblock %}

0 commit comments

Comments
 (0)