diff --git a/src/TwbsHelper/Form/View/Helper/MultiCheckboxTrait.php b/src/TwbsHelper/Form/View/Helper/MultiCheckboxTrait.php index f3819682..a21b0f3f 100644 --- a/src/TwbsHelper/Form/View/Helper/MultiCheckboxTrait.php +++ b/src/TwbsHelper/Form/View/Helper/MultiCheckboxTrait.php @@ -41,8 +41,12 @@ public function render(\Laminas\Form\ElementInterface $element): string $content = ''; foreach (explode(self::$TMP_SEPARATOR, $tmpContent) as $optionContent) { + // Retrieve input content if (preg_match('/(]*>.*)(]+>)(.*<\/label[^>]*>)/', $optionContent, $matches)) { + $extraOptionContent = trim(str_replace($matches[0], '', $optionContent)); + + $labelContent = $matches[1] . $matches[3]; if (preg_match('/]*>\s*<\/label[^>]*>/', $labelContent)) { $labelContent = ''; @@ -50,10 +54,16 @@ public function render(\Laminas\Form\ElementInterface $element): string $optionContent = $matches[2] . ($labelContent ? PHP_EOL . $labelContent : ''); - $content .= ($content ? PHP_EOL : '') . $this->renderElementOption( + $optionContent = $this->renderElementOption( $element, $optionContent, ); + + if ($extraOptionContent) { + $optionContent = $extraOptionContent . PHP_EOL . $optionContent; + } + + $content .= ($content ? PHP_EOL : '') . $optionContent; } } diff --git a/tests/TestSuite/Documentation/TestCase.php b/tests/TestSuite/Documentation/TestCase.php index d86a507a..fc572331 100644 --- a/tests/TestSuite/Documentation/TestCase.php +++ b/tests/TestSuite/Documentation/TestCase.php @@ -1,6 +1,6 @@ assertEquals( '
' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - '
' . PHP_EOL . - '
' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - '
' . PHP_EOL . - '
' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - '
', + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '' . PHP_EOL . + '
' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '
' . PHP_EOL . + '
' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '
', $this->helper->render(new \Laminas\Form\Element\MultiCheckbox( 'test', [ @@ -37,4 +37,37 @@ public function testRenderSimpleValues() )) ); } + + public function testRenderHiddenElement() + { + $multiCheckbox = new \Laminas\Form\Element\MultiCheckbox( + 'test', + [ + 'label' => 'MultiCheckbox with hidden element', + 'value_options' => [ + 0 => 'First checkbox', + 1 => 'Second checkbox', + 2 => 'Third checkbox', + ], + 'use_hidden_element' => true, + ] + ); + $multiCheckbox->setUseHiddenElement(true); + $this->assertEquals( + '' . PHP_EOL . + '
' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '
' . PHP_EOL . + '
' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '
' . PHP_EOL . + '
' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '
', + $this->helper->render($multiCheckbox) + ); + } } diff --git a/tests/TestSuite/TwbsHelper/View/Helper/HtmlAttributes/HtmlClass/Helper/GutterTest.php b/tests/TestSuite/TwbsHelper/View/Helper/HtmlAttributes/HtmlClass/Helper/GutterTest.php index 8dbbddce..0a6a19ad 100644 --- a/tests/TestSuite/TwbsHelper/View/Helper/HtmlAttributes/HtmlClass/Helper/GutterTest.php +++ b/tests/TestSuite/TwbsHelper/View/Helper/HtmlAttributes/HtmlClass/Helper/GutterTest.php @@ -1,6 +1,6 @@ formButton()->renderSpec([ 'positioned' => true, 'type' => 'pill', 'hidden_content' => 'unread messages', - ] + ], ], 'variant' => 'primary', ], @@ -143,7 +143,7 @@ echo $this->formButton()->renderSpec([ 'positioned' => true, 'type' => 'pill', 'hidden_content' => 'New alerts', - ] + ], ], 'variant' => 'primary', ], diff --git a/website/docs/usage/components/button-group.mdx b/website/docs/usage/components/button-group.mdx index c7de2d8f..fc13416a 100644 --- a/website/docs/usage/components/button-group.mdx +++ b/website/docs/usage/components/button-group.mdx @@ -58,7 +58,7 @@ echo $this->buttonGroup( 'attributes' => [ 'class' => 'active', 'aria-current' => 'page', - 'href' => '#' + 'href' => '#', ], ], [ diff --git a/website/docs/usage/components/card.mdx b/website/docs/usage/components/card.mdx index 645befbc..2b58e653 100644 --- a/website/docs/usage/components/card.mdx +++ b/website/docs/usage/components/card.mdx @@ -679,7 +679,7 @@ echo $this->card([ ['label' => 'Active', 'uri' => '#', 'active' => true,], ['label' => 'Link', 'uri' => '#',], ['label' => 'Disabled', 'uri' => '#', 'visible' => false,], - ] + ], ], 'title' => 'Special title treatment', 'text' => 'With supporting text below as a natural lead-in to additional content.', @@ -739,7 +739,7 @@ echo $this->card([ 'text' => [ 'This is a wider card with supporting text below as a natural lead-in to additional content. ' . 'This content is a little bit longer.', - 'Last updated 3 mins ago' + 'Last updated 3 mins ago', ], 'image_bottom' => ['/twbs-helper-module/img/docs/image-cap.svg', ['alt' => '...']], ]); @@ -825,7 +825,7 @@ echo $this->card([ ['alt' => '...', 'fluid' => true, 'rounded' => 'start'], ], ], - ['column' => 'md-4'] + ['column' => 'md-4'], ], [ [ @@ -840,7 +840,7 @@ echo $this->card([ ], ], ['class' => 'g-0'], - ] + ], ], ['class' => 'mb-3', 'style' => 'max-width: 540px;']); ``` @@ -1218,7 +1218,7 @@ echo $this->cardGroup([ 'title' => 'Card title', 'text' => [ 'This card has supporting text below as a natural lead-in to additional content.', - 'Last updated 3 mins ago' + 'Last updated 3 mins ago', ], ], [ @@ -1389,7 +1389,7 @@ echo $this->cardGrid( 'title' => 'Card title', 'text' => [ 'This card has supporting text below as a natural lead-in to additional content.', - 'Last updated 3 mins ago' + 'Last updated 3 mins ago', ], ], [ @@ -1433,7 +1433,7 @@ echo $this->cardGrid( 'title' => 'Card title', 'text' => [ 'This card has supporting text below as a natural lead-in to additional content.', - 'Last updated 3 mins ago' + 'Last updated 3 mins ago', ], ], [ diff --git a/website/docs/usage/components/collapse.mdx b/website/docs/usage/components/collapse.mdx index 0e202f7b..df430e6e 100644 --- a/website/docs/usage/components/collapse.mdx +++ b/website/docs/usage/components/collapse.mdx @@ -44,7 +44,7 @@ echo $this->collapse( 'options' => [ 'variant' => 'primary', 'label' => 'Link with href', - 'tag' => 'a' + 'tag' => 'a', ], ], [ diff --git a/website/docs/usage/components/dropdowns.mdx b/website/docs/usage/components/dropdowns.mdx index a12c70b8..b8239089 100644 --- a/website/docs/usage/components/dropdowns.mdx +++ b/website/docs/usage/components/dropdowns.mdx @@ -532,7 +532,7 @@ echo $this->formButton()->renderSpec([ 'Something else here', '---', 'Separated link', - ] + ], ], ], ]); @@ -762,7 +762,7 @@ echo $this->dropdown()->renderMenu([ 'Dropdown item text' => \TwbsHelper\View\Helper\Dropdown::TYPE_ITEM_TEXT, 'Action', 'Another action', - 'Something else here' + 'Something else here', ]); ``` @@ -791,7 +791,7 @@ echo $this->dropdown()->renderMenu([ echo $this->dropdown()->renderMenu([ 'Regular link', 'Active link' => ['active' => true], - 'Another link' + 'Another link', ]); ``` @@ -820,7 +820,7 @@ echo $this->dropdown()->renderMenu([ echo $this->dropdown()->renderMenu([ 'Regular link', 'Disabled link' => ['disabled' => true], - 'Another link' + 'Another link', ]); ``` @@ -1155,7 +1155,7 @@ echo $this->dropdown()->renderMenu([ +` }}> diff --git a/website/docs/usage/components/navbar.mdx b/website/docs/usage/components/navbar.mdx index 4b5e9917..b5e2330a 100644 --- a/website/docs/usage/components/navbar.mdx +++ b/website/docs/usage/components/navbar.mdx @@ -44,7 +44,7 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; Disabled - + @@ -433,7 +433,7 @@ echo $this->navigation()->navbar()->render( ', ['column' => 8], - ] + ], ]); ``` diff --git a/website/docs/usage/components/toasts.mdx b/website/docs/usage/components/toasts.mdx index 6f6cfb98..9fe47d74 100644 --- a/website/docs/usage/components/toasts.mdx +++ b/website/docs/usage/components/toasts.mdx @@ -92,7 +92,7 @@ echo $this->formButton()->renderSpec([ ], 'attributes' => [ 'id' => 'liveToastBtn', - ] + ], ]); echo $this->toast([ @@ -223,7 +223,7 @@ echo $this->toastStack([ 'subtitle' => '2 seconds ago', ], 'body' => 'Heads up, toasts will stack automatically', - ] + ], ]); ``` @@ -284,13 +284,13 @@ echo $this->toast([ [ 'options' => [ 'size' => 'sm', - 'label' => 'Close' + 'label' => 'Close', ], 'attributes' => [ 'data-bs-dismiss' => 'toast', ], ], - ] + ], ], ]); ``` diff --git a/website/docs/usage/content/tables.mdx b/website/docs/usage/content/tables.mdx index 78670e12..fd10443a 100644 --- a/website/docs/usage/content/tables.mdx +++ b/website/docs/usage/content/tables.mdx @@ -560,7 +560,7 @@ echo $this->table([ [ '3', ['data' => 'Larry the Bird', 'active' => true, 'attributes' => ['colspan' => 2]], - '@twitter' + '@twitter', ], ], ]); @@ -576,7 +576,7 @@ echo $this->table([ [ '3', ['data' => 'Larry the Bird', 'active' => true, 'attributes' => ['colspan' => 2]], - '@twitter' + '@twitter', ], ], ]); @@ -956,30 +956,30 @@ echo $this->table([ [ 'type' => \TwbsHelper\View\Helper\Table::TABLE_DATA, 'attributes' => ['scope' => null], - 'data' => 'This cell inherits vertical-align: middle; from the table' + 'data' => 'This cell inherits vertical-align: middle; from the table', ], 'This cell inherits vertical-align: middle; from the table', 'This cell inherits vertical-align: middle; from the table', 'This here is some placeholder text, intended to take up quite a bit of vertical space, ' . - 'to demonstrate how the vertical alignment works in the preceding cells.' + 'to demonstrate how the vertical alignment works in the preceding cells.', ], [ 'align' => 'bottom', [ 'type' => \TwbsHelper\View\Helper\Table::TABLE_DATA, 'attributes' => ['scope' => null], - 'data' => 'This cell inherits vertical-align: bottom; from the table row' + 'data' => 'This cell inherits vertical-align: bottom; from the table row', ], 'This cell inherits vertical-align: bottom; from the table row', 'This cell inherits vertical-align: bottom; from the table row', 'This here is some placeholder text, intended to take up quite a bit of vertical space, ' . - 'to demonstrate how the vertical alignment works in the preceding cells.' + 'to demonstrate how the vertical alignment works in the preceding cells.', ], [ [ 'type' => \TwbsHelper\View\Helper\Table::TABLE_DATA, 'attributes' => ['scope' => null], - 'data' => 'This cell inherits vertical-align: middle; from the table' + 'data' => 'This cell inherits vertical-align: middle; from the table', ], 'This cell inherits vertical-align: middle; from the table', [ @@ -987,7 +987,7 @@ echo $this->table([ 'data' => 'This cell is aligned to the top.', ], 'This here is some placeholder text, intended to take up quite a bit of vertical space, ' . - 'to demonstrate how the vertical alignment works in the preceding cells.' + 'to demonstrate how the vertical alignment works in the preceding cells.', ], ], ]); @@ -1079,7 +1079,7 @@ echo $this->table([ ['C', 'First', 'Last'], ], ], - 'attributes' => ['colspan' => 4] + 'attributes' => ['colspan' => 4], ]], ['3', 'Larry', 'the Bird', '@twitter'], ], diff --git a/website/docs/usage/forms/checks-and-radios.mdx b/website/docs/usage/forms/checks-and-radios.mdx index becf511c..2024bf1d 100644 --- a/website/docs/usage/forms/checks-and-radios.mdx +++ b/website/docs/usage/forms/checks-and-radios.mdx @@ -689,7 +689,7 @@ echo $this->formRow($factory->create([ 'attributes' => [ 'id' => 'btn-check-2', 'autocomplete' => 'off', - 'checked' => true + 'checked' => true, ], ])); @@ -707,7 +707,7 @@ echo $this->formRow($factory->create([ 'attributes' => [ 'id' => 'btn-check-3', 'autocomplete' => 'off', - 'disabled' => true + 'disabled' => true, ], ])); @@ -849,7 +849,7 @@ echo $this->formRow($factory->create([ 'attributes' => [ 'id' => 'btn-check-2-outlined', 'autocomplete' => 'off', - 'checked' => true + 'checked' => true, ], ])); diff --git a/website/docs/usage/forms/floating-labels.mdx b/website/docs/usage/forms/floating-labels.mdx index 7a9b00a6..ca9ed0a6 100644 --- a/website/docs/usage/forms/floating-labels.mdx +++ b/website/docs/usage/forms/floating-labels.mdx @@ -27,13 +27,13 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; -
+
-
+
@@ -91,11 +91,11 @@ echo $this->form($factory->create([ 'type' => 'email', 'id' => 'floatingInputValue', 'placeholder' => 'name@example.com', - 'value' => 'test@example.com' + 'value' => 'test@example.com', ], - ] - ] - ] + ], + ], + ], ])); echo $this->form($factory->create([ @@ -114,11 +114,11 @@ echo $this->form($factory->create([ 'type' => 'email', 'id' => 'floatingInputInvalid', 'placeholder' => 'name@example.com', - 'value' => 'test@example.com' + 'value' => 'test@example.com', ], - ] - ] - ] + ], + ], + ], ])->setMessages(['invalidEmailWithValue' => ['']])); ``` @@ -243,7 +243,7 @@ echo $this->formRow($factory->create( -
+
diff --git a/website/docs/usage/forms/form-controls.mdx b/website/docs/usage/forms/form-controls.mdx index a43c1499..b4d6f083 100644 --- a/website/docs/usage/forms/form-controls.mdx +++ b/website/docs/usage/forms/form-controls.mdx @@ -19,7 +19,7 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; -
+
@@ -45,7 +45,7 @@ echo $this->form($factory->create([ 'spec' => [ 'name' => 'email', 'options' => [ - 'label' => 'Email address' + 'label' => 'Email address', ], 'attributes' => [ 'type' => 'email', @@ -58,7 +58,7 @@ echo $this->form($factory->create([ 'spec' => [ 'name' => 'textarea', 'options' => [ - 'label' => 'Example textarea' + 'label' => 'Example textarea', ], 'attributes' => [ 'type' => 'textarea', @@ -154,7 +154,7 @@ $element = $factory->create([ 'attributes' => [ 'disabled' => true, 'placeholder' => 'Disabled input', - 'aria-label' => 'Disabled input example' + 'aria-label' => 'Disabled input example', ], ]); echo $this->formElement($element); @@ -169,7 +169,7 @@ $element = $factory->create([ 'disabled' => true, 'readonly' => true, 'value' => 'Disabled readonly input', - 'aria-label' => 'Disabled input example' + 'aria-label' => 'Disabled input example', ], ]); echo $this->formElement($element); @@ -201,7 +201,7 @@ $element = $factory->create([ 'attributes' => [ 'readonly' => true, 'value' => 'Readonly input here...', - 'aria-label' => 'readonly input example' + 'aria-label' => 'readonly input example', ], ]); echo $this->formElement($element); @@ -217,7 +217,7 @@ echo $this->formElement($element); -
+
@@ -232,7 +232,7 @@ echo $this->formElement($element);

-
+
@@ -351,7 +351,7 @@ echo $this->form($factory->create([ -
+
diff --git a/website/docs/usage/forms/input-group.mdx b/website/docs/usage/forms/input-group.mdx index 5b322d25..816d9259 100644 --- a/website/docs/usage/forms/input-group.mdx +++ b/website/docs/usage/forms/input-group.mdx @@ -132,7 +132,7 @@ echo $this->formRow($factory->create([ 'aria-label' => "Server", ], ], - ] + ], ], ], 'attributes' => [ @@ -388,8 +388,8 @@ echo $this->formRow($factory->create([ 'attributes' => [ 'aria-label' => 'First name', ], - ] - ] + ], + ], ], 'attributes' => [ 'aria-label' => 'Last name', diff --git a/website/docs/usage/forms/layout.mdx b/website/docs/usage/forms/layout.mdx index 79c56bb9..3791c17c 100644 --- a/website/docs/usage/forms/layout.mdx +++ b/website/docs/usage/forms/layout.mdx @@ -19,7 +19,7 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; -
+
@@ -45,7 +45,7 @@ echo $this->form($factory->create([ 'spec' => [ 'name' => 'exampleLabel', 'options' => [ - 'label' => 'Example label' + 'label' => 'Example label', ], 'attributes' => [ 'id' => 'formGroupExampleInput', @@ -57,7 +57,7 @@ echo $this->form($factory->create([ 'spec' => [ 'name' => 'anotherLabel', 'options' => [ - 'label' => 'Another label' + 'label' => 'Another label', ], 'attributes' => [ 'id' => 'formGroupExampleInput2', @@ -79,7 +79,7 @@ echo $this->form($factory->create([ -
+
@@ -139,7 +139,7 @@ echo $this->form($factory->create([ -
+
@@ -149,7 +149,7 @@ echo $this->form($factory->create([
-
+
@@ -247,11 +247,11 @@ echo $this->form($factory->create([ 'name' => 'email', 'options' => [ 'column' => 'md-6', - 'label' => 'Email' + 'label' => 'Email', ], 'attributes' => [ 'type' => 'email', - 'id' => 'inputEmail4' + 'id' => 'inputEmail4', ], ], ], @@ -260,11 +260,11 @@ echo $this->form($factory->create([ 'name' => 'password', 'options' => [ 'column' => 'md-6', - 'label' => 'Password' + 'label' => 'Password', ], 'attributes' => [ 'type' => 'password', - 'id' => 'inputPassword4' + 'id' => 'inputPassword4', ], ], ], @@ -273,12 +273,12 @@ echo $this->form($factory->create([ 'name' => 'address1', 'options' => [ 'column' => 12, - 'label' => 'Address' + 'label' => 'Address', ], 'attributes' => [ 'type' => 'text', 'placeholder' => '1234 Main St', - 'id' => 'inputAddress' + 'id' => 'inputAddress', ], ], ], @@ -287,12 +287,12 @@ echo $this->form($factory->create([ 'name' => 'address2', 'options' => [ 'column' => 12, - 'label' => 'Address 2' + 'label' => 'Address 2', ], 'attributes' => [ 'type' => 'text', 'placeholder' => 'Apartment, studio, or floor', - 'id' => 'inputAddress2' + 'id' => 'inputAddress2', ], ], ], @@ -301,11 +301,11 @@ echo $this->form($factory->create([ 'name' => 'city', 'options' => [ 'column' => 'md-6', - 'label' => 'City' + 'label' => 'City', ], 'attributes' => [ 'type' => 'text', - 'id' => 'inputCity' + 'id' => 'inputCity', ], ], ], @@ -317,7 +317,7 @@ echo $this->form($factory->create([ 'column' => 'md-4', 'label' => 'State', 'empty_option' => 'Choose...', - 'value_options' => ['...'] + 'value_options' => ['...'], ], 'attributes' => [ 'id' => 'inputState', @@ -330,11 +330,11 @@ echo $this->form($factory->create([ 'name' => 'zip', 'options' => [ 'column' => 'md-2', - 'label' => 'Zip' + 'label' => 'Zip', ], 'attributes' => [ 'type' => 'text', - 'id' => 'inputZip' + 'id' => 'inputZip', ], ], ], @@ -376,7 +376,7 @@ echo $this->form($factory->create([ -
+
@@ -516,7 +516,7 @@ echo $this->form($factory->create([ ], ], ], - ] + ], ])); ``` @@ -530,7 +530,7 @@ echo $this->form($factory->create([ -
+
@@ -621,7 +621,7 @@ echo $this->form($factory->create([ -
+
@@ -688,7 +688,7 @@ echo $this->form($factory->create([ ], ], ], - ] + ], ])); ``` @@ -702,7 +702,7 @@ echo $this->form($factory->create([ -
+
@@ -736,7 +736,7 @@ echo $this->form($factory->create([

-
+
@@ -834,7 +834,7 @@ echo $this->form($factory->create([ 'id' => 'autoSizingSelect', 'value' => '', ], - ] + ], ], [ 'spec' => [ @@ -922,7 +922,7 @@ echo $this->form($factory->create([ 'id' => 'specificSizeSelect', 'value' => '', ], - ] + ], ], [ 'spec' => [ @@ -962,7 +962,7 @@ echo $this->form($factory->create([ -
+
@@ -1041,7 +1041,7 @@ echo $this->form($factory->create([ 'id' => 'inlineFormSelectPref', 'value' => '', ], - ] + ], ], [ 'spec' => [ diff --git a/website/docs/usage/forms/overview.mdx b/website/docs/usage/forms/overview.mdx index 0a517941..37e6bbe3 100644 --- a/website/docs/usage/forms/overview.mdx +++ b/website/docs/usage/forms/overview.mdx @@ -19,7 +19,7 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; -
+
@@ -59,7 +59,7 @@ echo $this->form($factory->create([ 'help_block' => [ 'content' => 'We\'ll never share your email with anyone else.', 'attributes' => ['id' => 'emailHelp'], - ] + ], ], 'attributes' => [ 'type' => 'email', @@ -93,7 +93,7 @@ echo $this->form($factory->create([ 'options' => ['label' => 'Submit', 'variant' => 'primary'], ], ], - ] + ], ])); ``` @@ -113,7 +113,7 @@ echo $this->form($factory->create([ Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.

- +
@@ -142,7 +142,7 @@ echo $this->formRow($factory->create([ 'content' => 'Your password must be 8-20 characters long, contain letters and numbers, ' . 'and must not contain spaces, special characters, or emoji.', 'attributes' => ['id' => 'passwordHelpBlock'], - ] + ], ], 'attributes' => [ 'id' => 'inputPassword5', @@ -161,7 +161,7 @@ echo $this->form($factory->create([ 'layout' => \TwbsHelper\Form\View\Helper\Form::LAYOUT_INLINE, ], 'attributes' => [ - 'class' => 'g-3' + 'class' => 'g-3', ], 'elements' => [ [ @@ -194,7 +194,7 @@ echo $this->form($factory->create([ -
+
Disabled fieldset example
@@ -231,6 +231,7 @@ echo $this->form($factory->create([ 'type' => 'fieldset', 'options' => [ 'label' => 'Disabled fieldset example', + 'disabled' => true, ], 'attributes' => [ 'disabled' => true, @@ -264,7 +265,7 @@ echo $this->form($factory->create([ 'name' => 'disabled-fieldset-check', 'options' => [ 'label' => 'Can\'t check this', - 'use_hidden_element' => false + 'use_hidden_element' => false, ], 'attributes' => [ 'id' => 'disabledFieldsetCheck', diff --git a/website/docs/usage/forms/range.mdx b/website/docs/usage/forms/range.mdx index e027230c..bcfd4a67 100644 --- a/website/docs/usage/forms/range.mdx +++ b/website/docs/usage/forms/range.mdx @@ -35,7 +35,7 @@ $factory = new \Laminas\Form\Factory(); echo $this->formRow($factory->create([ 'name' => 'range', 'options' => [ - 'label' => 'Example Range' + 'label' => 'Example Range', ], 'attributes' => [ 'type' => 'range', @@ -70,12 +70,12 @@ $factory = new \Laminas\Form\Factory(); echo $this->formRow($factory->create([ 'name' => 'range', 'options' => [ - 'label' => 'Disabled range' + 'label' => 'Disabled range', ], 'attributes' => [ 'type' => 'range', 'id' => 'disabledRange', - 'disabled' => true + 'disabled' => true, ], ])); ``` @@ -106,13 +106,13 @@ $factory = new \Laminas\Form\Factory(); echo $this->formRow($factory->create([ 'name' => 'range', 'options' => [ - 'label' => 'Example Range' + 'label' => 'Example Range', ], 'attributes' => [ 'type' => 'range', 'id' => 'customRange2', 'min' => 0, - 'max' => 5 + 'max' => 5, ], ])); ``` @@ -143,14 +143,14 @@ $factory = new \Laminas\Form\Factory(); echo $this->formRow($factory->create([ 'name' => 'range', 'options' => [ - 'label' => 'Example Range' + 'label' => 'Example Range', ], 'attributes' => [ 'type' => 'range', 'id' => 'customRange3', 'min' => 0, 'max' => 5, - 'step' => 0.5 + 'step' => 0.5, ], ])); ``` diff --git a/website/docs/usage/forms/validation.mdx b/website/docs/usage/forms/validation.mdx index 1deb3413..f77eac1d 100644 --- a/website/docs/usage/forms/validation.mdx +++ b/website/docs/usage/forms/validation.mdx @@ -19,7 +19,7 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx"; -
+
@@ -143,7 +143,7 @@ echo $this->form($factory->create([ 'name' => 'city', 'options' => [ 'column' => 'md-6', - 'label' => 'City' + 'label' => 'City', ], 'attributes' => [ 'type' => 'text', @@ -174,7 +174,7 @@ echo $this->form($factory->create([ 'name' => 'zip', 'options' => [ 'column' => 'md-3', - 'label' => 'Zip' + 'label' => 'Zip', ], 'attributes' => [ 'type' => 'text', @@ -228,7 +228,7 @@ echo $this->form($factory->create([ -
+
@@ -338,7 +338,7 @@ echo $this->form($factory->create([ 'name' => 'city', 'options' => [ 'column' => 'md-6', - 'label' => 'City' + 'label' => 'City', ], 'attributes' => [ 'type' => 'text', @@ -369,7 +369,7 @@ echo $this->form($factory->create([ 'name' => 'zip', 'options' => [ 'column' => 'md-3', - 'label' => 'Zip' + 'label' => 'Zip', ], 'attributes' => [ 'type' => 'text', @@ -417,7 +417,7 @@ echo $this->form($factory->create([ -
+
@@ -540,7 +540,7 @@ echo $this->form($factory->create([ 'name' => 'city', 'options' => [ 'column' => 'md-6', - 'label' => 'City' + 'label' => 'City', ], 'attributes' => [ 'type' => 'text', @@ -571,7 +571,7 @@ echo $this->form($factory->create([ 'name' => 'zip', 'options' => [ 'column' => 'md-3', - 'label' => 'Zip' + 'label' => 'Zip', ], 'attributes' => [ 'type' => 'text', @@ -625,7 +625,7 @@ echo $this->form($factory->create([ -
+
@@ -785,7 +785,7 @@ echo $this->form($factory->create([ -
+
@@ -903,7 +903,7 @@ echo $this->form($factory->create([ 'name' => 'city', 'options' => [ 'column' => 'md-6', - 'label' => 'City' + 'label' => 'City', ], 'attributes' => [ 'type' => 'text', @@ -934,7 +934,7 @@ echo $this->form($factory->create([ 'name' => 'zip', 'options' => [ 'column' => 'md-3', - 'label' => 'Zip' + 'label' => 'Zip', ], 'attributes' => [ 'type' => 'text', diff --git a/website/docs/usage/layout/columns.mdx b/website/docs/usage/layout/columns.mdx index fe6ec789..292273fc 100644 --- a/website/docs/usage/layout/columns.mdx +++ b/website/docs/usage/layout/columns.mdx @@ -338,7 +338,7 @@ echo $this->grid([ ['.col-6 .col-sm-4'], ['.col-6 .col-sm-4'], ], - ['column' => [6, 'sm-4']] + ['column' => [6, 'sm-4']], ], ]); ``` diff --git a/website/src/pages/index.mdx b/website/src/pages/index.mdx index 3ddf2a09..619cbd5f 100644 --- a/website/src/pages/index.mdx +++ b/website/src/pages/index.mdx @@ -14,7 +14,7 @@ title: Home [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) [![Sponsor](https://img.shields.io/badge/%E2%9D%A4-Sponsor-ff69b4)](https://github.com/sponsors/neilime) -📢 **TwbsHelper** is a Laminas (formerly Zend Framework) module for easy integration of the [Twitter Bootstrap v5+](https://getbootstrap.com/). +📢 **TwbsHelper** is a [Laminas](https://getlaminas.org/) (formerly Zend Framework) module for easy integration of the [Twitter Bootstrap v5+](https://getbootstrap.com/). ## Helping Project @@ -32,6 +32,8 @@ title: Home ### [Installation](https://neilime.github.io/twbs-helper-module/docs/installation/) +### [Configuration](https://neilime.github.io/twbs-helper-module/docs/configuration/) + ### [Usage](https://neilime.github.io/twbs-helper-module/docs/usage/intro/) ### [Code coverage](https://codecov.io/gh/neilime/twbs-helper-module)