diff options
Diffstat (limited to 'template/en/default/account/prefs')
-rw-r--r-- | template/en/default/account/prefs/email.html.tmpl | 84 | ||||
-rw-r--r-- | template/en/default/account/prefs/prefs.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/account/prefs/saved-searches.html.tmpl | 16 |
3 files changed, 43 insertions, 61 deletions
diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl index a4d22db..96a111b 100644 --- a/template/en/default/account/prefs/email.html.tmpl +++ b/template/en/default/account/prefs/email.html.tmpl @@ -35,9 +35,6 @@ [% PROCESS global/variables.none.tmpl %] -[% useqacontact = Param('useqacontact') %] -[% usevotes = Param('usevotes') %] - <p> If you don't like getting a notification for "trivial" changes to [% terms.bugs %], you can use the settings below to @@ -80,8 +77,8 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% prefname = "email-$constants.REL_ANY-$constants.EVT_FLAG_REQUESTED" %] <input type="checkbox" name="[% prefname %]" id="[% prefname %]" value="1" - [% " checked" IF - mail.${constants.REL_ANY}.${constants.EVT_FLAG_REQUESTED} %]> + [% " checked" + IF user.mail_settings.${constants.REL_ANY}.${constants.EVT_FLAG_REQUESTED} %]> <label for="[% prefname %]">Email me when someone asks me to set a flag</label> <br> </td> @@ -92,8 +89,8 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% prefname = "email-$constants.REL_ANY-$constants.EVT_REQUESTED_FLAG" %] <input type="checkbox" name="[% prefname %]" id="[% prefname %]" value="1" - [% " checked" IF - mail.${constants.REL_ANY}.${constants.EVT_REQUESTED_FLAG} %]> + [% " checked" + IF user.mail_settings.${constants.REL_ANY}.${constants.EVT_REQUESTED_FLAG} %]> <label for="[% prefname %]">Email me when someone sets a flag I asked for</label> <br> </td> @@ -150,21 +147,28 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% relationships = [ { id = constants.REL_ASSIGNEE, description = "Assignee" }, - { id = constants.REL_QA, - description = "QA Contact" }, { id = constants.REL_REPORTER, description = "Reporter" }, { id = constants.REL_CC, description = "CCed" }, - { id = constants.REL_VOTER, - description = "Voter" }, ] %] +[% IF Param('useqacontact') %] + [% relationships.push({ id = constants.REL_QA, + description = "QA Contact" }) %] +[% END %] + + +[%# This is up here so that the "relationships" hook can modify it. %] +[% no_added_removed = [constants.REL_REPORTER] %] + +[% Hook.process('relationships') %] + +[% num_columns = relationships.size %] + <table class="bz_emailprefs" border="1"> <tr> - <td colspan="[% (useqacontact AND usevotes) ? '5' : - ((useqacontact OR usevotes) ? '4' : '3') %]" - align="center" width="50%"> + <td colspan="[% num_columns FILTER html %]" align="center" width="50%"> <b>When my relationship to this [% terms.bug %] is:</b> </td> <td rowspan="2" width="40%"> @@ -174,8 +178,6 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb <tr> [% FOREACH relationship = relationships %] - [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] <th align="center" width="9%"> [% relationship.description FILTER html %] </th> @@ -186,18 +188,16 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% count = loop.count() %] <tr class="bz_row_[% count % 2 == 1 ? "odd" : "even" %]"> [% FOREACH relationship = relationships %] - [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] <td align="center"> <input type="checkbox" name="email-[% relationship.id %]-[% event.id %]" value="1" [%# The combinations don't always make sense; disable a couple %] [% IF event.id == constants.EVT_ADDED_REMOVED AND - (relationship.id == constants.REL_REPORTER OR - relationship.id == constants.REL_VOTER) %] + no_added_removed.contains(relationship.id) + %] disabled - [% ELSIF mail.${relationship.id}.${event.id} %] + [% ELSIF user.mail_settings.${relationship.id}.${event.id} %] checked [% END %]> </td> @@ -209,8 +209,7 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% END %] <tr> - <td colspan="[% (useqacontact AND usevotes) ? '5' : - ((useqacontact OR usevotes) ? '4' : '3') %]" + <td colspan="[% num_columns FILTER html %]" align="center" width="50%"> </td> @@ -223,13 +222,11 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb [% count = loop.count() %] <tr class="bz_row_[% count % 2 == 1 ? "odd" : "even" %]"> [% FOREACH relationship = relationships %] - [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] <td align="center"> <input type="checkbox" name="neg-email-[% relationship.id %]-[% event.id %]" value="1" - [% " checked" IF NOT mail.${relationship.id}.${event.id} %]> + [% " checked" IF NOT user.mail_settings.${relationship.id}.${event.id} %]> </td> [% END %] <td> @@ -240,29 +237,6 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb </table> -[%# Add hidden form fields for fields not used %] -[% FOREACH event = events %] - [% FOREACH relationship = relationships %] - [% IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - <input type="hidden" - name="email-[% relationship.id %]-[% event.id %]" - value="[% mail.${relationship.id}.${event.id} ? "1" : "0" %]"> - [% END %] - [% END %] -[% END %] - -[% FOREACH event = neg_events %] - [% FOREACH relationship = relationships %] - [% IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - <input type="hidden" - name="neg-email-[% relationship.id %]-[% event.id %]" - value="[% mail.${relationship.id}.${event.id} ? "0" : "1" %]"> - [% END %] - [% END %] -[% END %] - <hr> <b>User Watching</b> @@ -290,11 +264,17 @@ You are currently not watching any users. [% END %] </p> -<p><a name="new_watched_by_you" id="new_watched_by_you">Add users to my watch list (comma separated list)</a>: - <input size="60" name="new_watchedusers" value=""> +<p id="new_watched_by_you">Add users to my watch list (comma separated list): + [% INCLUDE global/userselect.html.tmpl + id => "new_watchedusers" + name => "new_watchedusers" + value => "" + size => 60 + multiple => 5 + %] </p> -<p><a name="watching_you" id="watching_you">Users watching you</a>:<br> +<p id="watching_you">Users watching you:<br> [% IF watchers.size %] [% FOREACH watcher = watchers %] [% watcher FILTER html %] <br> diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl index 71e411d..2e7d98c 100644 --- a/template/en/default/account/prefs/prefs.html.tmpl +++ b/template/en/default/account/prefs/prefs.html.tmpl @@ -50,11 +50,13 @@ link => "userprefs.cgi?tab=email", saveable => "1" }, { name => "saved-searches", label => "Saved Searches", link => "userprefs.cgi?tab=saved-searches", saveable => "1" }, - { name => "account", label => "Name and Password", + { name => "account", label => "Account Information", link => "userprefs.cgi?tab=account", saveable => "1" }, { 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 %] diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index f128613..6d87ade 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -31,9 +31,9 @@ var checkbox = document.getElementById(group.name.replace(/share_(\d+)/, "force_$1")); if (bz_isValueInArray(bless_groups, group.value)) { - checkbox.disabled = false; + YAHOO.util.Dom.removeClass(checkbox.parentNode, "bz_default_hidden"); } else { - checkbox.disabled = true; + YAHOO.util.Dom.addClass(checkbox.parentNode, "bz_default_hidden"); checkbox.checked = false; } } //--> @@ -132,12 +132,12 @@ [% END %] </select> [% IF user.can_bless %] - <input type="checkbox" id="force_[% q.id FILTER html %]" - name="force_[% q.id FILTER html %]" value="1" - [% " disabled" - IF !bless_group_ids.grep("^$q.shared_with_group.id\$").0 - %]> - <label for="force_[% q.id FILTER html %]">Add to footer</label> + <span [% IF !bless_group_ids.grep("^$q.shared_with_group.id\$").0 + %]class="bz_default_hidden"[% END %]> + <input type="checkbox" id="force_[% q.id FILTER html %]" + name="force_[% q.id FILTER html %]" value="1"> + <label for="force_[% q.id FILTER html %]">Add to footer</label> + </span> [% END %] [% IF q.shared_with_users %] (shared with [% q.shared_with_users FILTER html %] |