From 3a0948339984a108ada449c3a5dbbc9086a2af26 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 11 Jul 2013 12:43:53 +0200 Subject: billing: helper for the typical BraintreeForm --- billing/app/views/customer/edit.html.haml | 2 +- billing/app/views/customer/new.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'billing/app/views/customer') diff --git a/billing/app/views/customer/edit.html.haml b/billing/app/views/customer/edit.html.haml index f11e948..76c678b 100644 --- a/billing/app/views/customer/edit.html.haml +++ b/billing/app/views/customer/edit.html.haml @@ -2,7 +2,7 @@ #total-errors{:style => "color:red;"} = h(@result.errors.size) error(s) -= form_for :customer, url: Braintree::TransparentRedirect.url, params: @result && @result.params[:customer], existing: @customer, builder: BraintreeFormHelper::BraintreeFormBuilder, errors: @result && @result.errors.for(:customer) do |f| | += braintree_form_for :customer, existing: @customer do |f| = field_set_tag "Customer" do %dl %dt= f.label :first_name, 'First Name' diff --git a/billing/app/views/customer/new.html.haml b/billing/app/views/customer/new.html.haml index 6eaa3d1..e1f5ba9 100644 --- a/billing/app/views/customer/new.html.haml +++ b/billing/app/views/customer/new.html.haml @@ -2,7 +2,7 @@ #total-errors{:style => "color:red;"} = h(@result.errors.size) error(s) -= form_for :customer, :url => Braintree::TransparentRedirect.url, :params => @result && @result.params[:customer], :builder => BraintreeFormHelper::BraintreeFormBuilder, :errors => @result && @result.errors.for(:customer) do |f| += braintree_form_for :customer do |f| = field_set_tag "Customer" do %dl %dt= f.label :first_name, 'First Name' @@ -21,4 +21,4 @@ %dt= cc.label :cvv, 'CVV' %dd= cc.text_field :cvv = hidden_field_tag :tr_data, @tr_data - = f.submit 'Save Payment Info' \ No newline at end of file + = f.submit 'Save Payment Info' -- cgit v1.2.3