Skip to content

Commit

Permalink
Fix incorrect button rounding (#4862)
Browse files Browse the repository at this point in the history
.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
  • Loading branch information
natematykiewicz committed Apr 7, 2021
1 parent 0ca5385 commit 8d860cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/views/busy.erb
Expand Up @@ -78,9 +78,10 @@
<td><%= process['busy'] %></td>
<td>
<form method="POST">
<%= csrf_tag %>
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>

<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 %>
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
</div>
Expand Down

0 comments on commit 8d860cd

Please sign in to comment.