Created
December 14, 2012 15:53
-
-
Save moltar/4286404 to your computer and use it in GitHub Desktop.
Bootstrap inline help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package SW::Web::Form::Component::InlineHelp; | |
use warnings; | |
use strict; | |
use HTML::FormHandler::Moose::Role; | |
=head2 inline_help | |
Inline help for a field. | |
=cut | |
has inline_help => ( | |
is => 'ro', | |
isa => 'Str', | |
); | |
before wrap_field => sub { | |
my $self = shift; | |
$self->set_tag('after_element', | |
' <span class="help-inline help">' | |
. $self->html_filter($self->_localize(($self->inline_help))) | |
. '</span>'); | |
}; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment