1 <% include('/elements/header.html', 'Preferences for '. getotaker ) %>
3 <FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
5 <% include('/elements/error.html') %>
8 Change password (leave blank for no change)
9 <% ntable("#cccccc",2) %>
12 <TH ALIGN="right">Current password: </TH>
13 <TD><INPUT TYPE="password" NAME="_password"></TD>
17 <TH ALIGN="right">New password: </TH>
18 <TD><INPUT TYPE="password" NAME="new_password"></TD>
22 <TH ALIGN="right">Re-enter new password: </TH>
23 <TD><INPUT TYPE="password" NAME="new_password2"></TD>
31 <% ntable("#cccccc",2) %>
34 <TH ALIGN="right">Menu location: </TH>
36 <INPUT TYPE="radio" NAME="menu_position" VALUE="left" onClick="document.images['menu_example'].src='../images/menu-left-example.png';" <% $menu_position eq 'left' ? ' CHECKED' : ''%>> Left<BR>
37 <INPUT TYPE="radio" NAME="menu_position" VALUE="top"onClick="document.images['menu_example'].src='../images/menu-top-example.png';" <% $menu_position eq 'top' ? ' CHECKED' : ''%>> Top <BR>
39 <TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
43 <TH ALIGN="right">Default customer view: </TD>
45 <SELECT NAME="default_customer_view">
46 % foreach my $view ( keys %customer_views ) {
48 % $customer_views{$view} eq $curuser->option('default_customer_view')
51 <OPTION VALUE="<%$customer_views{$view}%>" <%$selected%>><%$view%></OPTION>
62 <% ntable("#cccccc",2) %>
65 <TH>Email Address(es) (comma separated) </TH>
67 <TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
76 <% ntable("#cccccc",2) %>
79 <TH>Show internal package numbers: </TH>
80 <TD><INPUT TYPE="checkbox" NAME="show_pkgnum" VALUE="1" <% $curuser->option('show_pkgnum') ? 'CHECKED' : '' %>></TD>
83 <TH>Show config item counts: </TH>
84 <TD><INPUT TYPE="checkbox" NAME="show_confitem_counts" VALUE="1" <% $curuser->option('show_confitem_counts') ? 'CHECKED' : '' %>></TD>
87 <TH>Show export data on service view (when available): </TH>
88 <TD><INPUT TYPE="checkbox" NAME="export_getsettings" VALUE="1" <% $curuser->option('export_getsettings') ? 'CHECKED' : '' %>></TD>
91 <TH>Show database profiling (when available): </TH>
92 <TD><INPUT TYPE="checkbox" NAME="show_db_profile" VALUE="1" <% $curuser->option('show_db_profile') ? 'CHECKED' : '' %>></TD>
95 <TH>Save database profiling logs (when available): </TH>
96 <TD><INPUT TYPE="checkbox" NAME="save_db_profile" VALUE="1" <% $curuser->option('save_db_profile') ? 'CHECKED' : '' %>></TD>
103 <% ntable("#cccccc",2) %>
106 <TH ALIGN="right">SNOM IP address</TH>
107 <TD><INPUT TYPE="text" NAME="snom-ip" VALUE="<% $curuser->option('snom-ip') %>"></TD>
111 <TH ALIGN="right">SNOM HTTP username (if necessary)</TH>
112 <TD><INPUT TYPE="text" NAME="snom-username" VALUE="<% $curuser->option('snom-username') %>"></TD>
116 <TH ALIGN="right">SNOM HTTP password (if necessary)</TH>
117 <TD><INPUT TYPE="password" NAME="snom-password" VALUE="<% $curuser->option('snom-password') %>"></TD>
125 Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>)
126 <% ntable("#cccccc",2) %>
129 <TH ALIGN="right">Vonage phone number</TH>
130 <TD><INPUT TYPE="text" NAME="vonage-fromnumber" VALUE="<% $curuser->option('vonage-fromnumber') %>"></TD>
134 <TH ALIGN="right">Vonage username</TH>
135 <TD><INPUT TYPE="text" NAME="vonage-username" VALUE="<% $curuser->option('vonage-username') %>"></TD>
139 <TH ALIGN="right">Vonage password</TH>
140 <TD><INPUT TYPE="password" NAME="vonage-password" VALUE="<% $curuser->option('vonage-password') %>"></TD>
147 % foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
148 <INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
149 <SCRIPT TYPE="text/javascript">
150 document.pref_form.<% $prop %>.value = screen.<% $prop %>;
154 <INPUT TYPE="submit" VALUE="Update preferences">
156 <% include('/elements/footer.html') %>
159 my $curuser = $FS::CurrentUser::CurrentUser;
161 #false laziness w/view/cust_main.cgi and Conf.pm (cust_main-default_view)
163 tie my %customer_views, 'Tie::IxHash',
164 'Basics' => 'basics',
165 'Notes' => 'notes', #notes and files?
166 'Tickets' => 'tickets',
167 'Packages' => 'packages',
168 'Payment History' => 'payment_history',
170 $customer_views{'Change History'} = 'change_history'
171 if $curuser->access_right('View customer history');
172 $customer_views{'Jumbo'} = 'jumbo';
174 # XSS via your own preferences? seems unlikely, but nice try anyway...
175 ( $curuser->option('menu_position') || 'top' )
176 =~ /^(\w+)$/ or die "illegal menu_position";
177 my $menu_position = $1;
178 ( $curuser->option('email_address') )
179 =~ /^([,\w\@.]*)$/ or die "illegal email_address"; #too late
180 my $email_address = $1;