Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix variable scope for color picker

This intend to bo conflict when new fields was defined (like datepicker) after color picker where $field variable was no longer the same
  • Loading branch information...
commit c1c36ead3d65b4ec23066687b4e894fe583a943e 1 parent 2537f6f
Joel Wurtz joelwurtz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Resources/views/Form/jquery_layout.html.twig
4 Resources/views/Form/jquery_layout.html.twig
View
@@ -136,8 +136,8 @@
{% spaceless %}
<script type="text/javascript">
jQuery(document).ready(function($) {
- $field = $('#{{ id }}');
- $configs = $.extend({
+ var $field = $('#{{ id }}');
+ var $configs = $.extend({
color: '#' + $field.val(),
onBeforeShow: function() {
$(this).ColorPickerSetColor($field.val());
Please sign in to comment.
Something went wrong with that request. Please try again.