Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 13, 2022
1 parent 4d054a5 commit c2b6b11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Forms/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ public function addPassword(
$label = null,
?int $cols = null,
?int $maxLength = null
): Controls\TextInput {
): Controls\TextInput
{
return $this[$name] = (new Controls\TextInput($label, $maxLength))
->setHtmlAttribute('size', $cols)
->setHtmlType('password');
Expand Down Expand Up @@ -454,7 +455,8 @@ public function addMultiSelect(
$label = null,
?array $items = null,
?int $size = null
): Controls\MultiSelectBox {
): Controls\MultiSelectBox
{
return $this[$name] = (new Controls\MultiSelectBox($label, $items))
->setHtmlAttribute('size', $size > 1 ? $size : null);
}
Expand Down
3 changes: 2 additions & 1 deletion src/Forms/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public static function createInputList(
?array $inputAttrs = null,
?array $labelAttrs = null,
$wrapper = null
): string {
): string
{
[$inputAttrs, $inputTag] = self::prepareAttrs($inputAttrs, 'input');
[$labelAttrs, $labelTag] = self::prepareAttrs($labelAttrs, 'label');
$res = '';
Expand Down

0 comments on commit c2b6b11

Please sign in to comment.