Files
sure/app/views/subscriptions/_plan_choice.html.erb
Juan José Mata 4e425ce4e5 Add option for FOSS contribution payments (#730)
* First commit

* Use subscription flow for monetary contributions

* Removed only part of the SPAN

* Localize Stripe payments message

* More localization of contribution strings

* Missed two billing to payment changes

* Fix tests

* Localization of "Open Demo" strings

* Fix grammar error

* Update for consistency

* Localize CTA

* More localilzation strings
2026-01-21 20:45:04 +01:00

28 lines
989 B
Plaintext

<%# locals: (plan:, form:, checked: false) %>
<% price = plan == "annual" ? 25 : 2.50 %>
<% frequency = plan == "annual" ? "/year" : "/month" %>
<div class="relative">
<%= form.radio_button :plan, plan, class: "peer sr-only", checked: checked %>
<%= form.label "plan_#{plan}", class: class_names(
"flex flex-col gap-1 p-4 cursor-pointer rounded-lg border border-primary hover:bg-container",
"peer-checked:bg-container peer-checked:rounded-2xl peer-checked:border-solid peer-checked:ring-4 peer-checked:ring-shadow",
"transition-all duration-300"
) do %>
<h3 class="text-sm text-secondary"><%= plan.titleize %></h3>
<div class="mt-auto flex items-end gap-1">
<p class="font-display text-xl lg:text-3xl font-medium text-primary">$<%= price %><%= frequency %></p>
</div>
<p class="text-sm text-secondary">
<% if plan == "annual" %>
Charged annually
<% else %>
Charged monthly
<% end %>
</p>
<% end %>
</div>