Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new pet tooltip #1220 #1267

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions app/views/organizations/staff/pets/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,27 @@
</div>

<div class='form-group'>
<div class="form-check form-switch ps-3">
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="If applications are paused the public can see the pet, but cannot submit an adoption application.">
<div class="form-check form-switch ps-3">
<%= form.hidden_field :application_paused, value: false %>
<%= form.check_box :application_paused, { class: "form-check-input", role: "switch", id: "flexSwitchCheckChecked" }, true, false %>
</div>
</div>
</span>

<div class="form-check form-switch ps-3">
<%= form.hidden_field :published, value: false %>
<%= form.check_box :published, { class: "form-check-input", role: "switch", required: false }, true, false %>
</div>
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="If a pet is published it is visible to the public.">
<div class="form-check form-switch ps-3">
<%= form.hidden_field :published, value: false %>
<%= form.check_box :published, { class: "form-check-input", role: "switch", required: false }, true, false %>
</div>
</span>
</div>

<%= form.submit t('general.save'), class: 'btn btn-primary' %>
<%= link_to t('general.cancel'), staff_pets_path, class: 'btn btn-secondary' %>
<% end %>
</div>
</div> <!--row-->
<script type="module">
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
disabled><%=t("organizations.staff.pets.applications.new_adoption")%></button>
</span>
<% end %>
<script type="module">
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
Loading