Changeset 489 for branches/htmlform
- Timestamp:
- 09/23/10 18:45:58 (14 years ago)
- Location:
- branches/htmlform
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/admin.cgi
r488 r489 124 124 125 125 ## Non-default actions. 126 126 127 elsif ($webvar{action} eq 'alloc') { 127 # OK, we know what we're allocating.128 128 129 129 if ($webvar{cidr} !~ /^\s*(\d{1,3}\.){3}\d{1,3}(\/\d{2})?\s*$/) { … … 142 142 my $status = CustIDCK->custid_exist($webvar{custid}); 143 143 if ($CustIDCK::Error) { 144 printError("Error verifying customer ID: ".$CustIDCK::ErrMsg);145 return;144 $page->param(errmsg => "Error verifying customer ID: ".$CustIDCK::ErrMsg); 145 goto ERRJUMP; 146 146 } 147 147 if (!$status) { 148 printError("Customer ID not valid. Make sure the Customer ID ".148 $page->param(errmsg => "Customer ID not valid. Make sure the Customer ID ". 149 149 "is correct.<br>\nUse STAFF for staff static IPs, and $IPDB::defcustid for any other ". 150 150 "non-customer assignments."); 151 return;151 goto ERRJUMP; 152 152 } 153 153 } … … 208 208 # Only need to check city here. 209 209 if ($webvar{city} eq '-') { 210 printError("Invalid customer location! Go back and select customer's location."); 210 $page->param(locerr => "Invalid customer location! Go back and select customer's location."); 211 goto ERRJUMP; 211 212 } else { 212 213 if ($webvar{alloctype} =~ /^.i$/) { … … 497 498 } 498 499 499 print "Content-type: text/html\n\n".$header->output;500 ERRJUMP: print "Content-type: text/html\n\n".$header->output; 500 501 print $page->output; 501 502 -
branches/htmlform/templates/admin/alloc.tmpl
r487 r489 1 <TMPL_IF errmsg> 2 <TMPL_VAR NAME=errmsg> 3 <TMPL_ELSE> 1 4 <form method="POST" action="admin.cgi"> 2 5 <fieldset><legend></legend> … … 45 48 <input type="hidden" name="action" value="confirm"> 46 49 </fieldset></form> 47 50 </TMPL_IF> -
branches/htmlform/templates/admin/confirm.tmpl
r487 r489 1 <TMPL_IF locerr> 2 <TMPL_VAR NAME=locerr> 3 <TMPL_ELSE> 1 4 Assigning <TMPL_VAR NAME=cidr> to <TMPL_VAR NAME=custid> ("<TMPL_VAR NAME=desc>") as 2 5 <TMPL_VAR NAME=disptype>...<br> … … 6 9 Allocation OK! 7 10 </TMPL_IF> 11 </TMPL_IF>
Note:
See TracChangeset
for help on using the changeset viewer.