diff options
author | ivan <ivan> | 2011-11-21 00:02:17 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-11-21 00:02:17 +0000 |
commit | f981034339688ff4a3c072732afb17112370bbf1 (patch) | |
tree | 482f6c55abb42fa64875f3e066ddb93f7907151a | |
parent | 1cda890d2a1faa2203044cf7c0470b0aba53b449 (diff) |
add svc_broadband-manage_link-new_window, RT#14696
-rw-r--r-- | FS/FS/Conf.pm | 6 | ||||
-rw-r--r-- | httemplate/elements/tr-cust_svc.html | 6 | ||||
-rwxr-xr-x | httemplate/view/cust_main/packages/section.html | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 6eb539fcf..e27a88584 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -4294,6 +4294,12 @@ and customer address. Include units.', ], }, + { + 'key' => 'svc_broadband-manage_link-new_window', + 'section' => 'UI', + 'description' => 'Open the "Manage Device" link in a new window', + 'type' => 'checkbox', + }, #more fine-grained, service def-level control could be useful eventually? { diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html index 8bd77124d..ca5de86b4 100644 --- a/httemplate/elements/tr-cust_svc.html +++ b/httemplate/elements/tr-cust_svc.html @@ -29,7 +29,7 @@ FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) %></B></TD> <TD ALIGN="right"><% FS::UI::Web::svc_export_links($m, $part_svc, $cust_svc) %> % if ( $manage_link and $opt{'manage_link_loc'} eq 'right' ) { - <A HREF="<% $manage_link %>"><% $opt{'manage_link_text'} |h %></A> + <A HREF="<% $manage_link %>" <% $manage_target %>><% $opt{'manage_link_text'} |h %></A> % } </TD> </TR> @@ -66,7 +66,7 @@ $cust_svc->overlimit ) 'ip' => $svc_x->ip_addr ) %> )</FONT> % if ( $manage_link and $opt{'manage_link_loc'} eq 'bottom' ) { - <FONT SIZE="-2">( <A HREF="<% $manage_link %>"><% $opt{'manage_link_text'} |h %></A> )</FONT> + <FONT SIZE="-2">( <A HREF="<% $manage_link %>" <% $manage_target %>><% $opt{'manage_link_text'} |h %></A> )</FONT> % } % } #svc_broadband % if ( $curuser->access_right('Unprovision customer service') ) { @@ -94,11 +94,13 @@ my $svc_unprovision_link = qq!', '!.emt('Permanently unprovision and delete this service?').qq!')">!.emt('Unprovision').'</A>'; my $manage_link = $opt{'manage_link'}; +my $manage_target = ''; if ( $part_svc->svcdb eq 'svc_broadband' and $manage_link ) { my $ip_addr = $svc_x->ip_addr; #substitution for $manage_link $manage_link = eval(qq("$manage_link")); $opt{'manage_link_text'} ||= mt('Manage Device'); $opt{'manage_link_loc'} ||= 'bottom'; + $manage_target = ' target="_blank"' if $opt{'manage_link-new_window'}; } else { $manage_link = ''; diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html index 638e88cab..4374a9909 100755 --- a/httemplate/view/cust_main/packages/section.html +++ b/httemplate/view/cust_main/packages/section.html @@ -86,6 +86,7 @@ my %conf_opt = ( 'manage_link' => scalar($conf->config('svc_broadband-manage_link')), 'manage_link_text' => scalar($conf->config('svc_broadband-manage_link_text')), 'manage_link_loc' => scalar($conf->config('svc_broadband-manage_link_loc')), + 'manage_link-new_window' => scalar($conf->config('svc_broadband-manage_link-new_window')), 'maestro-status_test' => $conf->exists('maestro-status_test'), 'cust_pkg-large_pkg_size' => $conf->config('cust_pkg-large_pkg_size'), |