From c4da32d7639e12f7c9e07f95f093cadca8b23b42 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 28 Apr 2014 14:30:33 +0000 Subject: Bug 963793 - fix to have user story field available on bug creation r=glob --- .../create/create-after_custom_fields.html.tmpl | 76 ++++++++++++++++++++++ .../hook/bug/create/create-custom_field.html.tmpl | 12 ++++ .../default/hook/bug/edit-custom_field.html.tmpl | 4 +- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl create mode 100644 extensions/UserStory/template/en/default/hook/bug/create/create-custom_field.html.tmpl (limited to 'extensions/UserStory/template/en/default/hook') diff --git a/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl new file mode 100644 index 000000000..cd05d84de --- /dev/null +++ b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl @@ -0,0 +1,76 @@ +[%# 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 UNLESS default.user_story_group.0 && default.check_can_change_field('cf_user_story', 0, 1) %] + + + + + + + +
+ + (edit) + +
+
+ [% INCLUDE global/textarea.html.tmpl + name = 'cf_user_story' + id = 'user_story' + minrows = 10 + maxrows = 10 + cols = constants.COMMENT_COLS + disabled = 1 + %] +
+ + + + diff --git a/extensions/UserStory/template/en/default/hook/bug/create/create-custom_field.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/create/create-custom_field.html.tmpl new file mode 100644 index 000000000..4d809e4a2 --- /dev/null +++ b/extensions/UserStory/template/en/default/hook/bug/create/create-custom_field.html.tmpl @@ -0,0 +1,12 @@ +[%# 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. + #%] + +[%# user story gets custom handling %] +[% IF field.name == 'cf_user_story' %] + [% field.hidden = 1 %] +[% END %] diff --git a/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl index 2f0f758a4..2e8762dbe 100644 --- a/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl +++ b/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl @@ -6,4 +6,6 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% field.hidden = field.name == 'cf_user_story' %] +[% IF field.name == 'cf_user_story' %] + [% field.hidden = 1 %] +[% END %] -- cgit v1.2.3-24-g4f1b