Skip to content

Commit

Permalink
Use bootstrap switch for preview toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Nov 13, 2023
1 parent fbfa6f5 commit 327f724
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
8 changes: 0 additions & 8 deletions app/assets/stylesheets/annotations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
#annotation-modal-content {
width: 100%;
}
#preview-toggle {
input:checked + .slider {
background-color: #0D6EFD;
}
.switch {
vertical-align: middle;
}
}
#annotation-modal-preview {
height: 543px;
width: 35%;
Expand Down
11 changes: 5 additions & 6 deletions app/views/annotations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
<%= f.text_area :comment, class: 'form-control' %>

<!--- PREVIEW TOGGLE -->
<div id="preview-toggle">
<label class="switch">
<input id="preview-toggle-check" type="checkbox">
<span class="slider round"></span>
<div class="form-check form-switch pt-2" id="preview-toggle">
<input id="preview-toggle-check"
class="form-check-input" type="checkbox" role="switch">
<label class="form-check-label" for="preview-toggle-check">
<%= t('admin.remark.preview') %>
</label>
&nbsp
<%= t('admin.remark.preview') %>
</div>

<!--- COLOR SELECTION -->
Expand Down

0 comments on commit 327f724

Please sign in to comment.