houdini/app/views/supporters/_manual_address_fields.html.erb

34 lines
1.6 KiB
Text
Raw Normal View History

2020-06-12 20:03:43 +00:00
<%- # 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 -%>
<section class='group pastelBox--grey u-padding--5'>
<!--= def 'selected_usa' true -->
<label style='display: none' class='u-centered u-marginBottom--5'>Shipping address (required)</label>
<!--= show_if donate_wiz.to_ship -->
<%= render 'nonprofits/supporters/fieldset', cssClass: 'col-8 u-fontSize--14', profile: profile, name: 'address', placeholder: 'Address' %>
<%= render 'nonprofits/supporters/fieldset', cssClass: 'col-right-4 u-fontSize--14', profile: profile, name: 'city', placeholder: 'City' %>
<fieldset class='u-marginBottom--0 u-floatL col-4'>
<% supporter_region = profile ? profile['state_code'] : '' %>
<input class='u-marginBottom--0' type='text' title="Region" name='state_code' placeholder='State/Region' value="<%= supporter_region %>">
</fieldset>
<fieldset class='u-marginBottom--0 u-floatL col-right-4 u-fontSize--14'>
<input class='u-marginBottom--0' type='text' title="ZIP/Postal Code" name='zip_code' placeholder='Postal Code' value="<%= profile && profile['zip_code']%>">
</fieldset>
<fieldset class='u-marginBottom--0 u-floatL col-right-4'>
<select class='select u-fontSize--14 u-marginBottom--0' name='country'>
<% supporter_country = profile ? profile['country'] : 'United States' %>
<option selected="selected" value='<%=supporter_country%>'><%= supporter_country %></option>
<% Format::Geography::Countries.each do |c| %>
<option value='<%=c%>'><%= c %></option>
<% end %>
</select>
</fieldset>
</section>