diff options
author | David Lawrence <dlawrence@mozilla.com> | 2013-07-25 08:55:15 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-07-25 08:55:15 +0200 |
commit | 701e41d96429e68d8989b2063d02cd0d20a229ea (patch) | |
tree | c462cc86f7ade39cd11a5b27a279dbb4b4dba48e /extensions/TrackingFlags/template/en/default/hook | |
parent | b84db39863cd55166bff584265d255a0f882e64a (diff) | |
download | bugzilla-701e41d96429e68d8989b2063d02cd0d20a229ea.tar.gz bugzilla-701e41d96429e68d8989b2063d02cd0d20a229ea.tar.xz |
Bug 750742: Create new BMO extension called TrackingFlags to move current tracking flags away from custom fields
Diffstat (limited to 'extensions/TrackingFlags/template/en/default/hook')
15 files changed, 565 insertions, 0 deletions
diff --git a/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl new file mode 100644 index 000000000..4808da069 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl @@ -0,0 +1,18 @@ +[%# 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 user.in_group('admin') %] + <dt id="push"> + <a href="page.cgi?id=tracking_flags_admin_list.html">Release Tracking Flags</a> + </dt> + <dd> + Tracking flags are special multi-value fields used to aid tracking releases + of Firefox, Firefox OS, Thunderbird, and other projects. + </dd> +[% END %] + diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl new file mode 100644 index 000000000..2a90cbfe3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl @@ -0,0 +1,33 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + <tr> + <td> + <table class="tracking_flags"> + <tr> + <th> + [% type.description FILTER html %]: + </th> + </tr> + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] + </table> + </td> + </tr> + [% END %] +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl new file mode 100644 index 000000000..59fe1d0ec --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl @@ -0,0 +1,63 @@ +[%# 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 tracking_flags.size %] + [% tracking_flag_names = [] %] + [% FOREACH flag = tracking_flags %] + [% tracking_flag_names.push(flag.name) %] + [% END %] + + <script type="text/javascript"> + [% js_filtered_names = [] %] + [% FOREACH flag = tracking_flag_names %] + [% js_filtered = flag FILTER js %] + [% js_filtered_names.push(js_filtered) %] + [% END %] + var tracking_flag_names = ['[% js_filtered_names.join("','") FILTER none %]']; + var tracking_flags = new Array([% product.components.size %]); + + [% count = 0 %] + [% FOREACH c = product.components %] + [% NEXT IF NOT c.is_active %] + [% tracking_flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% FOREACH v = flag.visibility %] + [% IF v.product_id == product.id + && (!v.component_id.defined || v.component_id == c.id) %] + [% tracking_flag_list.push(flag.name) %] + [% END %] + [% END %] + [% END %] + [% js_filtered_flags = [] %] + [% FOREACH flag = tracking_flag_list %] + [% js_filtered = flag FILTER js %] + [% js_filtered_flags.push(js_filtered) %] + [% END %] + tracking_flags[[% count %]] = ['[% js_filtered_flags.join("','") FILTER none %]']; + [% count = count + 1 %] + [% END %] + + function update_tracking_flags () { + var component = document.getElementById('component'); + // First, we disable all flags. + for (var i = 0; i < tracking_flag_names.length; i++) { + var flagField = document.getElementById(tracking_flag_names[i]); + flagField.disabled = true; + } + // Now enable flags available for the selected component. + var index = component.selectedIndex; + for (var i = 0; i < tracking_flags[index].length; i++) { + var flagField = document.getElementById(tracking_flags[index][i]); + flagField.disabled = false; + } + } + + YAHOO.util.Event.onDOMReady(update_tracking_flags); + YAHOO.util.Event.addListener("component", "change", update_tracking_flags); + </script> +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl new file mode 100644 index 000000000..662bc26ee --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'project' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl new file mode 100644 index 000000000..69827a87a --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'tracking' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl new file mode 100644 index 000000000..2a90cbfe3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl @@ -0,0 +1,33 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + <tr> + <td> + <table class="tracking_flags"> + <tr> + <th> + [% type.description FILTER html %]: + </th> + </tr> + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] + </table> + </td> + </tr> + [% END %] +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl new file mode 100644 index 000000000..662bc26ee --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'project' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl new file mode 100644 index 000000000..69827a87a --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'tracking' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] 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 new file mode 100644 index 000000000..697db75ce --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl @@ -0,0 +1,191 @@ +[%# 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. + #%] + +[%# Old style custom field based tracking flags %] +[% old_tracking_flags = [] %] +[% old_project_flags = [] %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>2) %] + [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] + [% NEXT IF NOT user.id AND bug.${field.name} == "---" %] + [% NEXT IF cf_flag_disabled(field.name, bug) %] + [% IF cf_is_project_flag(field.name) %] + [% old_project_flags.push(field) %] + [% ELSE %] + [% old_tracking_flags.push(field) %] + [% END %] +[% END %] + +[%# Add in the new tracking flags that are type tracking or project %] +[% new_tracking_flags = [] %] +[% new_project_flags = [] %] +[% IF tracking_flags.size %] + [% FOREACH flag = tracking_flags %] + [% IF flag.flag_type == 'tracking' %] + [% new_tracking_flags.push(flag) %] + [% END %] + [% IF flag.flag_type == 'project' %] + [% new_project_flags.push(flag) %] + [% END %] + [% END %] +[% END %] + +[% IF old_project_flags.size || new_project_flags.size %] + <tr> + <td class="field_label"> + <label>Project Flags:</label> + </td> + <td> + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + <table class="tracking_flags"> + [% FOREACH field = old_project_flags %] + [% NEXT IF NOT user.id AND field.value == "---" %] + <tr id="row_[% field.name FILTER js %]"> + <td> + <label for="[% field.name FILTER html %]"> + [% field_descs.${field.name} FILTER html %]: + </label> + </td> + <td> + [% PROCESS bug/field.html.tmpl value = bug.${field.name} + editable = user.id + no_tds = 1 %] + [% IF user.id %] + <span id="ro_[% field.name FILTER html %]" class="bz_default_hidden"> + [% bug.${field.name} FILTER html %] + </span> + [% END %] + </td> + </tr> + [% END %] + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = new_project_flags %] + </table> + [% ELSE %] + [% FOREACH field = old_project_flags %] + [% NEXT IF bug.${field.name} == "---" %] + [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br> + [% END %] + [% FOREACH flag = project_flags %] + [% NEXT IF flag.bug_flag.value == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br> + [% END %] + [% END %] + </td> + </tr> +[% END %] + +[% IF old_tracking_flags.size || new_tracking_flags.size %] + <tr> + <td class="field_label"> + <label>Tracking Flags:</label> + </td> + <td> + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + [% IF user.id %] + <span id="edit_tracking_flags_action"> + (<a href="#" name="tracking" class="edit_tracking_flags_link">edit</a>) + </span> + [% END %] + <table class="tracking_flags"> + [% FOREACH field = old_tracking_flags %] + [% NEXT IF NOT user.id AND field.value == "---" %] + <tr id="row_[% field.name FILTER js %]"> + <td> + <label for="[% field.name FILTER html %]"> + [% field_descs.${field.name} FILTER html %]: + </label> + </td> + <td> + [% PROCESS bug/field.html.tmpl + value = bug.${field.name} + editable = user.id + no_tds = 1 + %] + [% IF user.id %] + <span id="ro_[% field.name FILTER html %]" class="bz_default_hidden"> + [% bug.${field.name} FILTER html %] + </span> + [% END %] + </td> + </tr> + [% END %] + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = new_tracking_flags %] + </table> + [% ELSE %] + [% FOREACH field = old_tracking_flags %] + [% NEXT IF bug.${field.name} == "---" %] + [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br> + [% END %] + [% FOREACH flag = new_tracking_flags %] + [% NEXT IF flag.status == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br> + [% END %] + [% END %] + </td> + </tr> + <script type="text/javascript"> + TrackingFlags.flags['tracking'] = {}; + [% FOREACH field = old_tracking_flags %] + TrackingFlags.flags['tracking']['[% field.name FILTER js %]'] = '[% bug.${field.name} FILTER js %]'; + [% END %] + [% FOREACH flag = new_tracking_flags %] + TrackingFlags.flags['tracking']['[% flag.name FILTER js %]'] = '[% flag.bug_flag.value FILTER js %]'; + [% END %] + TrackingFlags.types.push('tracking'); + </script> +[% END %] + +[%# Last, display any new style flags that are not type tracking or project %] +[% IF tracking_flags.size %] + [% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% 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 %] + [% END %] + </td> + </tr> + [% END %] + [% END %] +[% END %] + +<script type="text/javascript"> + hide_tracking_flags(); +</script> diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl new file mode 100644 index 000000000..f598609e8 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl @@ -0,0 +1,38 @@ +[%# 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. + #%] + +<input type="hidden" id="[% field.name FILTER html %]_dirty"> +<select id="[% field.name FILTER html %]" + name="[% field.name FILTER html %]"> + [% IF allow_dont_change %] + <option value="[% dontchange FILTER html %]" + [% ' selected="selected"' IF value == dontchange %]> + [% dontchange FILTER html %] + </option> + [% END %] + [% FOREACH legal_value = field.values %] + [% IF legal_value.name != value %] + [% NEXT IF !field.can_set_value(legal_value.name) %] + [% NEXT IF !legal_value.is_active %] + [% END %] + <option value="[% legal_value.name FILTER html %]" + id="v[% legal_value.id FILTER html %] [%- field.name FILTER html %]" + [% IF legal_value.name == value %] + selected="selected" + [% END %]> + [%- display_value(field.name, legal_value.name) FILTER html ~%] + </option> + [% END %] +</select> +<script type="text/javascript"> +<!-- + initHidingOptionsForIE('[% field.name FILTER js %]'); + [%+ INCLUDE "bug/field-events.js.tmpl" + field = field, product = bug.product_obj %] +//--> +</script> diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl new file mode 100644 index 000000000..8fa1f1623 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl @@ -0,0 +1,9 @@ +[%# 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. + #%] + +[% display_value(field.name, value) FILTER html %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl new file mode 100644 index 000000000..5e4ef2fcb --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl @@ -0,0 +1,10 @@ +[%# 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. + #%] + +[% javascript_urls.push('extensions/TrackingFlags/web/js/tracking_flags.js') %] +[% style_urls.push('extensions/TrackingFlags/web/styles/edit_bug.css') %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl new file mode 100644 index 000000000..2d462ebaf --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl @@ -0,0 +1,26 @@ +[%# 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 error == "tracking_flags_invalid_product" %] + [% title = "Invalid Product" %] + The product named '[% product FILTER html %]' does not exist. + +[% ELSIF error == "tracking_flags_invalid_component" %] + [% title = "Invalid Component" %] + The component named '[% component FILTER html %]' does not exist. + +[% ELSIF error == "tracking_flags_invalid_item_id" %] + [% title = "Invalid " _ item _ " ID" %] + Invalid [% item FILTER html %] ID ([% id FILTER html %]). + +[% ELSIF error == "tracking_flags_invalid_param" %] + [% title = "Invalid Parameter Provided" %] + An invalid parameter '[% value FILTER html %]' + for '[% name FILTER html %]' was provided. + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl new file mode 100644 index 000000000..45bb7332c --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl @@ -0,0 +1,15 @@ +[%# 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 message_tag == 'tracking_flags_created' %] + The tracking flag has been created. + +[% ELSIF message_tag == 'tracking_flags_updated' %] + The tracking flag has been updated. + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl new file mode 100644 index 000000000..f17df1bdf --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl @@ -0,0 +1,57 @@ +[%# 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 error == "tracking_flags_change_denied" %] + [% title = "Tracking Flag Modification Denied" %] + You tried to update the status of the tracking flag '[% flag.name FILTER html %]' + [% IF value %] to '[% value.name FILTER html %]'[% END %]. + Only a user with the required permissions may make this change. + +[% ELSIF error == "tracking_flags_missing_mandatory" %] + [% IF fields.size == 1 %] + [% title = "Missing mandatory field" %] + The field "[% fields.first FILTER html %]" is mandatory, and must be provided. + [% ELSE %] + [% title = "Missing mandatory fields" %] + The following fields are mandatory, and must be provided: + [%+ fields.join(', ') FILTER html %] + [% END %] + +[% ELSIF error == "tracking_flags_cf_prefix" %] + [% title = "Invalid flag name" %] + The flag name must start with 'cf_'. + +[% ELSIF error == "tracking_flags_duplicate_field" %] + [% title = "Duplicate field" %] + A tracking flag field named "[% name FILTER html %]" already exists. + +[% ELSIF error == "tracking_flags_missing_values" %] + [% title = "Missing values" %] + You must provide at least one value. + +[% ELSIF error == "tracking_flags_missing_value" %] + [% title = "Missing value" %] + You must provied the value for all values. + +[% ELSIF error == "tracking_flags_duplicate_value" %] + [% title = "Duplicate value" %] + The value "[% value FILTER html %]" has been provided more than once. + +[% ELSIF error == "tracking_flags_missing_visibility" %] + [% title = "Missing visibility" %] + You must provide at least one product for visibility. + +[% ELSIF error == "tracking_flags_duplicate_visibility" %] + [% title = "Duplicate visibility" %] + The visibility '[% name FILTER html %]' has been provided more than once. + +[% ELSIF error == "tracking_flags_invalid_flag_type" %] + [% title = "Invalid flag type" %] + The flag type '[% type FILTER html %]' is invalid. + +[% END %] |