summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r--httemplate/edit/process/nas.html7
-rw-r--r--httemplate/edit/process/part_export.cgi10
2 files changed, 16 insertions, 1 deletions
diff --git a/httemplate/edit/process/nas.html b/httemplate/edit/process/nas.html
index 04b46a5c0..6b8e4b825 100644
--- a/httemplate/edit/process/nas.html
+++ b/httemplate/edit/process/nas.html
@@ -1,4 +1,9 @@
-<& elements/process.html, table=>'nas', viewall_dir=>'browse', &>
+<& elements/process.html,
+ table => 'nas',
+ viewall_dir => 'browse',
+ process_m2m => { link_table => 'export_nas',
+ target_table => 'part_export' },
+&>
<%init>
die "access denied"
diff --git a/httemplate/edit/process/part_export.cgi b/httemplate/edit/process/part_export.cgi
index 209419f0b..21150ef67 100644
--- a/httemplate/edit/process/part_export.cgi
+++ b/httemplate/edit/process/part_export.cgi
@@ -39,4 +39,14 @@ if ( $exportnum ) {
# $exportnum = $new->exportnum;
}
+my $info = FS::part_export::export_info()->{$new->exporttype};
+if ( $info->{nas} ) {
+ my @nasnums = map { /^nasnum(\d+)$/ ? $1 : () } keys %{ $cgi->Vars };
+ $error ||= $new->process_m2m(
+ link_table => 'export_nas',
+ target_table => 'nas',
+ params => \@nasnums
+ );
+}
+
</%init>