- Timestamp:
- 11/01/16 15:10:39 (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r889 r892 508 508 my $pinfo = getBlockData($ip_dbh, $webvar{parent}); 509 509 510 my @cities; 511 foreach my $city (@citylist) { 512 my %row = (city => $city, sel => ($pinfo->{city} eq $city) ); 513 push (@cities, \%row); 514 } 515 $page->param(preselected => 1); 516 $page->param(citylist => \@cities); 517 510 518 # Tree navigation 511 519 my $crumbs = getBreadCrumbs($ip_dbh, $webvar{parent}); … … 543 551 $page->param(pops => \@pops); 544 552 553 my @cities; 554 foreach my $city (@citylist) { 555 my %row = (city => $city); 556 push (@cities, \%row); 557 } 558 $page->param(citylist => \@cities); 559 545 560 # get all standard alloctypes 546 561 my $tlist = getTypeList($ip_dbh, 'a'); … … 548 563 $page->param(typelist => $tlist); 549 564 } 550 551 my @cities;552 foreach my $city (@citylist) {553 my %row = (city => $city);554 push (@cities, \%row);555 }556 $page->param(citylist => \@cities);557 565 558 566 ## node hack -
trunk/templates/assign.tmpl
r878 r892 42 42 <td> 43 43 <select name="city"> 44 <TMPL_IF preselected> 45 <TMPL_LOOP NAME=citylist> 46 <option<TMPL_IF sel> selected</TMPL_IF>><TMPL_VAR NAME=city></option></TMPL_LOOP> 47 <TMPL_ELSE> 44 48 <option selected="selected">-</option> 45 49 <TMPL_LOOP NAME=citylist> 46 50 <option><TMPL_VAR NAME=city></option></TMPL_LOOP> 51 </TMPL_IF> 47 52 </select> 48 53 <a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newcity.cgi')">Add new location</a>
Note:
See TracChangeset
for help on using the changeset viewer.