X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Freason.html;h=7f62ada8476654831649ef67826484e5be5a1876;hp=8af88a95007025c532d886bfc62cebfa4b9b7e0d;hb=HEAD;hpb=0fda4498e5b48587090b03d40ea97fec1e024385 diff --git a/httemplate/browse/reason.html b/httemplate/browse/reason.html index 8af88a950..7f62ada84 100644 --- a/httemplate/browse/reason.html +++ b/httemplate/browse/reason.html @@ -18,6 +18,8 @@ 'fields' => \@fields, 'links' => \@links, 'align' => $align, + 'html_form' => qq!
!, + 'html_foot' => $html_foot, ) %> <%init> @@ -31,7 +33,8 @@ my $class = $1; my $classname = $FS::reason_type::class_name{$class}; my $classpurpose = $FS::reason_type::class_purpose{$class}; -my $html_init = ucfirst($classname). " reasons $classpurpose.

". +my $html_init = include('/elements/init_overlib.html'). +ucfirst($classname). " reasons $classpurpose.

". qq!!. "Add a $classname reason

"; @@ -62,11 +65,8 @@ my @links = ( my $align = 'rll'; -if ( $class eq 'S' ) { - push @header, - 'Credit unused service', - 'Suspension fee', - ; +if ( $class eq 'S' or $class eq 'C' ) { + push @header, 'Credit unused service'; push @fields, sub { my $reason = shift; @@ -75,7 +75,12 @@ if ( $class eq 'S' ) { } else { return 'NO'; } - }, + }; + $align .= 'c'; +} +if ( $class eq 'S' ) { + push @header, 'Suspension fee'; + push @fields, sub { my $reason = shift; my $feepart = $reason->feepart; @@ -104,8 +109,25 @@ if ( $class eq 'S' ) { $text .= ''; } ; - $align .= 'cl'; + $align .= 'l'; } +# reason merge handling +push @header, ''; +push @fields, sub { + my $reason = shift; + my $reasonnum = $reason->reasonnum; + qq!!; +}; +push @links, ''; +$align .= 'l'; +my $html_foot = include('/search/elements/checkbox-foot.html', + onclick => include( '/elements/popup_link_onclick.html', + js_action => q!'! . "${p}misc/reason-merge.html?" . q!' + toCGIString()!, + actionlabel => 'Merge reasons', + ), + label => 'merge selected reasons', + minboxes => 2, +) . '
';