Changeset 474
- Timestamp:
- 08/17/10 17:42:26 (14 years ago)
- Location:
- branches/htmlform
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/main.cgi
r473 r474 1160 1160 } 1161 1161 1162 #show confirm screen.1163 open HTML, "../confirmRemove.html"1164 or croak "Could not open confirmRemove.html :$!";1165 my $html = join('', <HTML>);1166 close HTML;1167 1168 1162 # Serves'em right for getting here... 1169 1163 if (!defined($webvar{block})) { … … 1189 1183 $desc = "N/A"; 1190 1184 $notes = "N/A"; 1185 $privdata = "N/A"; 1191 1186 1192 1187 } elsif ($webvar{alloctype} eq 'mm') { 1188 1193 1189 $cidr = $webvar{block}; 1194 1190 $city = "N/A"; … … 1198 1194 $desc = "N/A"; 1199 1195 $notes = "N/A"; 1196 $privdata = "N/A"; 1197 1200 1198 } elsif ($webvar{alloctype} =~ /^.i$/) { # done with alloctype=[rm]m 1201 1199 … … 1222 1220 } # end cases for different alloctypes 1223 1221 1224 # Munge everything into HTML 1225 $html =~ s|Please confirm|Please confirm <b>removal</b> of|; 1226 $html =~ s|\$\$BLOCK\$\$|$cidr|g; 1227 $html =~ s|\$\$TYPEFULL\$\$|$disp_alloctypes{$alloctype}|g; 1228 $html =~ s|\$\$ALLOCTYPE\$\$|$alloctype|g; 1229 $html =~ s|\$\$CITY\$\$|$city|g; 1230 $html =~ s|\$\$CUSTID\$\$|$custid|g; 1231 $html =~ s|\$\$CIRCID\$\$|$circid|g; 1232 $html =~ s|\$\$DESC\$\$|$desc|g; 1233 $html =~ s|\$\$NOTES\$\$|$notes|g; 1234 1235 $html =~ s|\$\$ACTION\$\$|finaldelete|g; 1236 1237 # Set the warning text. 1238 if ($alloctype =~ /^.[pd]$/) { 1239 $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.<br>Any IPs allocated from this pool will also be removed!</div></td></tr>|; 1240 } else { 1241 $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.</div></td></tr>|; 1242 } 1243 1244 my $i = 1; 1245 # Check to see if user is allowed to do anything with sensitive data 1246 if ($IPDBacl{$authuser} =~ /s/) { 1247 $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>). 1248 qq(<td class=regular>$privdata</td></tr>\n); 1249 $i++; 1250 } 1251 $html =~ s/\$\$PRIVDATA\$\$/$privdata/g; 1252 1253 $i = ++$i % 2; 1254 $html =~ s/\$\$BUTTONROWCOLOUR\$\$/color$i/; 1255 1256 print $html; 1257 } # end edit() 1222 $page->param(block => $cidr); 1223 $page->param(disptype => $disp_alloctypes{$alloctype}); 1224 $page->param(type => $alloctype); 1225 $page->param(city => $city); 1226 $page->param(custid => $custid); 1227 $page->param(circid => $circid); 1228 $page->param(desc => $desc); 1229 $page->param(notes => $notes); 1230 $privdata = ' ' if $privdata eq ''; 1231 $page->param(privdata => $privdata) if $IPDBacl{$authuser} =~ /s/; 1232 $page->param(delpool => $alloctype =~ /^.[pd]$/); 1233 1234 } # end remove() 1258 1235 1259 1236 -
branches/htmlform/templates/showmaster.tmpl
r466 r474 30 30 <fieldset><legend></legend> 31 31 <input type=hidden name=action value="delete"> 32 <input type=hidden name=block value=" $master">32 <input type=hidden name=block value="<TMPL_VAR NAME=master>"> 33 33 <input type=hidden name=alloctype value="mm"> 34 34 <input type=submit value=" Remove this master "> -
branches/htmlform/templates/showrouted.tmpl
r467 r474 67 67 <br> 68 68 <hr class="w30"> 69 <div class= heading>No unassigned blocks in routed block <TMPL_VAR NAME=master></div>69 <div class="tbltitle">No unassigned blocks in routed block <TMPL_VAR NAME=master></div> 70 70 </TMPL_IF>
Note:
See TracChangeset
for help on using the changeset viewer.