Skip to content

Commit

Permalink
Merge pull request #938 from alphagov/fix-bulk-actions
Browse files Browse the repository at this point in the history
Fix enabling/disabling of signature bulk actions in admin view
  • Loading branch information
pixeltrix authored May 28, 2024
2 parents f734eb6 + fd0442f commit e49b488
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/assets/stylesheets/petitions/_basic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ input[type="search"] {
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
margin-right: 2px;
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/archived/signatures/_signature.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td class="petition-id">
<label>
<%= check_box_tag 'id', signature.id, false, disabled: signature.creator? %>
<%= check_box_tag 'id', signature.id, false, disabled: signature.creator?, id: dom_id(signature) %>
</label>
</td>
<td class="petition-details">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/archived/signatures/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

$checked.each(function() {
var $tr = $(this).closest('tr');
var $action = $tr.find('input[type=submit].' + action + '-action');
var $action = $tr.find('button.' + action + '-action');

if ($action.length == 0) {
disabled = true;
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/signatures/_signature.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<tr>
<td class="petition-id">
<label><%= check_box_tag 'id', signature.id, false, disabled: signature.creator? %></label>
<label><%= check_box_tag 'id', signature.id, false, id: dom_id(signature), disabled: signature.creator? %></label>
</td>
<td class="petition-details">
<p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/signatures/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

$checked.each(function() {
var $tr = $(this).closest('tr');
var $action = $tr.find('input[type=submit].' + action + '-action');
var $action = $tr.find('button.' + action + '-action');

if ($action.length == 0) {
disabled = true;
Expand Down

0 comments on commit e49b488

Please sign in to comment.