4 #if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
5 # $cgi->param('clone', $1);
7 # $cgi->param('clone', '');
9 #if ( $cgi->param('svcpart') && $cgi->param('svcpart') =~ /^(\d+)$/ ) {
10 # $cgi->param('svcpart', $1);
12 # $cgi->param('svcpart', '');
15 my($query) = $cgi->keywords;
19 if ( $cgi->param('error') ) {
20 $part_export = new FS::part_export ( {
21 map { $_, scalar($cgi->param($_)) } fields('part_export')
26 if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
28 my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } );
29 unless ( $part_export ) {
30 ($part_export, $options) = $old_part_export->clone;
32 } elsif ( $cgi->param('new_with_svcpart')
33 && $cgi->param('new_with_svcpart') =~ /^(\d+)$/ ) {
34 $part_export ||= new FS::part_export ( { 'svcpart' => $1 } );
35 } elsif ( $query =~ /^(\d+)$/ ) {
36 $part_export ||= qsearchs('part_export', { 'exportnum' => $1 } );
38 $action ||= $part_export->exportnum ? 'Edit' : 'Add';
40 my @types = qw(shell bsdshell textradius sqlradius cp);
43 <%= header("$action Export", menubar(
44 'Main Menu' => popurl(2),
45 ), ' onLoad="visualize()"')
48 <% if ( $cgi->param('error') ) { %>
49 <FONT SIZE="+1" COLOR="#ff0000">Error: <%= $cgi->param('error') %></FONT>
52 <FORM ACTION="<%= popurl(1) %>process/part_export.cgi" METHOD=POST>
53 <% #print '<FORM NAME="dummy">'; %>
55 <%= ntable("#cccccc",2) %>
57 <TD ALIGN="right">Service</TD>
58 <TD BGCOLOR="#ffffff">
59 <%= $part_export->svcpart %> - <%= $part_export->part_svc->svc %>
63 <TD ALIGN="right">Export</TD>
64 <TD><SELECT NAME="exporttype"><OPTION></OPTION>
65 <% foreach my $type ( @types ) { %>
66 <OPTION><%= $type %></OPTION>
71 <TD ALIGN="right">Export host</TD>
73 <INPUT TYPE="text" NAME="machine" VALUE="<%= $part_export->machine %>">