diff options
author | Byron Jones <glob@mozilla.com> | 2014-07-22 09:23:21 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-07-22 09:23:21 +0200 |
commit | bff9f8e135cdf6e72228d7502cf160b3bdd9bde4 (patch) | |
tree | da82f0b3b2b4e3d44b4c4bf00be9f07854f15717 /extensions/TrackingFlags/template/en/default | |
parent | 235190a76c418d89f808f48d174bdcde5add4073 (diff) | |
download | bugzilla-bff9f8e135cdf6e72228d7502cf160b3bdd9bde4.tar.gz bugzilla-bff9f8e135cdf6e72228d7502cf160b3bdd9bde4.tar.xz |
Bug 713307: Please add FlagTypeComments for tracking/approval flags
Diffstat (limited to 'extensions/TrackingFlags/template/en/default')
4 files changed, 49 insertions, 41 deletions
diff --git a/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl b/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl index b2b6efca7..4e2c97dfa 100644 --- a/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl +++ b/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl @@ -30,7 +30,8 @@ [% IF user.id %] <input type="hidden" id="[% flag.name FILTER html %]_dirty"> <select id="[% flag.name FILTER html %]" - name="[% flag.name FILTER html %]"> + name="[% flag.name FILTER html %]" + onchange="tracking_flag_change(this)"> [% FOREACH value = flag.values %] [% IF new_bug || value.name != flag_bug_value %] [% NEXT IF !value.is_active || !flag.can_set_value(value.name) %] @@ -55,3 +56,7 @@ </td> </tr> [% END %] + +<script type="text/javascript"> + TrackingFlags = [% tracking_flags_json FILTER none %]; +</script> diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl index e0411b512..b66bd3df4 100644 --- a/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl +++ b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl @@ -6,49 +6,41 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% IF tracking_flags.size %] - [% FOREACH type = tracking_flag_types %] - [% flag_list = [] %] - [% FOREACH flag = tracking_flags %] - [% flag_list.push(flag) IF flag.flag_type == type.name %] - [% END %] - [% IF flag_list.size %] - <tr> - <td class="field_label"> - <label>[% type.description FILTER html %]:</label> - </td> - <td> - [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] - [% IF user.id && type.collapsed %] - <span id="edit_[% type.name FILTER html %]_flags_action"> - (<a href="#" name="[% type.name FILTER html %]" class="edit_tracking_flags_link">edit</a>) - </span> - [% END %] - <table class="tracking_flags"> - [% INCLUDE bug/tracking_flags.html.tmpl - flag_list = flag_list %] - </table> - [% IF type.collapsed %] - <script type="text/javascript"> - TrackingFlags.flags['[% type.name FILTER js %]'] = {}; - [% FOREACH flag = flag_list %] - TrackingFlags.flags['[% type.name FILTER js %]']['[% flag.name FILTER js %]'] = '[% flag.bug_flag.value FILTER js %]'; - [% END %] - TrackingFlags.types.push('[% type.name FILTER js %]'); - </script> - [% END %] - [% ELSE %] - [% FOREACH flag = flag_list %] - [% NEXT IF flag.status == '---' %] - [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br> - [% END %] +[% RETURN UNLESS tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + <tr> + <td class="field_label"> + <label>[% type.description FILTER html %]:</label> + </td> + <td> + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + [% IF user.id && type.collapsed %] + <span id="edit_[% type.name FILTER html %]_flags_action"> + (<a href="#" name="[% type.name FILTER html %]" class="edit_tracking_flags_link">edit</a>) + </span> + [% END %] + <table class="tracking_flags"> + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list %] + </table> + [% ELSE %] + [% FOREACH flag = flag_list %] + [% NEXT IF flag.status == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br> [% END %] - </td> - </tr> - [% END %] + [% END %] + </td> + </tr> [% END %] [% END %] <script type="text/javascript"> + TrackingFlags = [% tracking_flags_json FILTER none %]; hide_tracking_flags(); </script> diff --git a/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl new file mode 100644 index 000000000..2bf1c75c3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl @@ -0,0 +1,11 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF template.name == "bug/create/create.html.tmpl" && tracking_flags.size %] + [% javascript_urls.push('extensions/TrackingFlags/web/js/tracking_flags.js') %] +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl index 12c8d2c3b..60406490f 100644 --- a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl +++ b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl @@ -78,7 +78,7 @@ var selected_components = [ <option value=""></option> [% FOREACH type = tracking_flag_types %] <option value="[% type.name FILTER html %]" - [% 'selected="selected"' IF flag.flag_type == type.name %]> + [% " selected" IF flag.flag_type == type.name %]> [% type.name FILTER html %]</option> [% END %] </select> |