22adb4d5fd
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.
49 lines
1.8 KiB
Text
49 lines
1.8 KiB
Text
<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%>
|
|
<!-- partial: supporters/fields -->
|
|
<!-- include css: donation_form/form -->
|
|
<!-- depends on @nonprofit being set -->
|
|
|
|
<% profile = nil if profile.nil? # weird hack so erb doesn't throw an exception when profile is not passed in
|
|
%>
|
|
|
|
<% required ||= {} %>
|
|
<% show_anon = true if show_anon.nil? %>
|
|
|
|
<% # we need to generate a unique id for the "anonymous" checkbox if this form is included multiple times throughout a page
|
|
%>
|
|
<% unique_id_token = SecureRandom.uuid %>
|
|
|
|
<div class='u-marginY--10'>
|
|
|
|
<fieldset>
|
|
<input class='u-marginBottom--0'
|
|
type='email'
|
|
title='Email <%= required[:email] ? "(required)" : nil %>'
|
|
name='email'
|
|
<%= required[:email] ? "required" : nil %>
|
|
value='<%= profile && profile.user.email %>'
|
|
placeholder='Email <%= required[:email] ? "(required)" : nil %>'>
|
|
</fieldset>
|
|
|
|
<section class='group'>
|
|
<%= render 'nonprofits/supporters/fieldset', cssClass: 'col-8', profile: profile, name: 'name', placeholder: 'Full name', required: required[:name] %>
|
|
|
|
<%= render 'nonprofits/supporters/fieldset', cssClass: 'col-right-4', profile: profile, name: 'phone', placeholder: 'Phone' %>
|
|
</section>
|
|
|
|
<%= render 'supporters/manual_address_fields', profile: profile %>
|
|
|
|
<% if !@nonprofit.no_anon && show_anon %>
|
|
<div class='u-marginTop--10'>
|
|
<input type='checkbox' id='anon-<%= unique_id_token%>' name='anonymous' <%= profile && profile.anonymous ? 'checked':'' %>>
|
|
<label id='anonLabel' for='anon-<%= unique_id_token %>'><small>Make this donation anonymous.</small></label>
|
|
</div>
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
<input type='hidden' name='nonprofit_id' value='<%= @nonprofit.id %>'>
|
|
<input type='hidden' name='profile_id' value='<%= profile && profile.id %>'>
|
|
|
|
<!-- end partial: supporters/fields -->
|