EnsEMBL::Web::Form::Element AltCheckBox
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
CGI qw ( escapeHTML )
Inherit
EnsEMBL::Web::Form::Element
Synopsis
No synopsis!
Description
No description!
Methods
disabled
No description
Code
new
No description
Code
render
No description
Code
Methods description
None available.
Methods code
disableddescriptionprevnextTop
sub disabled {
:lvalue { $_[0]->{'disabled'};
}
newdescriptionprevnextTop
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;
}
renderdescriptionprevnextTop
sub render {
  my $self = shift;
  return sprintf(
    qq(
  <tr>
    <td%s>
      <label>%s</label>
    </th>
    <td%s>
      <input type="checkbox" name="%s" id="%s" value="%s" class="input-checkbox"%s%s/>%s
    </td>
  </tr>),
    $self->class_attrib,
    $self->{'raw'} ? $self->label : CGI::escapeHTML( $self->label ), 
    $self->class_attrib,
    CGI::escapeHTML( $self->name ), 
    CGI::escapeHTML( $self->id ),
    $self->value || 'yes',
    $self->checked ? ' checked="checked" ' : '',
    $self->disabled ? ' disabled="disabled" ' : '',
    $self->notes,
  );
}
General documentation
No general documentation available.