diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php index 2dc7094..b0a7b28 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php @@ -35,16 +35,18 @@ public function instanceSettingsForm(array $form, FormStateInterface $form_state $settings = $this->getSettings(); $element['min'] = array( - '#type' => 'number', + '#type' => 'textfield', '#title' => t('Minimum'), '#default_value' => $settings['min'], '#description' => t('The minimum value that should be allowed in this field. Leave blank for no minimum.'), + '#element_validate' => array('form_validate_number'), ); $element['max'] = array( - '#type' => 'number', + '#type' => 'textfield', '#title' => t('Maximum'), '#default_value' => $settings['max'], '#description' => t('The maximum value that should be allowed in this field. Leave blank for no maximum.'), + '#element_validate' => array('form_validate_number'), ); $element['prefix'] = array( '#type' => 'textfield', diff --git a/core/lib/Drupal/Core/Render/Element/Select.php b/core/lib/Drupal/Core/Render/Element/Select.php index 1975be7..70f14d6 100644 --- a/core/lib/Drupal/Core/Render/Element/Select.php +++ b/core/lib/Drupal/Core/Render/Element/Select.php @@ -132,12 +132,12 @@ public static function valueCallback(&$element, $input, FormStateInterface $form return (isset($element['#default_value']) && is_array($element['#default_value'])) ? $element['#default_value'] : array(); } } - // Non-multiple select elements may have an empty option preprended to them - // (see processSelect()). When this occurs, usually #empty_value is an - // empty string, but some forms set #empty_value to integer 0 or some - // other non-string constant. PHP receives all submitted form input as - // strings, but if the empty option is selected, set the value to match the - // empty value exactly. + // Non-multiple select elements may have an empty option prepended to them + // (see \Drupal\Core\Render\Element\Select::processSelect()). When this + // occurs, usually #empty_value is an empty string, but some forms set + // #empty_value to integer 0 or some other non-string constant. PHP + // receives all submitted form input as strings, but if the empty option + // is selected, set the value to match the empty value exactly. elseif (isset($element['#empty_value']) && $input === (string) $element['#empty_value']) { return $element['#empty_value']; } diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php index 4796824..3751a29 100644 --- a/core/lib/Drupal/Core/Render/Element/Table.php +++ b/core/lib/Drupal/Core/Render/Element/Table.php @@ -47,8 +47,8 @@ public function getInfo() { ), // Properties for tabledrag support. // The value is a list of arrays that are passed to - // drupal_attach_tabledrag(). preRenderTable() prepends the HTML ID of the - // table to each set of options. + // drupal_attach_tabledrag(). Table::preRenderTable() prepends the HTML ID + // of the table to each set of options. // @see drupal_attach_tabledrag() '#tabledrag' => array(), // Render properties. @@ -125,8 +125,8 @@ public static function processTable(&$element, FormStateInterface $form_state, & $row = &$element[$key]; // Prepare the element #parents for the tableselect form element. // Their values have to be located in child keys (#tree is ignored), - // since validateTable() has to be able to validate whether input (for - // the parent #type 'table' element) has been submitted. + // since Table::validateTable() has to be able to validate whether input + // (for the parent #type 'table' element) has been submitted. $element_parents = array_merge($element['#parents'], array($key)); // Since the #parents of the tableselect form element will equal the