From eb061f5119325e666f0dff40d4089e5c1df58e17 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Sun, 16 Mar 2008 19:58:34 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'TRIXBOX_2_6'. --- httemplate/elements/tr-select-reason.html | 149 ------------------------------ 1 file changed, 149 deletions(-) delete mode 100755 httemplate/elements/tr-select-reason.html (limited to 'httemplate/elements/tr-select-reason.html') diff --git a/httemplate/elements/tr-select-reason.html b/httemplate/elements/tr-select-reason.html deleted file mode 100755 index 4051e7d20..000000000 --- a/httemplate/elements/tr-select-reason.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - Reason - - - - - -% my @types = qsearch( 'reason_type', { 'class' => $class } ); -% if (scalar(@types) < 1) { # we should never reach this - - -

No reason types. Go add some.

- - -% }elsif (scalar(@types) == 1) { - - -

Reason Type

- - -

<% $types[0]->type %> - - - - -% }else{ - - - -

Reason Type

- - - - - -% } - - - -

New Reason

- - " style="display:<% $display %>"> - - -<%init> - -my %opt = @_; - -my $name = $opt{'field'}; -my $class = $opt{'reason_class'}; -my $init_reason = $opt{'curr_value'}; - -my $controlledbutton = $opt{'control_button'}; - -( my $func_suffix = $name ) =~ s/\./_/g; - -my $id = $opt{'id'} || $func_suffix; - -my( $add_access_right, $access_right ); -if ($class eq 'C') { - $access_right = 'Cancel customer'; - $add_access_right = 'Add on-the-fly cancel reason'; -} elsif ($class eq 'S') { - $access_right = 'Suspend customer package'; - $add_access_right = 'Add on-the-fly suspend reason'; -} elsif ($class eq 'R') { - $access_right = 'Post credit'; - $add_access_right = 'Add on-the-fly credit reason'; -} else { - die "illegal class: $class"; -} - -my( $display, $disabled ) = ( 'none', 'DISABLED' ); -my( $init_type, $init_newreason ) = ( '', '' ); -if ($init_reason == -1 || ref($init_reason) ) { - - $display = 'inline'; - $disabled = ''; - - if ( ref($init_reason) ) { - $init_type = $init_reason->{'typenum'}; - $init_newreason = $init_reason->{'reason'}; - $init_reason = -1; - } - -} - -my $extra_sql = - "WHERE class = '$class' and (disabled = '' OR disabled is NULL)"; - -my @reasons = qsearch({ - table => 'reason', - hashref => {}, - extra_sql => $extra_sql, - addl_from => 'LEFT JOIN reason_type '. - ' ON reason_type.typenum = reason.reason_type', - order_by => 'ORDER BY reason_type.type ASC, reason.reason ASC', -}); - -my $curuser = $FS::CurrentUser::CurrentUser; - - -- cgit v1.2.1