phcdevworks_mailer_form 0.0.1b → 0.0.2b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_mailer_form/website/pages_controller.rb +3 -4
- data/app/models/phcdevworks_mailer_form/{form/mailers.rb → form_mailers.rb} +3 -1
- data/app/views/phcdevworks_mailer_form/website/pages/contact.html.erb +1 -1
- data/app/views/phcdevworks_mailer_form/website/pages/forms/_form_contact.html.erb +2 -2
- data/lib/phcdevworks_mailer_form/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e031affc87b9375d37e36da05a1326b785734eb4d8fe2320ee95b15ddfef5a6
|
4
|
+
data.tar.gz: d6e01de75a31ae92772d32f962c266819c72783db29af850d4c228baa6ee1d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 542f4c459c0ab5f0d546093005066aee163005812afacc0f7f9ab250bbb6be7bc993f1d3849a00ca54eeee2af74707f0314153ca56e6def1bf9234142633f9b6
|
7
|
+
data.tar.gz: 42c52f432e4f1ef5e6a1aa0396a8dfd3112747966854d28e52c73846fb144275f32c2b0a40e5beb31ac951b2ef2aa431d638db07b10a0a888c82a487f2bf5334
|
@@ -3,17 +3,16 @@ require_dependency "phcdevworks_mailer_form/application_controller"
|
|
3
3
|
module PhcdevworksMailerForm
|
4
4
|
class Website::PagesController < ApplicationController
|
5
5
|
|
6
|
-
|
7
|
-
before_action :contact_params, only: [:create]
|
6
|
+
|
8
7
|
|
9
8
|
# Page - Form - Contact
|
10
9
|
def contact
|
11
|
-
@contact =
|
10
|
+
@contact = FormMailers.new
|
12
11
|
end
|
13
12
|
|
14
13
|
# Send Contact Email
|
15
14
|
def create
|
16
|
-
@contact =
|
15
|
+
@contact = FormMailers.new(params[:contact_form])
|
17
16
|
@contact.request = request
|
18
17
|
if @contact.deliver
|
19
18
|
flash.now[:notice] = 'Thank You Message Sent!'
|
@@ -1,5 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class FormMailers < MailForm::Base
|
2
2
|
|
3
|
+
# Mailer Fields
|
3
4
|
attributes :mailer_name, :validate => true
|
4
5
|
attributes :mailer_email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
5
6
|
attributes :mailer_department
|
@@ -7,6 +8,7 @@ class Form::Mailers < MailForm::Base
|
|
7
8
|
attributes :mailer_message
|
8
9
|
attribute :mailer_captcha, :captcha => true
|
9
10
|
|
11
|
+
# Mailer Header
|
10
12
|
def headers
|
11
13
|
{
|
12
14
|
:subject => "Website Contact",
|
@@ -1 +1 @@
|
|
1
|
-
<%= render "forms/form_contact" %>
|
1
|
+
<%= render "phcdevworks_mailer_form/website/pages/forms/form_contact" %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @contact, url:
|
1
|
+
<%= form_for @contact, url: contact_us_path do |f| %>
|
2
2
|
|
3
3
|
<div class="form-group">
|
4
4
|
<%= f.text_field :mailer_name, required: true, class: "form-control", placeholder: "Your Name" %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="actions">
|
24
|
-
<%=
|
24
|
+
<%= f.submit class: "btn btn-primary" %>
|
25
25
|
</div>
|
26
26
|
|
27
27
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_mailer_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
@@ -303,7 +303,7 @@ files:
|
|
303
303
|
- app/jobs/phcdevworks_mailer_form/application_job.rb
|
304
304
|
- app/mailers/phcdevworks_mailer_form/application_mailer.rb
|
305
305
|
- app/models/phcdevworks_mailer_form/application_record.rb
|
306
|
-
- app/models/phcdevworks_mailer_form/
|
306
|
+
- app/models/phcdevworks_mailer_form/form_mailers.rb
|
307
307
|
- app/views/layouts/phcdevworks_mailer_form/application.html.erb
|
308
308
|
- app/views/phcdevworks_mailer_form/website/pages/contact.html.erb
|
309
309
|
- app/views/phcdevworks_mailer_form/website/pages/forms/_form_contact.html.erb
|