Skip to content

Commit

Permalink
Tentative tweak to UI library
Browse files Browse the repository at this point in the history
Wrap CheckboxSet and RadioSet in their respective labels with a hard-coded non-breaking space to try and get them to stick together.
  • Loading branch information
Bloke committed May 1, 2023
1 parent 2bb075b commit d4334da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions textpattern/vendors/Textpattern/UI/CheckboxSet.php
Expand Up @@ -55,10 +55,9 @@ public function __construct($name, $options, $default = null)
$box = new \Textpattern\UI\Checkbox($name, $key, $checked);
$box->setMultiple('name');
$id = $box->getKey();
$label = new \Textpattern\UI\Label($label, $id);
$label = new \Textpattern\UI\Label($box.sp.$label, $id);

$this->add($box, 'checkbox-'.$id)
->add($label, 'label-'.$id);
$this->add($label, 'label-'.$id);
}
}
}
5 changes: 2 additions & 3 deletions textpattern/vendors/Textpattern/UI/RadioSet.php
Expand Up @@ -48,10 +48,9 @@ public function __construct($name, $options, $default = null)

$radio = new \Textpattern\UI\Radio($name, $key, $checked);
$id = $radio->getKey();
$label = new \Textpattern\UI\Label($label, $id);
$label = new \Textpattern\UI\Label($radio.sp.$label, $id);

$this->add($radio, 'radio-'.$id)
->add($label, 'label-'.$id);
$this->add($label, 'label-'.$id);
}
}
}

0 comments on commit d4334da

Please sign in to comment.