/[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.12 by dpavlin, Sat Oct 11 15:47:33 2003 UTC
# Line 604  sub dropdown { Line 604  sub dropdown {
604    
605          my @dropdown_data;          my @dropdown_data;
606    
607            my $default_value = x($attref->{default_value}) || 'null';
608            my $default_text = x($attref->{default_text}) || '-';
609    
610          $$ncref = sub {          $$ncref = sub {
611                  my ($xp, $text) = @_;                  my ($xp, $text) = @_;
612    
# Line 618  sub dropdown { Line 621  sub dropdown {
621                          my $id=1;                          my $id=1;
622                          my $p=new_pit();                          my $p=new_pit();
623                          $body.="<select name=$p >\n";                          $body.="<select name=$p >\n";
624                          $body.="<option value=null>-</option>\n";                          $body.="<option value=\"$default_value\">$default_text</option>\n";
625                          foreach $opt (@dropdown_data) {                          foreach $opt (@dropdown_data) {
626                                  if (defined($opt) && $opt ne "") {                                  if (defined($opt) && $opt ne "") {
627                                          $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.12

  ViewVC Help
Powered by ViewVC 1.1.26