Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Commit

Permalink
Make contact form more usable
Browse files Browse the repository at this point in the history
- Subject updated to tell you who it is from
- Image/logo update to be the right size
  • Loading branch information
polastre committed Oct 8, 2014
1 parent 47d0ee4 commit ff358c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/mailers/contact_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def contact_us(from, return_email, message)
attachments.inline['logo.png'] = File.read('app/assets/images/myusa-logo.png')
mail(
reply_to: @return_email,
subject: t('email.contact_us.subject')
subject: I18n.t('email.contact_us.subject', from: @from)
)
end
end
6 changes: 5 additions & 1 deletion app/views/contact_mailer/contact_us.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody">
<tr>
<td valign="top" class="bodyContent" mc:edit="body_content">
<p>Return email: <%= @return_email %></p>
<p>
From: <%= @from %>
<br/>
Email: <%= @return_email %>
</p>
<p><%= @message %></p>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/mailers/notification_template.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templatePreheader">
<tr>
<td valign="top" class="preheaderContent" style="padding-top:10px; padding-right:20px; padding-bottom:10px; padding-left:20px;" mc:edit="preheader_content00">
<%= link_to image_tag(attachments['logo.png'].url, alt: 'Sent from MyUSA', height: '38', width: '134', alt: 'Sent from MyUSA'), root_url %>
<%= link_to image_tag(attachments['logo.png'].url, alt: 'Sent from MyUSA', height: '25', width: '88', alt: 'Sent from MyUSA'), root_url %>
</td>
<!-- *|IFNOT:ARCHIVE_PAGE|* -->
<td valign="top" width="180" class="preheaderContent" style="padding-top:10px; padding-right:20px; padding-bottom:10px; padding-left:0;" mc:edit="preheader_content01"></td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/marketing/_contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<%= f.label 'Return Email:' %>
<%= f.text_field :return_email, class: 'form-control', placeholder: 'What is your email address?' %>
</div>
<%= f.submit 'Send Us Your Message', id: 'contact_submit', 'data-loading-text' => "Sending your message...", class: 'btn btn-primary width-100' %>
<%= f.submit 'Send Us Your Message', id: 'contact_submit', 'data-loading-text' => "Sending your message...", class: 'btn btn-primary width-100' %>
<% end %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ en:

email:
contact_us:
subject: 'Contact - MyUSA marketing page'
subject: MyUSA question from %{from}

mobile_confirmation:
bad_token: 'Please check the number sent to your mobile and re-enter that code. If that seems to match, you can also <a href="%{resend_link}">resend a code</a> or <a href=''%{reenter_link}''>re-enter your mobile number</a>.'
Expand Down

0 comments on commit ff358c1

Please sign in to comment.