Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyun committed Aug 5, 2020
2 parents 9f25bc4 + b19dcee commit ff2b5d4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions os2forms.module
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,34 @@ function os2forms_webform_migrate_d7_webform_element_date_popup_alter(&$markup,
}
}
}

/**
* Implements hook_webform_migrate_d7_webform_element_ELEMENT_TYPE_alter().
*
* Not released hook
* @See https://www.drupal.org/project/webform_migrate/issues/3155073
*/
function os2forms_webform_migrate_d7_webform_element_bt_layout_row_alter(&$markup, $indent, array $element) {
$markup .= "$indent '#type': webform_flexbox\n";

$extra = unserialize($element['extra']);
if (!empty($extra['description'])) {
$value = "\"" . str_replace(['"', "\n", "\r"], ["'", '\n', ''], $extra['description']) . "\"";
$markup .= "$indent #description: $value\n";
}
}

/**
* Implements hook_webform_migrate_d7_webform_element_ELEMENT_TYPE_alter().
*
* Not released hook
* @See https://www.drupal.org/project/webform_migrate/issues/3155073
*/
function os2forms_webform_migrate_d7_webform_element_bt_layout_cols_alter(&$markup, $indent, array $element) {
$markup .= "$indent '#type': container\n";
$extra = unserialize($element['extra']);
if (!empty($extra['description'])) {
$value = "\"" . str_replace(['"', "\n", "\r"], ["'", '\n', ''], $extra['description']) . "\"";
$markup .= "$indent #description: $value\n";
}
}

0 comments on commit ff2b5d4

Please sign in to comment.