Skip to content

Commit

Permalink
Issue #45: Set new wrapper directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
lexhouk committed Feb 2, 2019
1 parent aab4756 commit b14893e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions themes/custom/d8_theme/src/Plugin/Process/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ class Captcha extends ProcessBase implements ProcessInterface {
* {@inheritdoc}
*/
public static function processElement(Element $element, FormStateInterface $form_state, array &$complete_form) {
$theme_wrappers = ['form_element'];

if ($element->hasProperty('theme_wrappers')) {
$element->appendProperty('theme_wrappers', $theme_wrappers[0]);
$element->appendProperty('theme_wrappers', 'form_element');
}
else {
$element->setProperty('theme_wrappers', $theme_wrappers);
$element->setProperty('theme_wrappers', ['form_element']);
}
}

Expand Down

0 comments on commit b14893e

Please sign in to comment.