Created
April 12, 2013 08:15
-
-
Save px-amaac/5370415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p><%= @contact.message %></p> | |
<p>---------------------</p> | |
<p><%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this hook to configure contact mailer. | |
ContactUs.setup do |config| | |
# ==> Mailer Configuration | |
# Configure the e-mail address which email notifications should be sent from. If emails must be sent from a verified email address you may set it here. | |
# Example: | |
# config.mailer_from = "[email protected]" | |
config.mailer_from = nil | |
# Configure the e-mail address which should receive the contact form email notifications. | |
config.mailer_to = "[email protected]" | |
# ==> Form Configuration | |
# Configure the form to ask for the users name. | |
config.require_name = false | |
# Configure the form to ask for a subject. | |
config.require_subject = false | |
# Configure the form gem to use. | |
# Example: | |
# config.form_gem = 'formtastic | |
config.form_gem = 'formtastic' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="panel"> | |
<h2><%= t('.contact_us') %></h2> | |
<%= semantic_form_for @contact, :url => contacts_path do |f| %> | |
<%= f.input :name, :label => t('.name') if ContactUs.require_name %> | |
<%= f.input :email, :label => t('.email') %> | |
<%= f.input :subject, :label => t('.subject') if ContactUs.require_subject %> | |
<%= f.input :message, :as => :text, :label => t('.message') %> | |
<%= f.action :submit, :label => t('.submit'), :button_html => { :alt => t('.submit'), :id => 'contact_us_contact_submit', :title => t('.submit') } %> | |
<% end %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment