Improved number input initial value decimal handling

This commit is contained in:
Bernd Bestel
2020-11-15 14:15:09 +01:00
parent 1d1642b464
commit 4b342dbd43
29 changed files with 111 additions and 21 deletions

View File

@@ -69,7 +69,8 @@
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'hint' => $__t('The ingredients listed here result in this amount of servings')
'hint' => $__t('The ingredients listed here result in this amount of servings'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
<div class="form-group">
@@ -364,7 +365,8 @@
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => '1',
'invalidFeedback' => $__t('This cannot be lower than %s', '1')
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
</form>