1
[%# 1.0@bugzilla.org %]
2
[%# The contents of this file are subject to the Mozilla Public
3
# License Version 1.1 (the "License"); you may not use this file
4
# except in compliance with the License. You may obtain a copy of
5
# the License at http://www.mozilla.org/MPL/
7
# Software distributed under the License is distributed on an "AS
8
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
# implied. See the License for the specific language governing
10
# rights and limitations under the License.
12
# The Original Code is the Bugzilla Bug Tracking System.
14
# The Initial Developer of the Original Code is Netscape Communications
15
# Corporation. Portions created by Netscape are
16
# Copyright (C) 1998 Netscape Communications Corporation. All
19
# Contributor(s): Gervase Markham <gerv@gerv.net>
20
# Frédéric Buclin <LpSolit@gmail.com>
24
# tabs: List of hashes. May not be empty. Each hash has three members:
25
# name: string. Name of the tab (used internally.)
26
# description: string. Description of the tab (used in tab title).
27
# saveable: boolean. True if tab has a form which can be submitted.
28
# True if user is not receiving self-generated mail.
29
# Note: For each tab name, a template "prefs/${tab.name}.tmpl" must exist,
30
# and its interface must be fulfilled.
31
# current_tab: A direct reference to one of the hashes in the tabs list.
32
# This tab will be displayed.
33
# changes_saved: boolean/string. True if the CGI processed form data before
34
# displaying anything, and can contain an optional custom
35
# message if required (which Perl still evaluates as True).
36
# dont_show_button: boolean. Prevent the display of the "Submit Changes" button.
39
[% filtered_login = user.login FILTER html %]
40
[% PROCESS global/header.html.tmpl
41
title = "User Preferences"
42
subheader = filtered_login
43
style_urls = ['skins/standard/admin.css']
46
[% tabs = [{ name => "settings", label => "General Preferences",
47
link => "userprefs.cgi?tab=settings", saveable => "1" },
48
{ name => "email", label => "Email Preferences",
49
link => "userprefs.cgi?tab=email", saveable => "1" },
50
{ name => "saved-searches", label => "Saved Searches",
51
link => "userprefs.cgi?tab=saved-searches", saveable => "1" },
52
{ name => "account", label => "Name and Password",
53
link => "userprefs.cgi?tab=account", saveable => "1" },
54
{ name => "permissions", label => "Permissions",
55
link => "userprefs.cgi?tab=permissions", saveable => "0" } ] %]
57
[% FOREACH tab IN tabs %]
58
[% IF tab.name == current_tab_name %]
59
[% current_tab = tab %]
64
[% WRAPPER global/tabs.html.tmpl
66
current_tab = current_tab
69
[% IF changes_saved %]
71
The changes to your [% current_tab.label FILTER lower %] have been saved.
73
[% IF email_changes_saved %]
75
An email has been sent to both old and new email
76
addresses to confirm the change of email address.
82
<h3>[% current_tab.label %]</h3>
84
[% IF current_tab.saveable %]
85
<form name="userprefsform" method="post" action="userprefs.cgi">
86
<input type="hidden" name="tab" value="[% current_tab.name %]">
89
[% PROCESS "account/prefs/${current_tab.name}.html.tmpl"
90
IF current_tab.name.defined %]
92
[% IF current_tab.saveable %]
93
<input type="hidden" name="dosave" value="1">
95
[% UNLESS dont_show_button %]
98
<td width="150"> </td>
100
<input type="submit" id="update" value="Submit Changes">
110
[% PROCESS global/footer.html.tmpl %]