Skip to content

Commit

Permalink
[webui] Fix unwanted submit actions (submitter as maintainer and
Browse files Browse the repository at this point in the history
forward).
  • Loading branch information
saschpe committed Mar 21, 2012
1 parent cba5576 commit fdd1c76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webui/app/views/request/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@
<% javascript_tag do %>
$('#accept_request_button').click(function (data) {
/* Add some hidden elements to carry HTML form data that is found at other DOM places for design reasons. */
if ($('.submitter_is_maintainer_checkbox').size() != 0) {
if ($('.submitter_is_maintainer_checkbox').size() != 0 &&
$('.submitter_is_maintainer_checkbox').is(':checked')) {
additional_element = '<input id="' + $('.submitter_is_maintainer_checkbox').attr('id') +
'" name="' + $('.submitter_is_maintainer_checkbox').attr('name') +
'" type="hidden" value="' + $('.submitter_is_maintainer_checkbox').attr('value') + '"/>'
$('#request_handle_form p:last').append(additional_element);
}
if ($('.forward_checkbox').size() != 0) {
if ($('.forward_checkbox').size() != 0 &&
$('.forward_checkbox').is(':checked')) {
$('.forward_checkbox').each(function (index) {
additional_element = '<input id="' + $(this).attr('id') +
'" name="' + $(this).attr('name') +
Expand Down

0 comments on commit fdd1c76

Please sign in to comment.