/[wopi]/make_poll.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /make_poll.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by dpavlin, Sat Oct 11 11:40:36 2003 UTC revision 1.11 by dpavlin, Sat Oct 11 12:07:54 2003 UTC
# Line 607  sub dropdown { Line 607  sub dropdown {
607          $$ncref = sub {          $$ncref = sub {
608                  my ($xp, $text) = @_;                  my ($xp, $text) = @_;
609    
610            my $default_value = x($attref->{default_value}) || 'null';
611            my $default_text = x($attref->{default_text}) || '-';
612                  if (defined $text) {                  if (defined $text) {
613                          chomp $text;                          chomp $text;
614                          $text=~s/^\s*//g;                          $text=~s/^\s*//g;
# Line 618  sub dropdown { Line 620  sub dropdown {
620                          my $id=1;                          my $id=1;
621                          my $p=new_pit();                          my $p=new_pit();
622                          $body.="<select name=$p >\n";                          $body.="<select name=$p >\n";
623                          $body.="<option value=null>-</option>\n";                          $body.="<option value=\"$default_value\">$default_text<option>\n";
624                          foreach $opt (@dropdown_data) {                          foreach $opt (@dropdown_data) {
625                                  if (defined($opt) && $opt ne "") {                                  if (defined($opt) && $opt ne "") {
626                                          $body.="<option value=$id>$opt</option>\n";                                          $body.="<option value=$id>$opt</option>\n";

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26