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>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>
47 <% ntable("#cccccc",2) %>
50 <TH>Email Address(es) (comma separated) </TH>
52 <TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
60 Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>)
61 <% ntable("#cccccc",2) %>
64 <TH ALIGN="right">Vonage phone number</TH>
65 <TD><INPUT TYPE="text" NAME="vonage-fromnumber" VALUE="<% $FS::CurrentUser::CurrentUser->option('vonage-fromnumber') %>"></TD>
69 <TH ALIGN="right">Vonage username</TH>
70 <TD><INPUT TYPE="text" NAME="vonage-username" VALUE="<% $FS::CurrentUser::CurrentUser->option('vonage-username') %>"></TD>
74 <TH ALIGN="right">Vonage password</TH>
75 <TD><INPUT TYPE="password" NAME="vonage-password" VALUE="<% $FS::CurrentUser::CurrentUser->option('vonage-password') %>"></TD>
82 % foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
83 <INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
84 <SCRIPT TYPE="text/javascript">
85 document.pref_form.<% $prop %>.value = screen.<% $prop %>;
89 <INPUT TYPE="submit" VALUE="Update preferences">
91 <% include('/elements/footer.html') %>
94 # XSS via your own preferences? seems unlikely, but nice try anyway...
95 ( $FS::CurrentUser::CurrentUser->option('menu_position') || 'left' )
96 =~ /^(\w+)$/ or die "illegal menu_position";
97 my $menu_position = $1;
98 ( $FS::CurrentUser::CurrentUser->option('email_address') )
99 =~ /^([,\w\@.]*)$/ or die "illegal email_address"; #too late
100 my $email_address = $1;