broadband_nas export, #15284
[freeside.git] / httemplate / edit / process / svc_broadband.cgi
index d5c9820..4184f5f 100644 (file)
@@ -1,8 +1,20 @@
-<% include('elements/svc_Common.html', 'table' => 'svc_broadband') %>
+<& elements/svc_Common.html,
+  table       => 'svc_broadband',
+  fields      => [ fields('svc_broadband'), fields('nas'), 'usergroup' ],
+  precheck_callback => \&precheck,
+&>
 <%init>
+# for historical reasons, process_m2m for usergroup tables is done 
+# in the svc_x::insert/replace/delete methods, not here
 my $curuser = $FS::CurrentUser::CurrentUser;
 
 die "access denied"
   unless $curuser->access_right('Provision customer service'); #something else more specific?
 
+sub precheck {
+  my $cgi = shift;
+  $cgi->param("usergroup", [ $cgi->param('usergroup') ]);
+  ''
+}
+
 </%init>