i18n, RT#12515
[freeside.git] / httemplate / pref / pref.html
1 <% include('/elements/header.html', 'Preferences for '. getotaker ) %>
2
3 <FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
4
5 <% include('/elements/error.html') %>
6
7
8 Change password (leave blank for no change)
9 <% ntable("#cccccc",2) %>
10
11   <TR>
12     <TH ALIGN="right">Current password: </TH>
13     <TD><INPUT TYPE="password" NAME="_password"></TD>
14   </TR>
15
16   <TR>
17     <TH ALIGN="right">New password: </TH>
18     <TD><INPUT TYPE="password" NAME="new_password"></TD>
19   </TR>
20
21   <TR>
22    <TH ALIGN="right">Re-enter new password: </TH>
23    <TD><INPUT TYPE="password" NAME="new_password2"></TD>
24   </TR>
25
26 </TABLE>
27 <BR>
28
29
30 Interface
31 <% ntable("#cccccc",2) %>
32
33   <TR>
34     <TH ALIGN="right">Locale: </TH>
35     <TD>
36       <SELECT NAME="locale">
37 %       foreach my $locale ( FS::Locales->locales ) {
38 %         my %info = FS::Locales->locale_info($locale);
39 %         my $selected = ($locale eq $curuser->option('locale'))
40 %                          ? 'SELECTED' : '';
41           <OPTION VALUE="<% $locale %>" <%$selected%>><% $info{name} %> (<% $info{country} %>)
42 %       }
43       </SELECT>
44     </TD>
45   </TR>
46
47   <TR>
48     <TH ALIGN="right">Menu location: </TH>
49     <TD>
50       <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>
51       <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>
52     </TD>
53     <TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
54   </TR>
55
56   <TR>
57     <TH ALIGN="right">Default customer view: </TH>
58     <TD COLSPAN=2>
59       <SELECT NAME="default_customer_view">
60 %       foreach my $view ( keys %customer_views ) {
61 %         my $selected =
62 %           $customer_views{$view} eq $curuser->option('default_customer_view')
63 %             ? 'SELECTED'
64 %             : '';
65           <OPTION VALUE="<%$customer_views{$view}%>" <%$selected%>><%$view%></OPTION>
66 %       }
67       </SELECT>
68     </TD>
69   </TR>
70   
71   <TR>
72     <TH ALIGN="right" COLSPAN=1>Disable HTML editor for customer notes: </TH>
73     <TD ALIGN="left" COLSPAN=2>
74       <INPUT TYPE="checkbox" NAME="disable_html_editor" VALUE="1" <% $curuser->option('disable_html_editor') ? 'CHECKED' : '' %>>
75     </TD>
76   </TR>
77
78 </TABLE>
79 <BR>
80
81
82 Email Address
83 <% ntable("#cccccc",2) %>
84
85   <TR>
86     <TH>Email Address(es) (comma separated) </TH>
87     <TD>
88    <TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
89     </TD>
90   </TR>
91
92 </TABLE>
93 <BR>
94
95
96 Development
97 <% ntable("#cccccc",2) %>
98
99   <TR>
100     <TH>Show customer package timestamps: </TH>
101     <TD><INPUT TYPE="checkbox" NAME="cust_pkg-display_times" VALUE="1" <% $curuser->option('cust_pkg-display_times') ? 'CHECKED' : '' %>></TD>
102   </TR>
103   <TR>
104     <TH>Show internal package numbers: </TH>
105     <TD><INPUT TYPE="checkbox" NAME="show_pkgnum" VALUE="1" <% $curuser->option('show_pkgnum') ? 'CHECKED' : '' %>></TD>
106   </TR>
107   <TR>
108     <TH>Show config item counts: </TH>
109     <TD><INPUT TYPE="checkbox" NAME="show_confitem_counts" VALUE="1" <% $curuser->option('show_confitem_counts') ? 'CHECKED' : '' %>></TD>
110   </TR>
111   <TR>
112     <TH>Show export data on service view (when available): </TH>
113     <TD><INPUT TYPE="checkbox" NAME="export_getsettings" VALUE="1" <% $curuser->option('export_getsettings') ? 'CHECKED' : '' %>></TD>
114   </TR>
115   <TR>
116     <TH>Show database profiling (when available): </TH>
117     <TD><INPUT TYPE="checkbox" NAME="show_db_profile" VALUE="1" <% $curuser->option('show_db_profile') ? 'CHECKED' : '' %>></TD>
118   </TR>
119   <TR>
120     <TH>Save database profiling logs (when available): </TH>
121     <TD><INPUT TYPE="checkbox" NAME="save_db_profile" VALUE="1" <% $curuser->option('save_db_profile') ? 'CHECKED' : '' %>></TD>
122   </TR>
123
124 </TABLE>
125 <BR>
126
127 SNOM integration
128 <% ntable("#cccccc",2) %>
129
130   <TR>
131     <TH ALIGN="right">SNOM IP address</TH>
132     <TD><INPUT TYPE="text" NAME="snom-ip" VALUE="<% $curuser->option('snom-ip') %>"></TD>
133   </TR>
134
135   <TR>
136     <TH ALIGN="right">SNOM HTTP username (if necessary)</TH>
137     <TD><INPUT TYPE="text" NAME="snom-username" VALUE="<% $curuser->option('snom-username') %>"></TD>
138   </TR>
139
140   <TR>
141     <TH ALIGN="right">SNOM HTTP password (if necessary)</TH>
142     <TD><INPUT TYPE="password" NAME="snom-password" VALUE="<% $curuser->option('snom-password') %>"></TD>
143   </TR>
144
145 </TABLE>
146 <BR>
147
148 OR<BR><BR>
149
150 Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>)
151 <% ntable("#cccccc",2) %>
152
153   <TR>
154     <TH ALIGN="right">Vonage phone number</TH>
155     <TD><INPUT TYPE="text" NAME="vonage-fromnumber" VALUE="<% $curuser->option('vonage-fromnumber') %>"></TD>
156   </TR>
157
158   <TR>
159     <TH ALIGN="right">Vonage username</TH>
160     <TD><INPUT TYPE="text" NAME="vonage-username" VALUE="<% $curuser->option('vonage-username') %>"></TD>
161   </TR>
162
163   <TR>
164     <TH ALIGN="right">Vonage password</TH>
165     <TD><INPUT TYPE="password" NAME="vonage-password" VALUE="<% $curuser->option('vonage-password') %>"></TD>
166   </TR>
167
168 </TABLE>
169 <BR>
170
171
172 % foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
173   <INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
174   <SCRIPT TYPE="text/javascript">
175   document.pref_form.<% $prop %>.value = screen.<% $prop %>;
176   </script>
177 % }
178
179 <INPUT TYPE="submit" VALUE="Update preferences">
180
181 <% include('/elements/footer.html') %>
182 <%init>
183
184 my $curuser = $FS::CurrentUser::CurrentUser;
185
186 #false laziness w/view/cust_main.cgi and Conf.pm (cust_main-default_view)
187
188 tie my %customer_views, 'Tie::IxHash',
189   'Basics'          => 'basics',
190   'Notes'           => 'notes', #notes and files?
191   'Tickets'         => 'tickets',
192   'Packages'        => 'packages',
193   'Payment History' => 'payment_history',
194 ;
195 $customer_views{'Change History'} = 'change_history'
196   if $curuser->access_right('View customer history');
197 $customer_views{'Jumbo'} = 'jumbo';
198
199 # XSS via your own preferences?  seems unlikely, but nice try anyway...
200 ( $curuser->option('menu_position') || 'top' )
201   =~ /^(\w+)$/ or die "illegal menu_position";
202 my $menu_position = $1;
203 ( $curuser->option('email_address') )
204   =~ /^([,\w\@.]*)$/ or die "illegal email_address";  #too late
205 my $email_address = $1;
206
207 </%init>