From ec34b8903d969fe8ac4ff6947a92e16e07f71fa0 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 27 Mar 2018 09:20:05 -0400 Subject: RT# 78356 - added ability to create and modify rateplans and access point when changed on freeside. cleanded up documentation. --- httemplate/edit/process/elements/process.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'httemplate/edit/process/elements/process.html') diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 76722c960..8c307f0b6 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -459,6 +459,14 @@ foreach my $value ( @values ) { } +if ($class eq "FS::tower") { + foreach my $part_svc_broadband_export ( FS::tower_sector->part_export_svc_broadband ) { + if ($part_svc_broadband_export and $part_svc_broadband_export->can('export_tower_sector')) { + $error = $part_svc_broadband_export->export_tower_sector($new); + } + } +} + # set up redirect URLs my $redirect; -- cgit v1.2.1 From 25efd7207d9ea9be4bea1093917c0d8dc4b1e87a Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 27 Jul 2018 08:05:10 -0400 Subject: RT# 78356 - added speed test fields for broadband service and new modifier to get speed from fcc_477 form in package --- httemplate/edit/process/elements/process.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'httemplate/edit/process/elements/process.html') diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 8c307f0b6..c197eb123 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -89,6 +89,9 @@ Example: # for use with tables that are FS::option_Common (among other things) 'args_callback' => sub { my( $cgi, $object ) = @_; }, + # if no errors after package insert or replace will update services attached to package. + 'update_svc' => sub { my( $cgi, $object ) = @_; }, + 'debug' => 1, #turns on debugging output #agent virtualization @@ -438,6 +441,12 @@ foreach my $value ( @values ) { } } + if ( !$error and $opt{'update_svc'} ) { + my @args = (); + @args = &{ $opt{'args_callback'} }( $cgi, $new ) if $opt{'args_callback'}; + $error = &{ $opt{'update_svc'} }( $cgi, $new, @args ); + } + if ( $error ) { $cgi->param('error', $error); -- cgit v1.2.1 From 8944f813b2d664b38bcbe349ac6897a0314e3b9d Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 2 Aug 2018 12:59:15 -0700 Subject: fix editing employee pw, RT#32456 --- httemplate/edit/process/elements/process.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/edit/process/elements/process.html') diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index c197eb123..85f060e32 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -80,8 +80,12 @@ Example: 'precheck_callback' => sub { my( $cgi ) = @_; }, #after the new object is created + #return an error string or empty for no error 'post_new_object_callback' => sub { my( $cgi, $object ) = @_; }, + #run right before replacing (not run for inserts) + 'edit_callback' => sub { my( $new, $old ) = @_; }, + #after everything's inserted 'noerror_callback' => sub { my( $cgi, $object ) = @_; }, -- cgit v1.2.1 From 0566e27675c0150f00795587c8bb1123c6a3871b Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 2 Aug 2018 13:06:39 -0700 Subject: fix editing employee pw, RT#32456 --- httemplate/edit/process/elements/process.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process/elements/process.html') diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 85f060e32..d2b037053 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -280,7 +280,7 @@ foreach my $value ( @values ) { } if ( $opt{'post_new_object_callback'} ) { - &{ $opt{'post_new_object_callback'} }( $cgi, $new ); + $error ||= &{ $opt{'post_new_object_callback'} }( $cgi, $new ); } if ( $opt{'agent_virt'} ) { -- cgit v1.2.1