This commit was generated by cvs2svn to compensate for changes in r8690,
[freeside.git] / fs_selfservice / FS-SelfService / cgi / myaccount_menu.html
1 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
2 <TABLE BORDER=0><TR>
3 <TD VALIGN="top" HEIGHT="100%" BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>">
4
5 <TABLE CELLSPACING=0 BORDER=0 HEIGHT="100%">
6
7 <%= 
8
9 my @menu = (
10   { title=>' ' },
11   { title=>'Overview', url=>'myaccount', size=>'+1', },
12   { title=>' ' },
13   { title=>'Purchase', size=>'+1', },
14 );
15
16 unless ( $access_pkgnum ) {
17   push @menu,
18     { title=>'Purchase additional package',
19       url=>'customer_order_pkg', 'indent'=>2 };
20 }
21
22 if ( 1 ) { #XXXFIXME "enable selfservice prepay features" flag or something, eventually per-pkg or something really fancy
23
24   #XXXFIXME still a bit sloppy for multi-gateway of differing namespace
25   my $i = 0;
26   while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CARD/; $i++ }
27   if ( $cust_paybys[$i] =~ /^CARD/ ) {
28     push @menu, { title  => 'Recharge my account with a credit card',
29                   url    => $hide_payment_fields[$i]
30                               ? 'make_thirdparty_payment&payby_method=CC'
31                               : 'make_payment',
32                   indent => 2,
33                  }
34   }
35
36   $i = 0;
37   while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CHEK/; $i++ }
38   if ( $cust_paybys[$i] =~ /^CHEK/ ) {
39     push @menu, { title  => 'Recharge my account with a check',
40                   url    => $hide_payment_fields[$i]
41                               ? 'make_thirdparty_payment&payby_method=ECHECK'
42                               : 'make_ach_payment',
43                   indent => 2,
44                 }
45   }
46
47   push @menu, { title  => 'Recharge my account with a prepaid card',
48                 url    => 'recharge_prepay',
49                 indent => 2,
50               }
51     if grep(/^PREP/, @cust_paybys);
52
53 }
54
55 push @menu,
56   { title=>' ' },
57   { title=>'View my usage', url=>'view_usage', size=>'+1', },
58 ;
59
60 unless ( $access_pkgnum ) {
61   push @menu,
62     { title=>'Setup my services', url=>'provision', size=>'+1', },
63   ;
64 }
65
66 push @menu,
67   { title=>' ' };
68
69 push @menu,
70   { title=>'Change my information', size=>'+1', };
71
72 unless ( $access_pkgnum ) {
73   push @menu,
74     { title=>'Change billing address',      url=>'change_bill',     indent=>2 },
75     { title=>'Change service address',      url=>'change_ship',     indent=>2 },
76     { title=>'Change payment information',  url=>'change_pay',      indent=>2 },
77   ;
78 }
79
80 push @menu,
81   { title=>'Change password(s)',          url=>'change_password', indent=>2 },
82   { title=>' ' },
83   { title=>'Logout',   url=>'logout', size=>'+1', },
84 ;
85
86 foreach my $item ( @menu ) {
87
88   $OUT .= '<TR><TD'; 
89   if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
90     $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
91             ' STYLE="border-top: 1px solid black;'.
92                    ' border-left: 1px solid black;'.
93                    ' border-bottom: 1px solid black"';
94   } else {
95     $OUT .= ' STYLE="border-right: 1px solid black"';
96   }
97   $OUT.='>';
98
99   $OUT .= '&nbsp;' x $item->{'indent'}
100     if exists $item->{'indent'};
101
102   $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
103     if exists $item->{'url'} && $action ne $item->{'url'};
104
105   $OUT .= '<FONT SIZE="'. $item->{'size'}. '">'
106     if exists $item->{'size'};
107
108   $item->{'title'} =~ s/ /&nbsp;/g;
109   $OUT .= $item->{'title'};
110
111   $OUT .= '</FONT>'
112     if exists $item->{'size'};
113
114   $OUT .= '</A>'
115     if exists $item->{'url'} && $action ne $item->{'url'};
116
117   $OUT .= '</TD></TR>';
118
119 }
120
121 %>
122
123 <TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>
124
125 </TABLE>
126
127 </TD>