summaryrefslogtreecommitdiffstats
path: root/extensions/UserStory/template/en/default/hook/bug
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2014-01-20 07:07:09 +0100
committerDave Lawrence <dlawrence@mozilla.com>2014-01-20 07:07:09 +0100
commit74de7ef88ebcf091dc4d2122c6baa9611ab9f7e0 (patch)
treedff3be13ab2da5fc2dcb09ac52d1d7a3da72c276 /extensions/UserStory/template/en/default/hook/bug
parent98a6885065b7e53e9b8ec2e402ef24924801723f (diff)
downloadbugzilla-74de7ef88ebcf091dc4d2122c6baa9611ab9f7e0.tar.gz
bugzilla-74de7ef88ebcf091dc4d2122c6baa9611ab9f7e0.tar.xz
Bug 958335 - Add comment button to user story field
r=glob
Diffstat (limited to 'extensions/UserStory/template/en/default/hook/bug')
-rw-r--r--extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl19
1 files changed, 19 insertions, 0 deletions
diff --git a/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl
index 0f5c0bcd6..a0240471d 100644
--- a/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl
+++ b/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl
@@ -10,6 +10,18 @@
[% can_edit_story = bug.check_can_change_field('cf_user_story', 0, 1) %]
<div class="user_story">
+ <script type="text/javascript">
+ function userStoryComment() {
+ var commenttext = "(Commenting on User Story)\n";
+ var text_elem = document.getElementById('user_story');
+ var commenttext = commenttext + wrapReplyText(text_elem.value);
+ var textarea = document.getElementById('comment');
+ if (textarea.value != commenttext) {
+ textarea.value += commenttext;
+ }
+ textarea.focus();
+ }
+ </script>
<div id="user_story_header">
<b>User Story</b>
[% IF can_edit_story %]
@@ -17,6 +29,13 @@
(<a href="javascript:void(0)" id="user_story_edit_action" >edit</a>)
</span>
[% END %]
+ [% IF bug.cf_user_story != "" %]
+ <span id="user_story_comment">
+ [<a class="bz_reply_link" href="#user_story_comment"
+ onclick="userStoryComment(); return false;"
+ >comment</a>]
+ </span>
+ [% END %]
</div>
[% IF bug.cf_user_story != "" %]