<commit_before>!!! 5
%html
	%head
		%title= "Contribute To #{@site.name}"
		=stylesheet_link_tag "reset-min.css"
		=stylesheet_link_tag "fonts-min.css"
		=stylesheet_link_tag "contribute"
		/[if lt IE 9]
			=javascript_include_tag "http://ie7-js.googlecode.com/svn/version/2.1(beta3)/IE9.js"
		=javascript_include_tag "jquery.min.js"
	%body
		#contribution
			%h1= "Contribute To #{@site.name}"
			-form_for @contribution, :url => url_for(:subdomain => @site.subdomain, :controller => 'contributions', :action => 'create', :only_path => true, :secure => true), :html => {:id => 'contribution_form', :method => :post} do |f|
				-if flash[:error]
					.flash.error= flash[:error]
					=error_messages_for 'contribution'
				%p.fields_required All fields are required unless otherwise noted.
				-field_set_tag '<span>Contribution Amount</span>', :id => 'contribution_info', :class => 'fieldset' do
					-if @contribution.errors.on(:amount)
						#amount_error.flash.error= t('contribution.process.fail.amount')
					#amount.field_element
						.amount_choice
							=radio_button_tag 'amount_choice','25', @amount_choice == "25"
							=label_tag 'amount_choice_25', '$25.00'
						.amount_choice
							=radio_button_tag 'amount_choice','50', @amount_choice == "50"
							=label_tag 'amount_choice_50', '$50.00'
						.amount_choice
							=radio_button_tag 'amount_choice','100', @amount_choice == "100"
							=label_tag 'amount_choice_100', '$100.00'
						.amount_choice
							=radio_button_tag 'amount_choice','250', @amount_choice == "250"
							=label_tag 'amount_choice_250', '$250.00'
						.amount_choice
							=radio_button_tag 'amount_choice','500', @amount_choice == "500"
							=label_tag 'amount_choice_500', '$500.00'
						.amount_choice
							=radio_button_tag 'amount_choice','1000', @amount_choice == "1000"
							=label_tag 'amount_choice_1000', '$1,000.00'
						.amount_choice
							=radio_button_tag 'amount_choice','2500', @amount_choice == "2500"
							=label_tag 'amount_choice_2500', '$2,500.00'
						.amount_choice.other_amount
							=radio_button_tag 'amount_choice','other', @amount_choice == "other"
							=label_tag 'amount_choice_other', 'Other:'
							=text_field_tag 'amount_other', @amount_other, :class => 'text_field'

				-field_set_tag '<span>Credit Card Information <img id="credit-card-logos" src="/images/payments/creditcards.png" alt="" /></span>', :id => 'credit_card', :class => 'fieldset' do
					-if flash[:card_error]
						#card_error.flash.error= flash[:card_error]
					-fields_for :credit_card, @credit_card do |cc|
						#type.field_element
							=cc.label :type, 'Card Type'
							=cc.select :type, [['Visa','visa'],['Mastercard','master'],['Discover','discover'],['American Express','american_express']]
						#expiration.field_element
							=cc.label :month, 'Expiration Date'
							=cc.select :month, (1..12)
							=cc.select :year, ((Time.now.year)..(Time.now.year + 10))
						#number.field_element
							=cc.label :number, 'Card Number', :class => 'text_field_label'
							=cc.text_field :number, :class => 'text_field'
						#verification_value.field_element
							=cc.label :verification_value, 'Verification No.', :class => 'text_field_label'
							=cc.text_field :verification_value, :class => 'text_field'
							=link_to "What's this?", '/cvv2.html', :target => '_blank'

				-field_set_tag '<span>Contributor Information</span>', :id => 'contributor', :class => 'fieldset' do
					#contributor_name
						#first_name.field_element
							=f.label :first_name, 'First Name', :class => 'text_field_label'
							=f.text_field :first_name, :class => 'text_field'
						#last_name.field_element
							=f.label :last_name, 'Last Name', :class => 'text_field_label'
							=f.text_field :last_name, :class => 'text_field'
					#street.field_element
						=f.label :address1, 'Billing Address', :class => 'text_field_label'
						=f.text_field :address1, :class => 'text_field'
						=f.text_field :address2, :class => 'text_field'
					#city.field_element
						=f.label :city, {}, :class => 'text_field_label'
						=f.text_field :city, :class => 'text_field'
					#state.field_element
						=f.label :state, {}, :class => 'text_field_label'
						=f.select :state, STATES
					#zip.field_element
						=f.label :zip, {}, :class => 'text_field_label'
						=f.text_field :zip, :class => 'text_field'
					#country.field_element
						=f.label :country, {}, :class => 'text_field_label'
						=f.country_code_select :country, [['United States','US']]
					#email.field_element
						=f.label :email, 'Email', :class => 'text_field_label'
						=f.text_field :email, :class => 'text_field'
						/
							#email_subscribe.field_element
								=check_box_tag 'add_to_email_list'
								=label_tag 'add_to_email_list', "Subscribe to campaign email updates"
					#phone.field_element
						=f.label :phone, 'Phone <span class="optional">(optional)</span>', :class => 'text_field_label'
						=f.text_field :phone, :class => 'text_field'
						/
							#sms_subscribe.field_element
								=check_box_tag 'add_to_sms_list'
								=label_tag 'add_to_sms_list', "Subscribe to campaign SMS updates"
								
				-field_set_tag '<span>Employment Information</span>', :id => 'employment_information', :class => 'fieldset' do
					%p.instructions Campaign finance law requires us to collect and report your occupation and employer. In some cases, without this information we will be forced to refund your contribution. Please do not leave blank or enter "N/A".
					#employer.field_element
						=f.label :employer, {}, :class => 'text_field_label'
						=f.text_field :employer, :class => 'text_field'
						%span.instructions If not employed, please enter "None". <br/>If self-employed, please enter "Self". <br/>If retired, please enter "Retired".
					#occupation.field_element
						=f.label :occupation, {}, :class => 'text_field_label'
						=f.text_field :occupation, :class => 'text_field'
						%span.instructions If not employed, please enter "Not employed". <br/>Complete even if self-employed. <br/>If retired, please enter "Retired".
						
				-unless @site.eligibility_statement.blank?
					-field_set_tag '<span>Confirm Your Eligibility</span>', :id => 'eligibility_confirmation', :class => 'fieldset' do
						=f.check_box :compliance_confirmation
						=f.label :compliance_confirmation, "Check this box to confirm the following statements are true and correct:"
						#eligibility_statement
							=@site.eligibility_statement
				
				.buttons
					%button.contribute{:type => 'submit'}
						Submit Contribution<commit_msg>Something buggy in the generation of url for contribution form in production. Just set the url explicitly.<commit_after>!!! 5
