X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_forward.cgi;h=0d815b9e5f93f136cc077844f1283b2f35dd769b;hp=cda577b76c6d13e28d5a22e415df704a8b73814f;hb=7a168617da5f6702422c098d714a11586d7655e9;hpb=1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 diff --git a/httemplate/edit/svc_forward.cgi b/httemplate/edit/svc_forward.cgi index cda577b76..0d815b9e5 100755 --- a/httemplate/edit/svc_forward.cgi +++ b/httemplate/edit/svc_forward.cgi @@ -1,8 +1,7 @@ - + <% my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); my($svcnum, $pkgnum, $svcpart, $part_svc, $svc_forward); if ( $cgi->param('error') ) { @@ -119,105 +118,58 @@ my($srcsvc,$dstsvc,$dst)=( #display -my $p1 = popurl(1); -print header("Mail Forward $action", '', - " onLoad=\"visualize()\""); - %> - - -<% - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); +<%= header("Mail Forward $action") %> -print qq!
!; +<% if ( $cgi->param('error') ) { %> + Error: <%= $cgi->param('error') %> +

+<% } %> -#svcnum -print qq!!; -print qq!Service #!, $svcnum ? $svcnum : " (NEW)", ""; -print qq!
!; +Service #<%= $svcnum ? "$svcnum" : " (NEW)" %>
+Service: <%= $part_svc->svc %>

-#pkgnum -print qq!!; - -#svcpart -print qq!!; - -#srcsvc -print qq!\n\nMail to "; + -#dstsvc -print qq! forwards to mailbox."; - -%> - - +<%= ntable("#cccccc",2) %> +Email to <% -print qq! Other destination: !; + tie my %tied_email, 'Tie::IxHash', + '' => 'SELECT DESTINATION', + %email, + '0' => '(other email address)'; + my $widget = new HTML::Widgets::SelectLayers( + 'selected_layer' => $dstsvc, + 'options' => \%tied_email, + 'form_name' => 'dummy', + 'form_action' => 'process/svc_forward.cgi', + 'form_select' => ['srcsvc'], + 'html_between' => '', + 'layer_callback' => sub { + my $layer = shift; + my $html = qq!!. + qq!!. + qq!!. + qq!!; + if ( $layer eq '0' ) { + $html .= ntable("#cccccc",2). + 'Destination email'. + qq!!. + ''; + } + $html .= '
'; + $html; + }, + ); %> - - -
-
- - - - +Forwards to +<%= $widget->html %>