1 <% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %>
3 <% include('/elements/error.html') %>
5 <FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
6 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
10 % if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
13 <INPUT TYPE="text" NAME="num" VALUE="<% $num %>" SIZE=5 MAXLENGTH=4>
14 registration codes for <B><% $agent->agent %></B> allowing the following packages:
17 % foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
18 % my $pkgpart = $part_pkg->pkgpart;
20 <INPUT TYPE="checkbox" NAME="pkgpart<% $pkgpart %>" <% $cgi->param("pkgpart$pkgpart") ? 'CHECKED' : '' %>>
21 <% $part_pkg->pkg_comment %>
28 <INPUT TYPE="submit" NAME="submit" VALUE="Generate">
32 <% include('/elements/footer.html') %>
37 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
39 my $agentnum = $cgi->param('agentnum');
40 $agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
42 my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );