Files
growstuff/app/views/seeds/_modal.html.haml
T
Brenda WallaceandClaude Sonnet 5 a9193dc988 Use Bootstrap 5 close buttons and alert-dismissible
.close with a times character -> .btn-close (which draws its own cross), with an
aria-label on each. The alert helper said alert-dismissable, Bootstrap 3's
spelling; Bootstrap 5 needs alert-dismissible for the close button's spacing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 18:03:36 +12:00

35 lines
1.3 KiB
Plaintext

#modelSeedForm.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", role: "dialog", tabindex: "-1"}
.modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.fw-bold
= seed_icon
Save #{seed.crop.name} seeds
%button.btn-close{"aria-label" => "Close", "data-bs-dismiss" => "modal", type: "button"}
.modal-body
%h4 You are adding seeds to your stash
%h5 Will you offer these seeds for trade?
%hr/
%p Yes, I would be willing trade these from #{current_member.location}
.btn-group.d-grid.flex-column{"aria-label" => "trade to", role: "group"}
- Seed::TRADABLE_TO_VALUES.reverse.each do |t|
- unless t == 'nowhere'
= button_to seeds_path(seed: {crop_id: seed.crop_id, tradable_to: t}), method: :post, class: 'btn col-12' do
= t
%hr/
%p
= icon('fas', 'no')
No, I don't want to trade.
= button_to seeds_path(seed: {crop_id: seed.crop_id, tradable_to: 'nowhere'}), method: :post, class: 'btn' do
Save #{seed.crop_name} seeds.
%a.btn{"data-bs-target" => "#modelSeedForm", "data-bs-toggle" => "modal", href: ""}
= seed_icon
Save seeds