Raw content of EnsEMBL::Web::Form::Element::AltCheckBoxpackage EnsEMBL::Web::Form::Element::AltCheckBox;
### Alternative checkbox rendering, for healthcheck config form
use strict;
use base qw( EnsEMBL::Web::Form::Element );
use CGI qw(escapeHTML);
sub new {
my $class = shift;
my %params = @_;
my $self = $class->SUPER::new( %params );
$self->checked = $params{'checked'};
if ($params{'long_label'}) {
$self->add_class('checkbox-long');
}
return $self;
}
sub checked :lvalue { $_[0]->{'checked'}; }
sub disabled :lvalue { $_[0]->{'disabled'}; }
sub render {
my $self = shift;
return sprintf(
qq(