Permalink
Browse files

use 'controls_div' name instead of 'control_div'

  • Loading branch information...
1 parent 5fa7391 commit 733228abca948bbdaa3d7f48b6c78c05cb78b67e @gshank committed Feb 11, 2013
@@ -130,7 +130,7 @@ This might be useful if the form is being re-presented to the user.
Saves information in the form for javascript to use when adding repeatable elements.
If using the example javascript, you also must set 'do_wrapper' in the
Repeatable field and use the Bootstrap widget wrapper (or wrap the repeatable
-elements in a 'controls' div by setting tags => { control_div => 1 }.
+elements in a 'controls' div by setting tags => { controls_div => 1 }.
See t/repeatable/js.t for an example. See also
L<HTML::FormHandler::Render::RepeatableJs> and L<HTML::FormHandler::Field::AddElement>.
@@ -26,7 +26,7 @@ This function uses a plain javascript confirmation dialog.
You almost certainly want to do something else.
This javascript depends on the Repeatable field having a 'controls' div class
in order to position the new elements. Use the Bootstrap wrapper or the
-'control_div' tag on the Simple wrapper.
+'controls_div' tag on the Simple wrapper.
A role to be used in a Form Class:
@@ -71,11 +71,11 @@ sub wrap_field {
# append 'before_element'
$output .= $self->get_tag('before_element');
# start control div
- $output .= qq{\n<div class="controls">} if $self->get_tag('control_div');
+ $output .= qq{\n<div class="controls">} if $self->get_tag('controls_div');
# the input element itself
$output .= "\n$rendered_widget";
# end control div
- $output .= "\n</div>" if $self->get_tag('control_div');
+ $output .= "\n</div>" if $self->get_tag('controls_div');
# the 'after_element'
$output .= $self->get_tag('after_element');
# the error messages
View
@@ -18,7 +18,7 @@ use HTML::FormHandler::Test;
type => 'Repeatable',
setup_for_js => 1,
do_wrapper => 1,
- tags => { control_div => 1 },
+ tags => { controls_div => 1 },
);
# The 'remove' doesn't have to be a display field. It could be other html associated

0 comments on commit 733228a

Please sign in to comment.