Pass work_time to create attachment form
parent
76be373f40
commit
ad5c5b6814
|
@ -515,6 +515,7 @@ sub enter
|
||||||
my $comment = $ARGS->{comment};
|
my $comment = $ARGS->{comment};
|
||||||
$comment = '' unless defined $comment;
|
$comment = '' unless defined $comment;
|
||||||
$vars->{commenttext} = $comment;
|
$vars->{commenttext} = $comment;
|
||||||
|
$vars->{work_time} = $ARGS->{work_time};
|
||||||
|
|
||||||
# Generate and return the UI (HTML page) from the appropriate template.
|
# Generate and return the UI (HTML page) from the appropriate template.
|
||||||
Bugzilla->template->process("attachment/create.html.tmpl", $vars)
|
Bugzilla->template->process("attachment/create.html.tmpl", $vars)
|
||||||
|
|
18
js/bug.js
18
js/bug.js
|
@ -493,10 +493,20 @@ function to_attachment_page(link)
|
||||||
var form = document.createElement('form');
|
var form = document.createElement('form');
|
||||||
form.action = link.href;
|
form.action = link.href;
|
||||||
form.method = 'post';
|
form.method = 'post';
|
||||||
var textarea = document.createElement('textarea');
|
var e = document.createElement('input');
|
||||||
textarea.name = "comment";
|
e.type = 'hidden';
|
||||||
textarea.value = document.getElementById('comment_textarea').value;
|
e.name = 'comment';
|
||||||
form.appendChild(textarea);
|
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);
|
document.body.appendChild(form);
|
||||||
form.submit();
|
form.submit();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="work_time">Hours Worked:</label></th>
|
<th><label for="work_time">Hours Worked:</label></th>
|
||||||
<td><input type="text" size="10" value="0.0" name="work_time" id="work_time" /></td>
|
<td><input type="text" size="10" value="[% work_time || '0.0' %]" name="work_time" id="work_time" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="comment">Comment:</label></th>
|
<th><label for="comment">Comment:</label></th>
|
||||||
|
|
Loading…
Reference in New Issue