Skip to content

Commit

Permalink
no need for separate examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 15, 2015
1 parent a244d56 commit 9448d4c
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -256,15 +256,13 @@ L<Mojolicious::Plugin::TagHelpers> implements the following helpers.
=head2 check_box
%= check_box employed => 1
%= check_box employed => 1, disabled => 'disabled'
%= check_box employed => 1, checked => undef
%= check_box employed => 1, checked => undef, id => 'foo'
Generate C<input> tag of type C<checkbox>. Previous input values will
automatically get picked up and shown as default.
<input name="employed" type="checkbox" value="1">
<input disabled="disabled" name="employed" type="checkbox" value="1">
<input checked name="employed" type="checkbox" value="1">
<input checked id="foo" name="employed" type="checkbox" value="1">
=head2 color_field
Expand Down Expand Up @@ -519,14 +517,12 @@ Generate C<input> tag of type C<password>.
=head2 radio_button
%= radio_button country => 'germany'
%= radio_button country => 'germany', id => 'foo'
%= radio_button country => 'germany', checked => undef
%= radio_button country => 'germany', checked => undef, id => 'foo'
Generate C<input> tag of type C<radio>. Previous input values will
automatically get picked up and shown as default.
<input name="country" type="radio" value="germany">
<input id="foo" name="country" type="radio" value="germany">
<input checked id="foo" name="country" type="radio" value="germany">
=head2 range_field
Expand Down Expand Up @@ -559,8 +555,7 @@ automatically get picked up and shown as default.
%= select_field country => [qw(de en)]
%= select_field country => [[Germany => 'de'], 'en'], id => 'eu'
%= select_field country => [[Germany => 'de', disabled => 'disabled'], 'en']
%= select_field country => [[Germany => 'de', selected => undef], 'en']
%= select_field country => [[Germany => 'de', selected => 'selected'], 'en']
%= select_field country => [c(EU => [[Germany => 'de'], 'en'], id => 'eu')]
%= select_field country => [c(EU => [qw(de en)]), c(Asia => [qw(cn jp)])]
Expand All @@ -577,11 +572,7 @@ get picked up and shown as default.
<option value="en">en</option>
</select>
<select name="country">
<option disabled="disabled" value="de">Germany</option>
<option value="en">en</option>
</select>
<select name="country">
<option selected value="de">Germany</option>
<option selected="selected" value="de">Germany</option>
<option value="en">en</option>
</select>
<select name="country">
Expand Down

0 comments on commit 9448d4c

Please sign in to comment.