Verified Commit 94d0636c authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3098960 by pbonnefoi, godotislate, schaefdi, nod_, arunkumark,...

Issue #3098960 by pbonnefoi, godotislate, schaefdi, nod_, arunkumark, smustgrave, candalt: Nested paragraphs with same field name are ordered wrong

(cherry picked from commit 6265e217)
parent 21079592
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1462,7 +1462,8 @@ function template_preprocess_field_multiple_value_form(&$variables): void {

  if ($variables['multiple']) {
    $table_id = Html::getUniqueId($element['#field_name'] . '_values');
    $order_class = $element['#field_name'] . '-delta-order';
    // Using table id allows handing nested content with the same field names.
    $order_class = $table_id . '-delta-order';
    $header_attributes = new Attribute(['class' => ['label']]);
    if (!empty($element['#required'])) {
      $header_attributes['class'][] = 'js-form-required';