Jifty::Web::Form::Field::Text - Renders as a small text field


Jifty documentation Contained in the Jifty distribution.

Index


Code Index:

NAME

Top

Jifty::Web::Form::Field::Text - Renders as a small text field

METHODS

Top

classes

Output text fields with the class 'text'

handler_allowed HANDLER_NAME

Returns 1 if the handler (e.g. onclick) is allowed. Undef otherwise.


Jifty documentation Contained in the Jifty distribution.
use warnings;
use strict;

package Jifty::Web::Form::Field::Text;
use base qw/Jifty::Web::Form::Field/;

our $VERSION = 1;

sub classes {
    my $self = shift;
    return join(' ', 'text', ($self->SUPER::classes));
}


sub handler_allowed {
    my $self = shift;
    my ($handler) = @_;

    return $self->SUPER::handler_allowed($handler) ||
           {onselect => 1}->{$handler};

}


1;