From 9464e3517fcae6a735c14b3fb15b91f3886a884a Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Mar 2008 22:18:59 +0000 Subject: [PATCH] slightly better voip_cdr package edit: use radio buttons for selecting long things --- FS/FS/part_pkg/voip_cdr.pm | 6 +++--- httemplate/edit/part_pkg.cgi | 28 +++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index b4ab73fb4..ea160315b 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -45,8 +45,8 @@ tie my %rating_method, 'Tie::IxHash', 'select_label' => 'ratename', }, 'rating_method' => { 'name' => 'Region rating method', - 'type' => 'select', - 'select_options' => \%rating_method, + 'type' => 'radio', + 'options' => \%rating_method, }, 'default_prefix' => { 'name' => 'Default prefix optionally prepended to customer DID numbers when searching for CDR records', @@ -93,7 +93,7 @@ tie my %rating_method, 'Tie::IxHash', # }, }, - 'fieldorder' => [qw( setup_fee recur_flat unused_credit ratenum rating_method default_prefix )], + 'fieldorder' => [qw( setup_fee recur_flat unused_credit ratenum rating_method default_prefix disable_src domestic_prefix international_prefix )], 'weight' => 40, ); diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index ec001cb0c..b1851a7ba 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -286,19 +286,25 @@ Line-item revenue recognition % % my $format = sub { shift }; % $format = $href->{$field}{'format'} if exists($href->{$field}{'format'}); +% % if ( ! exists($href->{$field}{'type'}) ) { +% % $html .= qq!!; +% % } elsif ( $href->{$field}{'type'} eq 'checkbox' ) { +% % $html .= qq!'; +% % } elsif ( $href->{$field}{'type'} =~ /^select/ ) { +% % $html .= '{$field}{'type'} eq 'select_multiple'; @@ -319,13 +325,13 @@ Line-item revenue recognition % } % } elsif ( $href->{$field}{'select_options'} ) { % foreach my $key ( keys %{ $href->{$field}{'select_options'} } ) { -% my $value = $href->{$field}{'select_options'}{$key}; +% my $label = $href->{$field}{'select_options'}{$key}; % $html .= qq!