From 5b27f640afa7ff9a6804949ad16667d988f7f5d4 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 27 Jul 2015 12:13:26 +0800 Subject: Bug 1171806 - add the ability for a user to disable/"remove" their own account --- .../en/default/account/prefs/account.html.tmpl | 30 +++++++- template/en/default/account/prefs/prefs.html.tmpl | 85 ++++++++++++++-------- 2 files changed, 85 insertions(+), 30 deletions(-) (limited to 'template') 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 @@ - + [% END %] + + + + + + + + + + + + +
Your real name:Your real name: optional, but encouraged @@ -118,4 +118,32 @@
+ Disable My Account +

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 -- cgit v1.2.3-24-g4f1b