houdini/app/views/supporters/_manual_address_fields.html.erb
Bradley M. Kuhn 22adb4d5fd Relicense all .erb files under new project license.
The primary license of the project is changing to:
  AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later

with some specific files to be licensed under the one of two licenses:
   CC0-1.0
   LGPL-3.0-or-later

This commit is one of the many steps to relicense the entire codebase.

Documentation granting permission for this relicensing (from all past
contributors who hold copyrights) is on file with Software Freedom
Conservancy, Inc.
2018-03-25 15:10:40 -04:00

46 lines
2.4 KiB
Text

<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%>
<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'>
<select name='state_code' class='select u-fontSize--14 u-marginBottom--0'>
<!--= show_if selected_usa -->
<!--= remove_attr_if (not selected_usa) 'name' -->
<% supporter_state = profile ? profile['state_code'] : @nonprofit.state_code %>
<option value='' disabled>Select State</option>
<% Format::Geography::StateMappings.each do |name, code| %>
<option <%= supporter_state == code ? 'selected="selected"' : ''%> value='<%=code%>'><%= name.titleize %></option>
<% end %>
</select>
<% supporter_region = profile ? profile['state_code'] : '' %>
<input class='u-marginBottom--0' type='text' title="Region" name='state_code' placeholder='Region' value="<%= supporter_region %>">
<!--= hide_if selected_usa -->
<!--= remove_attr_if selected_usa 'name' -->
</fieldset>
<fieldset class='u-marginBottom--0 u-floatL col-right-4 u-fontSize--14'>
<input class='u-marginBottom--0' type='text' title="Region" name='zip_code' placeholder='' value="<%= profile && profile['zip_code']%>">
<!--= if selected_usa (set_attr 'placeholder' 'Zip Code') (set_attr 'placeholder' 'Postal Code') -->
</fieldset>
<fieldset class='u-marginBottom--0 u-floatL col-right-4'>
<select class='select u-fontSize--14 u-marginBottom--0' name='country'>
<!--= def 'selected_usa' (is_usa get_value) -->
<!--= on 'change' (def 'selected_usa' (is_usa get_value)) -->
<% 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>