From: Vincent Vanwaelscappel Date: Wed, 12 Jun 2019 12:05:24 +0000 (+0200) Subject: #2810 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=349e334325a463405d4eeebcc6fc7478ab1b8231;p=cubist_cms-back.git #2810 --- diff --git a/src/app/Magic/Fields/Number.php b/src/app/Magic/Fields/Number.php index aa3135e..88c09c9 100644 --- a/src/app/Magic/Fields/Number.php +++ b/src/app/Magic/Fields/Number.php @@ -12,11 +12,12 @@ class Number extends Field protected $_step = 'any'; protected $_min = null; protected $_max = null; + protected $_lang = 'en-150'; public function getDefaultAttributes() { $res = parent::getDefaultAttributes(); - $attrs = ['min', 'max', 'step']; + $attrs = ['min', 'max', 'step', 'lang']; $defaults = []; foreach ($attrs as $attr) { if (null === $this->{'_' . $attr}) { diff --git a/src/resources/views/when.blade.php b/src/resources/views/when.blade.php index 3ae6a78..ed64fc0 100644 --- a/src/resources/views/when.blade.php +++ b/src/resources/views/when.blade.php @@ -13,6 +13,9 @@ var conditions = $(this).data('when'); var match = true; $.each(conditions, function (k, v) { + if (!Array.isArray(v)) { + v = [v]; + } var val = $(form).find('[name="' + k + '"]').val(); var valnum = parseFloat(val); if (!isNumber(valnum)) {