Skip to content
Snippets Groups Projects
Commit bdfd3a60 authored by catch's avatar catch
Browse files

Issue #404116 by amateescu, neclimdul: Fixed Provide default choices on poll translations.

parent decd7576
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -472,6 +472,9 @@ function poll_validate($node, $form) {
function poll_field_attach_prepare_translation_alter(&$entity, $context) {
if ($context['entity_type'] == 'node' && $entity->type == 'poll') {
$entity->choice = $context['source_entity']->choice;
foreach ($entity->choice as $i => $choice) {
$entity->choice[$i]['chvotes'] = 0;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment