Index: branches/htmlform/cgi-bin/main.cgi
===================================================================
--- branches/htmlform/cgi-bin/main.cgi	(revision 473)
+++ branches/htmlform/cgi-bin/main.cgi	(revision 474)
@@ -1160,10 +1160,4 @@
   }
 
-  #show confirm screen.
-  open HTML, "../confirmRemove.html"
-	or croak "Could not open confirmRemove.html :$!";
-  my $html = join('', <HTML>);
-  close HTML;
-
   # Serves'em right for getting here...
   if (!defined($webvar{block})) {
@@ -1189,6 +1183,8 @@
     $desc = "N/A";
     $notes = "N/A";
+    $privdata = "N/A";
 
   } elsif ($webvar{alloctype} eq 'mm') {
+
     $cidr = $webvar{block};
     $city = "N/A";
@@ -1198,4 +1194,6 @@
     $desc = "N/A";
     $notes = "N/A";
+    $privdata = "N/A";
+
   } elsif ($webvar{alloctype} =~ /^.i$/) { # done with alloctype=[rm]m
 
@@ -1222,38 +1220,17 @@
   } # end cases for different alloctypes
 
-  # Munge everything into HTML
-  $html =~ s|Please confirm|Please confirm <b>removal</b> of|;
-  $html =~ s|\$\$BLOCK\$\$|$cidr|g;
-  $html =~ s|\$\$TYPEFULL\$\$|$disp_alloctypes{$alloctype}|g;
-  $html =~ s|\$\$ALLOCTYPE\$\$|$alloctype|g;
-  $html =~ s|\$\$CITY\$\$|$city|g;
-  $html =~ s|\$\$CUSTID\$\$|$custid|g;
-  $html =~ s|\$\$CIRCID\$\$|$circid|g;
-  $html =~ s|\$\$DESC\$\$|$desc|g;
-  $html =~ s|\$\$NOTES\$\$|$notes|g;
-
-  $html =~ s|\$\$ACTION\$\$|finaldelete|g;
-
-  # Set the warning text.
-  if ($alloctype =~ /^.[pd]$/) {
-    $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>|;
-  } else {
-    $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.</div></td></tr>|;
-  }
-
-  my $i = 1;
-  # Check to see if user is allowed to do anything with sensitive data
-  if ($IPDBacl{$authuser} =~ /s/) {
-    $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>).
-	qq(<td class=regular>$privdata</td></tr>\n);
-    $i++;
-  }
-  $html =~ s/\$\$PRIVDATA\$\$/$privdata/g;
-
-  $i = ++$i % 2;
-  $html =~ s/\$\$BUTTONROWCOLOUR\$\$/color$i/;
-
-  print $html;
-} # end edit()
+  $page->param(block => $cidr);
+  $page->param(disptype => $disp_alloctypes{$alloctype});
+  $page->param(type => $alloctype);
+  $page->param(city => $city);
+  $page->param(custid => $custid);
+  $page->param(circid => $circid);
+  $page->param(desc => $desc);
+  $page->param(notes => $notes);
+  $privdata = '&nbsp;' if $privdata eq '';
+  $page->param(privdata => $privdata) if $IPDBacl{$authuser} =~ /s/;
+  $page->param(delpool => $alloctype =~ /^.[pd]$/);
+
+} # end remove()
 
 
Index: branches/htmlform/templates/delete.tmpl
===================================================================
--- branches/htmlform/templates/delete.tmpl	(revision 474)
+++ branches/htmlform/templates/delete.tmpl	(revision 474)
@@ -0,0 +1,69 @@
+<div class="heading">Please confirm removal of:</div>
+<br>
+
+<table class="indent" cellspacing="1" cellpadding="1">
+
+<tr class="row0">
+<td>IP block:</td>
+<td><TMPL_VAR NAME=block></td>
+</tr>
+
+<tr class="row1">
+<td>City:</td>
+<td><TMPL_VAR NAME=city></td>
+</tr>
+
+<tr class="row0">
+<td>Type:</td>
+<td><TMPL_VAR NAME=disptype></td>
+</tr>
+
+<tr class="row1">
+<td>Customer ID:</td>
+<td><TMPL_VAR NAME=custid></td>
+</tr>
+
+<tr class="row0">
+<td>Circuit ID:</td>
+<td><TMPL_VAR NAME=circid></td>
+</tr>
+
+<tr class="row1">
+<td valign="top">Description/Name:</td>
+<td><TMPL_VAR NAME=desc></td>
+</tr>
+
+<tr class="row0">
+<td valign="top">Notes:</td>
+<td><TMPL_VAR NAME=notes></td>
+</tr>
+
+<TMPL_IF privdata>
+<tr class="row1">
+<td>Restricted data:</td>
+<td><TMPL_VAR NAME=privdata></td>
+</tr>
+</TMPL_IF>
+
+<tr class="warning">
+<td colspan="2">
+Warning: clicking confirm will remove this record entirely.
+<TMPL_IF delpool><br>Any IPs allocated from this pool will also be removed!</TMPL_IF>
+</td>
+</tr>
+
+<tr class="row<TMPL_IF privdata>0<TMPL_ELSE>1</TMPL_IF>">
+<td class="center" colspan="2">
+<form action="main.cgi" method="POST" class="regular">
+<fieldset><legend></legend>
+<input type="button" value="Back" onclick="history.go(-1)"><input type="submit" value="Confirm">
+<input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
+<input type="hidden" name="city" value="<TMPL_VAR NAME=city>">
+<input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
+<input type="hidden" name="action" value="finaldelete">
+</fieldset>
+</form>
+</td>
+</tr>
+
+</table>
Index: branches/htmlform/templates/showmaster.tmpl
===================================================================
--- branches/htmlform/templates/showmaster.tmpl	(revision 473)
+++ branches/htmlform/templates/showmaster.tmpl	(revision 474)
@@ -30,5 +30,5 @@
 <fieldset><legend></legend>
 <input type=hidden name=action value="delete">
-<input type=hidden name=block value="$master">
+<input type=hidden name=block value="<TMPL_VAR NAME=master>">
 <input type=hidden name=alloctype value="mm">
 <input type=submit value=" Remove this master ">
Index: branches/htmlform/templates/showrouted.tmpl
===================================================================
--- branches/htmlform/templates/showrouted.tmpl	(revision 473)
+++ branches/htmlform/templates/showrouted.tmpl	(revision 474)
@@ -67,4 +67,4 @@
 <br>
 <hr class="w30">
-<div class=heading>No unassigned blocks in routed block <TMPL_VAR NAME=master></div>
+<div class="tbltitle">No unassigned blocks in routed block <TMPL_VAR NAME=master></div>
 </TMPL_IF>
