From 2e1d21f53f0f96fba544b592fde84af2f4879a24 Mon Sep 17 00:00:00 2001 From: claucece Date: Mon, 21 Sep 2015 23:27:05 -0500 Subject: subscriptions, haml and translations --- .../views/subscriptions/_customer_form.html.erb | 13 ++++++++ .../billing/app/views/subscriptions/new.html.erb | 35 ++++++++++++++++++++++ .../billing/app/views/subscriptions/new.html.haml | 15 ---------- 3 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 engines/billing/app/views/subscriptions/_customer_form.html.erb create mode 100644 engines/billing/app/views/subscriptions/new.html.erb delete mode 100644 engines/billing/app/views/subscriptions/new.html.haml (limited to 'engines/billing/app/views/subscriptions') diff --git a/engines/billing/app/views/subscriptions/_customer_form.html.erb b/engines/billing/app/views/subscriptions/_customer_form.html.erb new file mode 100644 index 0000000..2e8a3b1 --- /dev/null +++ b/engines/billing/app/views/subscriptions/_customer_form.html.erb @@ -0,0 +1,13 @@ +

Please enter your personal info:

+
+ <%= text_field_tag :first_name, "",placeholder: "First Name", class: "radius" %> +
+
+ <%= text_field_tag :last_name, "",placeholder: "Last Name", class: "radius" %> +
+
+ <%= text_field_tag :company, "",placeholder: "Company", class: "radius" %> +
+
+ <%= text_field_tag :phone, "",placeholder: "Phone", class: "radius" %> +
diff --git a/engines/billing/app/views/subscriptions/new.html.erb b/engines/billing/app/views/subscriptions/new.html.erb new file mode 100644 index 0000000..f3e143a --- /dev/null +++ b/engines/billing/app/views/subscriptions/new.html.erb @@ -0,0 +1,35 @@ + +

Subscriptions

+
+<%= form_tag subscriptions_path, id: "checkout-form" do %> + <% if current_user and !current_user.has_payment_info? %> + <%= render 'customer_form' unless @anonymous_user%> + <% end %> +
+

Choose subcription:

+ +
+
+<% end %> diff --git a/engines/billing/app/views/subscriptions/new.html.haml b/engines/billing/app/views/subscriptions/new.html.haml deleted file mode 100644 index 4183458..0000000 --- a/engines/billing/app/views/subscriptions/new.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- if @payment_method_token - %h1 - Subscribe to plan - = #currently just one plan - = @plans[0].name - = number_to_currency(@plans[0].price) - = simple_form_for :subscription, :url => :subscriptions do |f| - = hidden_field_tag :payment_method_token, @payment_method_token - = hidden_field_tag :plan_id, @plans[0].id - .form-actions - = f.submit t(:subscribe), :class => 'btn btn-primary' -- else - = t(:must_create_customer) - %p - = link_to t(:create_new_customer), new_customer_path -- cgit v1.2.3 From c10bbfa44442c86fda82c16524341d5f21b63664 Mon Sep 17 00:00:00 2001 From: claucece Date: Tue, 22 Sep 2015 10:48:14 -0500 Subject: subscriptions, translation --- .../billing/app/views/subscriptions/new.html.erb | 52 +++++++++++++--------- .../app/views/subscriptions/new12.html.haml | 27 +++++++++++ 2 files changed, 57 insertions(+), 22 deletions(-) create mode 100644 engines/billing/app/views/subscriptions/new12.html.haml (limited to 'engines/billing/app/views/subscriptions') diff --git a/engines/billing/app/views/subscriptions/new.html.erb b/engines/billing/app/views/subscriptions/new.html.erb index f3e143a..2336981 100644 --- a/engines/billing/app/views/subscriptions/new.html.erb +++ b/engines/billing/app/views/subscriptions/new.html.erb @@ -3,33 +3,41 @@
<%= form_tag subscriptions_path, id: "checkout-form" do %> <% if current_user and !current_user.has_payment_info? %> - <%= render 'customer_form' unless @anonymous_user%> - <% end %> + <%= render 'customer_form' %> + <% end %>

Choose subcription:

-