X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Freg_code.cgi;h=e8e08cd5c111553e3865c35a9276accfddb6d1ab;hb=8eb6542c022ac84b125416f3fb0828b278ba600a;hp=06bef487909bcd977975a0b8619314248662e93a;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/edit/reg_code.cgi b/httemplate/edit/reg_code.cgi index 06bef4879..e8e08cd5c 100644 --- a/httemplate/edit/reg_code.cgi +++ b/httemplate/edit/reg_code.cgi @@ -1,39 +1,44 @@ -% -%my $agentnum = $cgi->param('agentnum'); -%$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum"; -%$agentnum = $1; -%my $agent = qsearchs('agent', { 'agentnum' => $agentnum } ); -% -% - - -<% include("/elements/header.html",'Generate registration codes for '. $agent->agent, menubar( - 'Main Menu' => $p, - )) -%> -% if ( $cgi->param('error') ) { - - Error: <% $cgi->param('error') %> -% } +<% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %> +<% include('/elements/error.html') %> -
+ Generate - +% my $num = ''; +% if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) { +% $num = $1; +% } + registration codes for <% $agent->agent %> allowing the following packages:

+ % foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) { +% my $pkgpart = $part_pkg->pkgpart; + + param("pkgpart$pkgpart") ? 'CHECKED' : '' %>> + <% $part_pkg->pkg_comment %> +
- - <% $part_pkg->pkg %> - <% $part_pkg->comment %> -
% }
- + + +
+ +<% 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 } ); +