1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Fix incorrect button rounding (#4862)

.btn-group uses :first-child and :last-child to determine which
buttons should have rounded corners and which ones should have
square corners. The "Quiet" button had a square left corner,
because the first child was a CSRF hidden field tag.

Keeping only .btn elements inside the .btn-group means that the
1 or 2 buttons are rounded as expected. When there's no "Quiet"
button, the "Stop" button has 4 round corners. When both buttons
are present, the corners between the buttons are square.

Fixes #4858
This commit is contained in:
Nate Matykiewicz 2021-04-06 23:00:37 -05:00 committed by GitHub
parent 0ca5385439
commit 8d860cd58e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,9 +78,10 @@
<td><%= process['busy'] %></td> <td><%= process['busy'] %></td>
<td> <td>
<form method="POST"> <form method="POST">
<%= csrf_tag %>
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
<div class="btn-group pull-right flip"> <div class="btn-group pull-right flip">
<%= csrf_tag %>
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
<% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %> <% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button> <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
</div> </div>