Trying to get dynamic helptext for selecting payment methods

This commit is contained in:
2013-01-25 22:30:05 -07:00
parent e9c648d36e
commit 8ab6fa10ea
10 changed files with 52 additions and 7 deletions

View File

@@ -63,8 +63,7 @@
<%= f.select :member_level, [[nil],["None",0],["Unable",1],["Volunteer",10],["Associate",25],["Basic",50],["Plus",100]] %>
</div>
<div class="field">
<%= f.label :payment_method %><br />
<%= f.select :payment_method, [[nil],["PayPal"],["Dwolla"],["Bill Pay"],["Check"],["Cash"],["Other"]] %>
<%= render :partial => "/users/payment_methods", :locals => { :g => f } %>
</div>
<div class="field">
<%= f.label :phone %><br />

View File

@@ -0,0 +1,9 @@
<% @payment_methods = [[nil],["PayPal"],["Dwolla"],["Bill Pay"],["Check"],["Cash"],["Other"]]
@payment_instructions = {nil => nil, :PayPal => "Set up a monthly recurring payment to hslfinances@gmail.com", :Dwolla => "Set up a monthly recurring payment to hslfinances@gmail.com", "Bill Pay" => "Have your bank send a monthly check to HeatSync Labs Treasurer, 140 W Main St, Mesa AZ 85201", :Check => "Mail to HeatSync Labs Treasurer, 140 W Main St, Mesa AZ 85201 OR put in the drop safe at the Lab with a deposit slip firmly attached each month.", :Cash => "Put in the drop safe at the Lab with a deposit slip firmly attached each month.", :Other => "Hmm... talk to a Treasurer!"} %>
<%= g.label :payment_method %> <i>(after changing this, please update your payment method to match.)</i><br />
<%= g.select :payment_method, @payment_methods %>
<% @payment_instructions.each_pair do |key, value| %>
<span class="payment_instructions" id="pmt_<%= key %>"><%= value %></span>
<% end %>