diff options
author | Byron Jones <glob@mozilla.com> | 2015-07-27 06:13:26 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-07-27 06:13:26 +0200 |
commit | 5b27f640afa7ff9a6804949ad16667d988f7f5d4 (patch) | |
tree | 4da5c3f69dc6b026b8d8805542b717485d84149e /template | |
parent | 92f16f758434dd1ce92a1043ade9bf7f8438fa78 (diff) | |
download | bugzilla-5b27f640afa7ff9a6804949ad16667d988f7f5d4.tar.gz bugzilla-5b27f640afa7ff9a6804949ad16667d988f7f5d4.tar.xz |
Bug 1171806 - add the ability for a user to disable/"remove" their own account
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/account/prefs/account.html.tmpl | 30 | ||||
-rw-r--r-- | template/en/default/account/prefs/prefs.html.tmpl | 85 |
2 files changed, 85 insertions, 30 deletions
diff --git a/template/en/default/account/prefs/account.html.tmpl b/template/en/default/account/prefs/account.html.tmpl index 0c8f0807f..919563440 100644 --- a/template/en/default/account/prefs/account.html.tmpl +++ b/template/en/default/account/prefs/account.html.tmpl @@ -29,7 +29,7 @@ <table> <tr> - <th align="right">Your real name:</th> + <th align="right" width="150">Your real name:</th> <td> <input size="35" name="realname" value="[% realname FILTER html %]"> <i>optional, but encouraged</i> @@ -118,4 +118,32 @@ </tr> [% END %] + <tr> + <td></td> + <td> + <a href="#" id="account-disable-toggle"><span id="account-disable-spinner">▸</span> Disable My Account</a> + </td> + </tr> + <tr id="account-disable" style="display:none"> + <td></td> + <td> + <p> + Your contributions on bugzilla.mozilla.org will still be visible; + however, your email address and name will be removed in most locations. + We are not able to remove your details that are part of comment text. + </p> + <p> + <input type="checkbox" id="account-disable-confirm"> + I acknowledge that my account will not be functional after it has been + disabled. + </p> + <input type="hidden" name="account_disable" id="account_disable"> + <button type="button" id="account-disable-button" disabled>Disable Account</button> + </td> + </tr> + <tr> + <td></td> + <td><hr></td> + </tr> + </table> diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl index 1fcb3e25a..e898738b7 100644 --- a/template/en/default/account/prefs/prefs.html.tmpl +++ b/template/en/default/account/prefs/prefs.html.tmpl @@ -35,38 +35,65 @@ # dont_show_button: boolean. Prevent the display of the "Submit Changes" button. #%] -[% filtered_login = user.login FILTER html %] -[% PROCESS global/header.html.tmpl - title = "User Preferences" - subheader = filtered_login - generate_api_token = 1 - style_urls = ['skins/standard/admin.css'] - javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js'] - doc_section = "userpreferences.html" - %] +[% + filtered_login = user.login FILTER html; -[% tabs = [{ name => "settings", label => "General Preferences", - link => "userprefs.cgi?tab=settings", saveable => "1" }, - { name => "email", label => "Email Preferences", - link => "userprefs.cgi?tab=email", saveable => "1" }, - { name => "saved-searches", label => "Saved Searches", - link => "userprefs.cgi?tab=saved-searches", saveable => "1" }, - { name => "account", label => "Account Information", - link => "userprefs.cgi?tab=account", saveable => "1" }, - { name => "apikey", label => "API Keys", - link => "userprefs.cgi?tab=apikey", saveable => "1", - doc_section => "using.html#apikey" }, - { name => "permissions", label => "Permissions", - link => "userprefs.cgi?tab=permissions", saveable => "0" } ] %] + PROCESS global/header.html.tmpl + title = "User Preferences" + subheader = filtered_login + generate_api_token = 1 + style_urls = ['skins/standard/admin.css'] + javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js', 'js/account.js'] + doc_section = "userpreferences.html"; -[% Hook.process('tabs') %] + tabs = [ + { + name => "account", + label => "Account", + link => "userprefs.cgi?tab=account", + saveable => "1" + }, + { + name => "settings", + label => "General Preferences", + link => "userprefs.cgi?tab=settings", + saveable => "1" + }, + { + name => "email", + label => "Email Preferences", + link => "userprefs.cgi?tab=email", + saveable => "1" + }, + { + name => "saved-searches", + label => "Saved Searches", + link => "userprefs.cgi?tab=saved-searches", + saveable => "1" + }, + { + name => "apikey", + label => "API Keys", + link => "userprefs.cgi?tab=apikey", + saveable => "1", + doc_section => "using.html#apikey" + }, + { + name => "permissions", + label => "Permissions", + link => "userprefs.cgi?tab=permissions", + saveable => "0" + }, + ]; + Hook.process('tabs'); -[% FOREACH tab IN tabs %] - [% IF tab.name == current_tab_name %] - [% current_tab = tab %] - [% LAST %] - [% END %] -[% END %] + FOREACH tab IN tabs; + IF tab.name == current_tab_name; + current_tab = tab; + LAST; + END; + END; +%] [% WRAPPER global/tabs.html.tmpl tabs = tabs |