diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b1ccb20..a7e9720 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -19,52 +19,10 @@ var redMarker = '/images/markers/red.png'; var greenMarker = '/images/markers/green.png'; var openInfoWindow; - var formString = '\ -
\ -

Adopt this Hydrant

\ -<%= form_tag do %>\ -
\ - <%= label_tag "email" %>\ - <%= text_field_tag "email", params[:email], :tabindex => 1 %>\ - <%= label_tag "account_new" , radio_button_tag("account", "new", true, :tabindex => 2).html_safe + "I haven\\'t signed up yet" %>
\ - <%= label_tag "account_existing", radio_button_tag("account", "existing").html_safe + "I already signed up" %>
\ -
\ -
\ - <%= label_tag "name" %>\ - <%= text_field_tag "name", params[:name], :tabindex => 3 %>\ - <%= label_tag "organization" %>\ - <%= text_field_tag "organization", params[:organization], :tabindex => 4 %>\ - <%= label_tag "voice_number" %>\ - <%= text_field_tag "voice_number", params[:voice_number], :tabindex => 5 %>\ - <%= label_tag "sms_number", "SMS number" %>\ - <%= text_field_tag "sms_number", params[:sms_number], :tabindex => 6 %>\ - <%= label_tag "password", "Choose a password" %>\ - <%= password_field_tag "password", nil, :tabindex => 7 %>\ - <%= submit_tag "Sign up", :tabindex => 8 %>\ -

By signing up you accept the <%= link_to "Terms of Service", "#", :tabindex => 9 %>.

\ -
\ - \ - \ -<% end %>\ -
\ -'; + var formString = '<%= render(:partial => "adoption_form").gsub("\n", "") %>' <% @hydrants.each do |hydrant| %> <% if user = hydrant.user %> - <% require 'digest/md5' %> - <% hash = Digest::MD5.hexdigest(user.email) %> - var contentString = '\ -

Adopted by <%= hydrant.user.name %>

\ -Email a reminder to shovel\ -' + var contentString = '<%= render(:partial => "user_profile", :locals => {:user => user}).gsub("\n", "") %>' <% else %> var contentString = formString; <% end %> diff --git a/app/views/welcome/_adoption_form.html.erb b/app/views/welcome/_adoption_form.html.erb new file mode 100644 index 0000000..cccee2a --- /dev/null +++ b/app/views/welcome/_adoption_form.html.erb @@ -0,0 +1,36 @@ +
+

Adopt this Hydrant

+<%= form_tag do %> +
+ <%= label_tag "email" %> + <%= text_field_tag "email", params[:email], :tabindex => 1 %> + <%= label_tag "account_new" , radio_button_tag("account", "new", true, :tabindex => 2).html_safe + "I haven\\'t signed up yet" %>
+ <%= label_tag "account_existing", radio_button_tag("account", "existing").html_safe + "I already signed up" %>
+
+
+ <%= label_tag "name" %> + <%= text_field_tag "name", params[:name], :tabindex => 3 %> + <%= label_tag "organization" %> + <%= text_field_tag "organization", params[:organization], :tabindex => 4 %> + <%= label_tag "voice_number" %> + <%= text_field_tag "voice_number", params[:voice_number], :tabindex => 5 %> + <%= label_tag "sms_number", "SMS number" %> + <%= text_field_tag "sms_number", params[:sms_number], :tabindex => 6 %> + <%= label_tag "password", "Choose a password" %> + <%= password_field_tag "password", nil, :tabindex => 7 %> + <%= submit_tag "Sign up", :tabindex => 8 %> +

By signing up you accept the <%= link_to "Terms of Service", "#", :tabindex => 9 %>.

+
+ + +<% end %> +
diff --git a/app/views/welcome/_user_profile.html.erb b/app/views/welcome/_user_profile.html.erb new file mode 100644 index 0000000..d78e638 --- /dev/null +++ b/app/views/welcome/_user_profile.html.erb @@ -0,0 +1,4 @@ +

Adopted by <%= user.name %>

+<% if user.organization %> +

of <%= user.organization %>

+<% end %> diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index c25c34e..52615a6 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -10,6 +10,7 @@ body { } h1, h2, h3, h4, h5, h6 { + font-family: Helvetica, Arial, sans-serif; text-align: center; }