Cleanup: apply classes to <form>, remove extra div
This commit is contained in:
@@ -6,18 +6,16 @@
|
||||
|
||||
<% if board.published? %>
|
||||
<div class="border-radius pad fill-selected">
|
||||
<%= form_with url: board_publication_path(board), method: :delete, data: { controller: "form" } do |form| %>
|
||||
<div class="flex-inline center justify-between gap">
|
||||
<label class="flex gap">
|
||||
<span class="txt-large"><%= icon_tag "lock" %></span>
|
||||
<span class="switch flex align-center justify-between">
|
||||
<%= form.check_box :published, class: "switch__input", checked: true, data: { action: "change->form#submit" }, disabled: !Current.user.can_administer_board?(@board) %>
|
||||
<span class="switch__btn round"></span>
|
||||
</span>
|
||||
<span class="for-screen-reader">Turn off the public link</span>
|
||||
</label>
|
||||
<span class="txt-large" aria-hidden="true"><%= icon_tag "world" %></span>
|
||||
</div>
|
||||
<%= form_with url: board_publication_path(board), method: :delete, class: "flex-inline center justify-between gap", data: { controller: "form" } do |form| %>
|
||||
<label class="flex gap">
|
||||
<span class="txt-large"><%= icon_tag "lock" %></span>
|
||||
<span class="switch flex align-center justify-between">
|
||||
<%= form.check_box :published, class: "switch__input", checked: true, data: { action: "change->form#submit" }, disabled: !Current.user.can_administer_board?(@board) %>
|
||||
<span class="switch__btn round"></span>
|
||||
</span>
|
||||
<span class="for-screen-reader">Turn off the public link</span>
|
||||
</label>
|
||||
<span class="txt-large" aria-hidden="true"><%= icon_tag "world" %></span>
|
||||
<% end %>
|
||||
|
||||
<div class="flex align-center gap-half margin-block">
|
||||
@@ -42,18 +40,16 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="border-radius pad fill-shade">
|
||||
<%= form_with url: board_publication_path(board), method: :post, data: { controller: "form" } do |form| %>
|
||||
<div class="flex-inline center justify-between gap">
|
||||
<span class="txt-large" aria-hidden="true"><%= icon_tag "lock" %></span>
|
||||
<label class="flex gap">
|
||||
<span class="switch flex align-center justify-between">
|
||||
<%= form.check_box :published, class: "switch__input", checked: false, data: { action: "change->form#submit" }, disabled: !Current.user.can_administer_board?(@board) %>
|
||||
<span class="switch__btn round"></span>
|
||||
</span>
|
||||
<span class="txt-large"><%= icon_tag "world" %></span>
|
||||
<span class="for-screen-reader">Turn on the public link</span>
|
||||
</label>
|
||||
</div>
|
||||
<%= form_with url: board_publication_path(board), method: :post, class: "flex-inline center justify-between gap", data: { controller: "form" } do |form| %>
|
||||
<span class="txt-large" aria-hidden="true"><%= icon_tag "lock" %></span>
|
||||
<label class="flex gap">
|
||||
<span class="switch flex align-center justify-between">
|
||||
<%= form.check_box :published, class: "switch__input", checked: false, data: { action: "change->form#submit" }, disabled: !Current.user.can_administer_board?(@board) %>
|
||||
<span class="switch__btn round"></span>
|
||||
</span>
|
||||
<span class="txt-large"><%= icon_tag "world" %></span>
|
||||
<span class="for-screen-reader">Turn on the public link</span>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user