%html
	%head
		%title= "Contribute To #{@site.name}"
		=stylesheet_link_tag "reset-min.css"
		=stylesheet_link_tag "fonts-min.css"
		=stylesheet_link_tag "contribute"
		/[if lt IE 9]
			=javascript_include_tag "http://ie7-js.googlecode.com/svn/version/2.1(beta3)/IE9.js"
		=javascript_include_tag "jquery.min.js"
	%body
		#contribution
			%h1= "Contribute To #{@site.name}"
			-form_for @contribution, :url => "/#{@site.subdomain}/contribute", :html => {:id => 'contribution_form', :method => :post} do |f|
				-if flash[:error]
					.flash.error= flash[:error]
					=error_messages_for 'contribution'
				%p.fields_required All fields are required unless otherwise noted.
				-field_set_tag '<span>Contribution Amount</span>', :id => 'contribution_info', :class => 'fieldset' do
					-if @contribution.errors.on(:amount)
						#amount_error.flash.error= t('contribution.process.fail.amount')
					#amount.field_element
						.amount_choice
							=radio_button_tag 'amount_choice','25', @amount_choice == "25"
							=label_tag 'amount_choice_25', '$25.00'
						.amount_choice
							=radio_button_tag 'amount_choice','50', @amount_choice == "50"
							=label_tag 'amount_choice_50', '$50.00'
						.amount_choice
							=radio_button_tag 'amount_choice','100', @amount_choice == "100"
							=label_tag 'amount_choice_100', '$100.00'
						.amount_choice
							=radio_button_tag 'amount_choice','250', @amount_choice == "250"
							=label_tag 'amount_choice_250', '$250.00'
						.amount_choice
							=radio_button_tag 'amount_choice','500', @amount_choice == "500"
							=label_tag 'amount_choice_500', '$500.00'
						.amount_choice
							=radio_button_tag 'amount_choice','1000', @amount_choice == "1000"
							=label_tag 'amount_choice_1000', '$1,000.00'
						.amount_choice
							=radio_button_tag 'amount_choice','2500', @amount_choice == "2500"
							=label_tag 'amount_choice_2500', '$2,500.00'
						.amount_choice.other_amount
							=radio_button_tag 'amount_choice','other', @amount_choice == "other"
							=label_tag 'amount_choice_other', 'Other:'
							=text_field_tag 'amount_other', @amount_other, :class => 'text_field'

				-field_set_tag '<span>Credit Card Information <img id="credit-card-logos" src="/images/payments/creditcards.png" alt="" /></span>', :id => 'credit_card', :class => 'fieldset' do
					-if flash[:card_error]
						#card_error.flash.error= flash[:card_error]
					-fields_for :credit_card, @credit_card do |cc|
						#type.field_element
							=cc.label :type, 'Card Type'
							=cc.select :type, [['Visa','visa'],['Mastercard','master'],['Discover','discover'],['American Express','american_express']]
						#expiration.field_element
							=cc.label :month, 'Expiration Date'
							=cc.select :month, (1..12)
							=cc.select :year, ((Time.now.year)..(Time.now.year + 10))
						#number.field_element
							=cc.label :number, 'Card Number', :class => 'text_field_label'
							=cc.text_field :number, :class => 'text_field'
						#verification_value.field_element
							=cc.label :verification_value, 'Verification No.', :class => 'text_field_label'
							=cc.text_field :verification_value, :class => 'text_field'
							=link_to "What's this?", '/cvv2.html', :target => '_blank'

				-field_set_tag '<span>Contributor Information</span>', :id => 'contributor', :class => 'fieldset' do
					#contributor_name
						#first_name.field_element
							=f.label :first_name, 'First Name', :class => 'text_field_label'
							=f.text_field :first_name, :class => 'text_field'
						#last_name.field_element
							=f.label :last_name, 'Last Name', :class => 'text_field_label'
							=f.text_field :last_name, :class => 'text_field'
					#street.field_element
						=f.label :address1, 'Billing Address', :class => 'text_field_label'
						=f.text_field :address1, :class => 'text_field'
						=f.text_field :address2, :class => 'text_field'
					#city.field_element
						=f.label :city, {}, :class => 'text_field_label'
						=f.text_field :city, :class => 'text_field'
					#state.field_element
						=f.label :state, {}, :class => 'text_field_label'
						=f.select :state, STATES
					#zip.field_element
						=f.label :zip, {}, :class => 'text_field_label'
						=f.text_field :zip, :class => 'text_field'
					#country.field_element
						=f.label :country, {}, :class => 'text_field_label'
						=f.country_code_select :country, [['United States','US']]
					#email.field_element
						=f.label :email, 'Email', :class => 'text_field_label'
						=f.text_field :email, :class => 'text_field'
						/
							#email_subscribe.field_element
								=check_box_tag 'add_to_email_list'
								=label_tag 'add_to_email_list', "Subscribe to campaign email updates"
					#phone.field_element
						=f.label :phone, 'Phone <span class="optional">(optional)</span>', :class => 'text_field_label'
						=f.text_field :phone, :class => 'text_field'
						/
							#sms_subscribe.field_element
								=check_box_tag 'add_to_sms_list'
								=label_tag 'add_to_sms_list', "Subscribe to campaign SMS updates"
								
				-field_set_tag '<span>Employment Information</span>', :id => 'employment_information', :class => 'fieldset' do
					%p.instructions Campaign finance law requires us to collect and report your occupation and employer. In some cases, without this information we will be forced to refund your contribution. Please do not leave blank or enter "N/A".
					#employer.field_element
						=f.label :employer, {}, :class => 'text_field_label'
						=f.text_field :employer, :class => 'text_field'
						%span.instructions If not employed, please enter "None". <br/>If self-employed, please enter "Self". <br/>If retired, please enter "Retired".
					#occupation.field_element
						=f.label :occupation, {}, :class => 'text_field_label'
						=f.text_field :occupation, :class => 'text_field'
						%span.instructions If not employed, please enter "Not employed". <br/>Complete even if self-employed. <br/>If retired, please enter "Retired".
						
				-unless @site.eligibility_statement.blank?
					-field_set_tag '<span>Confirm Your Eligibility</span>', :id => 'eligibility_confirmation', :class => 'fieldset' do
						=f.check_box :compliance_confirmation
						=f.label :compliance_confirmation, "Check this box to confirm the following statements are true and correct:"
						#eligibility_statement
							=@site.eligibility_statement
				
				.buttons
					%button.contribute{:type => 'submit'}
						Submit Contribution
{'fraction_non_alphanumeric': 0.14724760250698482, 'fraction_numerical': 0.017367665936721288, 'mean_word_length': 3.7249375668926152, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 126, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208464', 'n_tokens_mistral': 5661, 'n_tokens_neox': 4290, 'n_words': 944}