<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<div class='modal skinny' id='newBillingSubscriptionModal'>
	<%= render 'common/modal_header', title: "Movin' on up!" %>

	<div class='modal-body'>
		<% if current_role?(:super_admin) && @nonprofit %>
			<p><strong>Super admin mode</strong></p>
			<p><%= "Selected nonprofit: #{@nonprofit.name} (id #{@nonprofit.id})" %></p>
		<% end %>

		<form class='cardForm' parsley-validate>
			<!--= on 'submit' create_billing_sub -->

      <label class='u-marginBottom--15'>Please select monthly or annual billing</label>
      <!--= hide_if (eq plan.annual_dollars 0) -->

			<fieldset>
        <input name='interval' type='radio' value='monthly' id='planMonthlyInput' checked='checked'>
        <label for='planMonthlyInput'>$<!--= put plan.dollars --> monthly</label>
			</fieldset>

			<fieldset>
        <!--= hide_if (eq plan.annual_dollars 0) -->
        <input name='interval' type='radio' value='annual' id='planAnnualInput'>
        <label for='planAnnualInput'>$<!--= put plan.annual_dollars --> annual (10% off)</label>
			</fieldset>

			<%= render 'cards/fields' %>

      <input type='hidden' name='email' value="<%= nonprofit_email %>">

			<div class='u-centered u-marginTop--15'> <%= render 'cards/form_footer', hide_dedication: true %> </div>
		</form>
	</div>
</div>