diff --git a/modules/order/src/Element/ProfileSelect.php b/modules/order/src/Element/ProfileSelect.php index 01eede0..5d87376 100644 --- a/modules/order/src/Element/ProfileSelect.php +++ b/modules/order/src/Element/ProfileSelect.php @@ -189,11 +189,11 @@ public static function processElement(array $element, FormStateInterface $form_s $id_prefix = implode('-', $element['#parents']); $wrapper_id = Html::getUniqueId($id_prefix . '-ajax-wrapper'); $element = [ - '#prefix' => '
', - '#suffix' => '
', - // Pass the id along to other methods. - '#wrapper_id' => $wrapper_id, - ] + $element; + '#prefix' => '
', + '#suffix' => '
', + // Pass the id along to other methods. + '#wrapper_id' => $wrapper_id, + ] + $element; if ($element_state['mode'] == 'view') { $element['profile_selection'] = [ @@ -341,6 +341,7 @@ public static function validateForm(array &$element, FormStateInterface $form_st * @param \Drupal\profile\Entity\ProfileInterface $profile * The profile. * @param bool $use_latest_revision + * (optional) Use the latest revision, defaults to TRUE. * * @return string * The option ID. @@ -447,7 +448,6 @@ public static function getElementMode(FormStateInterface $form_state) { return $form_state->get('element_mode') ?: 'view'; } - /** * Sets the element state. * diff --git a/modules/order/tests/modules/commerce_order_test/src/Form/ProfileSelectTestForm.php b/modules/order/tests/modules/commerce_order_test/src/Form/ProfileSelectTestForm.php index 6d47d7a..1c59cb8 100644 --- a/modules/order/tests/modules/commerce_order_test/src/Form/ProfileSelectTestForm.php +++ b/modules/order/tests/modules/commerce_order_test/src/Form/ProfileSelectTestForm.php @@ -40,4 +40,4 @@ public function submitForm(array &$form, FormStateInterface $form_state) { drupal_set_message($this->t('Profile selected: :label', [':label' => $profile->label()])); } -} \ No newline at end of file +}