diff --git a/attachment.cgi b/attachment.cgi index 3d90c638d..973b8883b 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -515,6 +515,7 @@ sub enter my $comment = $ARGS->{comment}; $comment = '' unless defined $comment; $vars->{commenttext} = $comment; + $vars->{work_time} = $ARGS->{work_time}; # Generate and return the UI (HTML page) from the appropriate template. Bugzilla->template->process("attachment/create.html.tmpl", $vars) diff --git a/js/bug.js b/js/bug.js index dca04336e..355457c0e 100644 --- a/js/bug.js +++ b/js/bug.js @@ -493,10 +493,20 @@ function to_attachment_page(link) var form = document.createElement('form'); form.action = link.href; form.method = 'post'; - var textarea = document.createElement('textarea'); - textarea.name = "comment"; - textarea.value = document.getElementById('comment_textarea').value; - form.appendChild(textarea); + var e = document.createElement('input'); + e.type = 'hidden'; + e.name = 'comment'; + e.value = document.getElementById('comment_textarea').value; + form.appendChild(e); + var w = document.getElementById('work_time'); + if (w) + { + e = document.createElement('input'); + e.type = 'hidden'; + e.name = 'work_time'; + e.value = w.value; + form.appendChild(e); + } document.body.appendChild(form); form.submit(); return false; diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index a3808bd8e..6a2be85c1 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -145,7 +145,7 @@ - +