~ubuntu-branches/ubuntu/precise/libcgi-formbuilder-perl/precise

« back to all changes in this revision

Viewing changes to lib/CGI/FormBuilder/Field/radio.pm

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard
  • Date: 2011-09-11 02:55:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110911025517-nhr6j6fwwc9xc4l1
Tags: 3.06-1
* New upstream release.
* Use CDBS perl-makemaker.mk (not deprecated perlmodule.mk).
  Tighten build-dependency on CDBS.
* Update copyright file:
  + Fix use Comment field (not License-Comments).
  + Quote license names in comments.
* Add patch cherry-picked upstream to fix testsuite.
* Update package relations:
  + Build-depend on and suggest libcgi-ssi-perl.
  + Make suggestions unversioned and drop conflicts: satisfied even in
    oldstable.
  + Maintain all relations using CDBS in rules file.
* Stop preserving cruft no long shipped upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
###########################################################################
3
 
# Copyright (c) 2000-2006 Nate Wiger <nate@wiger.org>. All Rights Reserved.
4
 
# Please visit www.formbuilder.org for tutorials, support, and examples.
 
3
# Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved.
 
4
# Please visit http://formbuilder.org for tutorials, support, and examples.
5
5
###########################################################################
6
6
 
7
7
# The majority of this module's methods (including new) are
21
21
use base 'CGI::FormBuilder::Field';
22
22
 
23
23
our $REVISION = do { (my $r='$Revision: 100 $') =~ s/\D+//g; $r };
24
 
our $VERSION = '3.0501';
 
24
our $VERSION = '3.06';
25
25
 
26
26
sub script {
27
27
    my $self = shift;
75
75
    if (! selected_$jsfield) {
76
76
        alertstr += '$alertstr';
77
77
        invalid++;
 
78
        invalid_fields.push('$jsfield');
78
79
    }
79
80
EOJS
80
81
 
158
159
        }
159
160
 
160
161
        # Each radio/checkbox gets a human thingy with <label> around it
 
162
        $tag .= $self->add_before_option;
161
163
        $tag .= htmltag('input', $attr);
162
164
        $tag .= $checkbox_table
163
165
              ? (htmltag('/td')."\n    ".htmltag('td').$self->{_form}->font) : ' ';
165
167
        $tag .= htmltag('label', for => $attr->{id}, class => $c)
166
168
              . ($self->cleanopts ? escapehtml($n) : $n)
167
169
              . htmltag('/label');
 
170
        $tag .= $self->add_after_option;
168
171
 
169
172
        $tag .= '<br />' if $self->linebreaks;
170
173