mirror of
https://github.com/edcommonwealth/ecp.org.git
synced 2026-03-07 21:48:13 -08:00
Update contact form so it confirms the message was sent
This commit is contained in:
parent
7f433cf223
commit
f8c91add3e
7 changed files with 25 additions and 10 deletions
|
|
@ -1,17 +1,17 @@
|
|||
class Contact < MailForm::Base
|
||||
attribute :name, validate: true
|
||||
attribute :email, validate: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
||||
attribute :email, validate: /\A([\w.%+\-]+)@([\w\-]+\.)+(\w{2,})\z/i
|
||||
attribute :organization
|
||||
attribute :message
|
||||
attribute :nickname, captcha: true
|
||||
attribute :message, validate: true
|
||||
attribute :nickname, captcha: true
|
||||
|
||||
# Declare the e-mail headers. It accepts anything the mail method
|
||||
# in ActionMailer accepts.
|
||||
def headers
|
||||
{
|
||||
:subject => "Contact Form Inquiry",
|
||||
:to => ENV['CONTACT_FORM_DESTINATION'] || "memoryman51@hotmail.com",
|
||||
:from => %("#{name}" <#{email}>)
|
||||
subject: 'Contact Form Inquiry',
|
||||
to: ENV['CONTACT_FORM_DESTINATION'] || 'memoryman51@hotmail.com',
|
||||
from: %("#{name}" <#{email}>)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue