blob: 76790ab02ce44c55d555208dce34704d154ccd8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %>
<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
Generate
% my $num = '';
% if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
% $num = $1;
% }
<INPUT TYPE="text" NAME="num" VALUE="<% $num %>" SIZE=5 MAXLENGTH=4>
registration codes for <B><% $agent->agent %></B> allowing the following packages:
<BR><BR>
% foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
% my $pkgpart = $part_pkg->pkgpart;
<INPUT TYPE="checkbox" NAME="pkgpart<% $pkgpart %>" <% $cgi->param("pkgpart$pkgpart") ? 'CHECKED' : '' %>>
<% $part_pkg->pkg_comment %>
<BR>
% }
<BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Generate">
</FORM>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $agentnum = $cgi->param('agentnum');
$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
$agentnum = $1;
my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
</%init>
|