remove dead code

This commit is contained in:
Matze2010 2020-03-02 06:00:51 +00:00
parent 726c8caf54
commit ad8eeccd72
1 changed files with 8 additions and 5 deletions

View File

@ -244,11 +244,14 @@ class Html
protected static function parseInput($node, $element, &$styles)
{
$attributes = $node->attributes;
$inputType = $attributes->getNamedItem('type')->value;
if (($type = $attributes->getNamedItem('type')->value) === 'checkbox') {
$checked = ($checked = $attributes->getNamedItem('checked')) && $checked->value === "true" ?? false;
$textrun = $element->addTextRun();
$textrun->addFormField('checkbox')->setValue($checked);
switch ($inputType) {
case 'checkbox':
$checked = ($checked = $attributes->getNamedItem('checked')) && $checked->value === "true" ?? false;
$textrun = $element->addTextRun();
$textrun->addFormField('checkbox')->setValue($checked);
break;
}
}