Loading modules/order/src/Plugin/Field/FieldWidget/AdjustmentDefaultWidget.php +1 Changes for modules/order/src/Plugin/Field/FieldWidget/AdjustmentDefaultWidget.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class AdjustmentDefaultWidget extends WidgetBase { '#type' => 'commerce_price', '#title' => t('Amount'), '#default_value' => ($adjustment) ? $adjustment->getAmount()->toArray() : NULL, '#allow_negative' => TRUE, '#states' => [ 'optional' => [ 'select[name="' . $states_selector_name . '"]' => ['value' => '_none'], Loading modules/price/src/Element/Price.php +3 Changes for modules/price/src/Element/Price.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Drupal\Core\Render\Element\FormElement; * '#type' => 'commerce_price', * '#title' => $this->t('Amount'), * '#default_value' => ['number' => '99.99', 'currency_code' => 'USD'], * '#allow_negative' => FALSE, * '#size' => 60, * '#maxlength' => 128, * '#required' => TRUE, Loading @@ -33,6 +34,7 @@ class Price extends FormElement { '#size' => 10, '#maxlength' => 128, '#default_value' => NULL, '#allow_negative' => FALSE, '#attached' => [ 'library' => ['commerce_price/admin'], ], Loading Loading @@ -99,6 +101,7 @@ class Price extends FormElement { '#min_fraction_digits' => min($fraction_digits), // '6' is the field storage maximum. '#max_fraction_digits' => 6, '#min' => $element['#allow_negative'] ? NULL : 0, ]; unset($element['#size']); unset($element['#maxlength']); Loading Loading
modules/order/src/Plugin/Field/FieldWidget/AdjustmentDefaultWidget.php +1 Changes for modules/order/src/Plugin/Field/FieldWidget/AdjustmentDefaultWidget.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class AdjustmentDefaultWidget extends WidgetBase { '#type' => 'commerce_price', '#title' => t('Amount'), '#default_value' => ($adjustment) ? $adjustment->getAmount()->toArray() : NULL, '#allow_negative' => TRUE, '#states' => [ 'optional' => [ 'select[name="' . $states_selector_name . '"]' => ['value' => '_none'], Loading
modules/price/src/Element/Price.php +3 Changes for modules/price/src/Element/Price.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Drupal\Core\Render\Element\FormElement; * '#type' => 'commerce_price', * '#title' => $this->t('Amount'), * '#default_value' => ['number' => '99.99', 'currency_code' => 'USD'], * '#allow_negative' => FALSE, * '#size' => 60, * '#maxlength' => 128, * '#required' => TRUE, Loading @@ -33,6 +34,7 @@ class Price extends FormElement { '#size' => 10, '#maxlength' => 128, '#default_value' => NULL, '#allow_negative' => FALSE, '#attached' => [ 'library' => ['commerce_price/admin'], ], Loading Loading @@ -99,6 +101,7 @@ class Price extends FormElement { '#min_fraction_digits' => min($fraction_digits), // '6' is the field storage maximum. '#max_fraction_digits' => 6, '#min' => $element['#allow_negative'] ? NULL : 0, ]; unset($element['#size']); unset($element['#maxlength']); Loading