Skip to content

Commit

Permalink
Dev: numeric slider, force thousand separator when default value and …
Browse files Browse the repository at this point in the history
…no user action
  • Loading branch information
LouisGac committed Mar 24, 2016
1 parent 9305a2a commit 5c71ffe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion application/views/survey/questions/multiplenumeric/item.php
Expand Up @@ -149,9 +149,18 @@ class="text form-control <?php echo $kpclass;?>"
$inputEl.attr('value', '');
}

// On form submission, if user action is still on, we must force the value of the input to ''
// On form submission, if user action is still on,
// we must force the value of the input to ''
// and force the thousand separator (this bug still affect 2.06)
$("form").submit(function (e) {;
$inputEl.bootstrapSlider('destroy');

// This problem still afect 2.06
value = $inputEl.val(); // We get the current value of the bootstrapSlider
displayValue = value.toString().replace('.',$separator); // We format it with the right separator
$inputEl.val(displayValue); // We parse it to the element


if($sliderNoActionEl.val()=="1")
{
$inputEl.val('');
Expand Down

0 comments on commit 5c71ffe

Please sign in to comment.