phcdevworks_mailer_form 0.0.2b → 0.0.7b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/phcdevworks_mailer_form_manifest.js +1 -1
- data/app/assets/javascripts/website/pages.coffee +0 -0
- data/app/assets/stylesheets/phcdevworks_mailer_form/{application.css → application.scss} +0 -0
- data/app/controllers/phcdevworks_mailer_form/application_controller.rb +8 -0
- data/app/controllers/phcdevworks_mailer_form/website/pages_controller.rb +3 -6
- data/app/models/phcdevworks_mailer_form/form_mailers.rb +21 -19
- data/app/views/phcdevworks_mailer_form/website/pages/forms/_form_contact.html.erb +9 -5
- data/config/routes.rb +2 -3
- data/lib/phcdevworks_mailer_form/version.rb +1 -1
- metadata +4 -4
- data/app/assets/javascripts/phcdevworks_mailer_form/website/pages.coffee +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84f0d5c7866c6bdedce7b018564198229b95425ab7e474c88b790e1c0c210c51
|
4
|
+
data.tar.gz: e2ce5d7aefa33e5afe824f57bf12e4dfa9075abf849ed9a753c9cb5c4dec7448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93c22da59e76b854a92bf05c5f10a02a7e89f6ea3b438d5d0770be37c90aea1d4e5cae3bad7aa5c388997ddad3bbc65b6846ccfe0b63bacfe2c21a0805cd0029
|
7
|
+
data.tar.gz: 1e41b57d22506bc42052906af251536177de6a2ba1317a98d99e52772add300777d7cd729c0e3c381d50c9086fc1ef820f87ad81e52bee3f378ccf6bbbca0aee
|
@@ -1 +1 @@
|
|
1
|
-
//= link_directory ../stylesheets/phcdevworks_mailer_form .
|
1
|
+
//= link_directory ../stylesheets/phcdevworks_mailer_form .scss
|
File without changes
|
File without changes
|
@@ -1,5 +1,13 @@
|
|
1
1
|
module PhcdevworksMailerForm
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
# Security Filters
|
3
5
|
protect_from_forgery with: :exception
|
6
|
+
|
7
|
+
# Load Requried Helper Files
|
8
|
+
helper PhcdevworksActiveMenus::Engine.helpers
|
9
|
+
helper PhcdevworksNotifications::Engine.helpers
|
10
|
+
helper PhcdevworksTitleseo::Engine.helpers
|
11
|
+
|
4
12
|
end
|
5
13
|
end
|
@@ -3,8 +3,6 @@ require_dependency "phcdevworks_mailer_form/application_controller"
|
|
3
3
|
module PhcdevworksMailerForm
|
4
4
|
class Website::PagesController < ApplicationController
|
5
5
|
|
6
|
-
|
7
|
-
|
8
6
|
# Page - Form - Contact
|
9
7
|
def contact
|
10
8
|
@contact = FormMailers.new
|
@@ -15,11 +13,10 @@ module PhcdevworksMailerForm
|
|
15
13
|
@contact = FormMailers.new(params[:contact_form])
|
16
14
|
@contact.request = request
|
17
15
|
if @contact.deliver
|
18
|
-
|
19
|
-
render :index
|
16
|
+
format.html { redirect_to contact_us_path, :flash => { :success => 'Nessage has been Sent.' }}
|
20
17
|
else
|
21
18
|
flash.now[:error] = 'Error Message Not Sent!'
|
22
|
-
render :
|
19
|
+
render :contact
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
@@ -27,7 +24,7 @@ module PhcdevworksMailerForm
|
|
27
24
|
|
28
25
|
# Whitelist
|
29
26
|
def contact_params
|
30
|
-
params.require(:contact_form).permit(:mailer_name, :mailer_email, :mailer_department, :mailer_subject, :mailer_message, :
|
27
|
+
params.require(:contact_form).permit(:mailer_name, :mailer_email, :mailer_department, :mailer_subject, :mailer_message, :mailer_captcha)
|
31
28
|
end
|
32
29
|
|
33
30
|
end
|
@@ -1,20 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
module PhcdevworksMailerForm
|
2
|
+
class FormMailers < MailForm::Base
|
3
|
+
|
4
|
+
# Mailer Fields
|
5
|
+
attributes :mailer_name, :validate => true
|
6
|
+
attributes :mailer_email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
7
|
+
attributes :mailer_department
|
8
|
+
attributes :mailer_subject
|
9
|
+
attributes :mailer_message
|
10
|
+
attribute :mailer_captcha, :captcha => true
|
11
|
+
|
12
|
+
# Mailer Header
|
13
|
+
def headers
|
14
|
+
{
|
15
|
+
:subject => "Website Contact",
|
16
|
+
:to => "info@phcnetworks.net",
|
17
|
+
:from => %("#{mailer_name}" <#{mailer_email}>)
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
18
21
|
end
|
19
|
-
|
20
|
-
end
|
22
|
+
end
|
@@ -1,19 +1,23 @@
|
|
1
|
-
<%= form_for @contact, url: contact_us_path do |f| %>
|
1
|
+
<%= form_for @contact, url: contact_us_path, remote: true do |f| %>
|
2
|
+
|
3
|
+
<!-- -PHC- Content - Contact Form - Container - Row - Container - Form - Notifications -->
|
4
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @contact %>
|
5
|
+
<!-- -PHC- Content - Contact Form - Container - Row - Container - Form - Notifications -->
|
2
6
|
|
3
7
|
<div class="form-group">
|
4
|
-
<%= f.text_field :mailer_name, required: true, class: "form-control", placeholder: "
|
8
|
+
<%= f.text_field :mailer_name, required: true, class: "form-control", placeholder: "Name" %>
|
5
9
|
</div>
|
6
10
|
|
7
11
|
<div class="form-group">
|
8
|
-
<%= f.text_field :mailer_email, required: true, class: "form-control", placeholder: "
|
12
|
+
<%= f.text_field :mailer_email, required: true, class: "form-control", placeholder: "E-mail Address" %>
|
9
13
|
</div>
|
10
14
|
|
11
15
|
<div class="form-group">
|
12
|
-
<%= f.text_field :
|
16
|
+
<%= f.text_field :mailer_subject, required: true, class: "form-control", placeholder: "Subject" %>
|
13
17
|
</div>
|
14
18
|
|
15
19
|
<div class="form-group">
|
16
|
-
<%= f.text_area :
|
20
|
+
<%= f.text_area :mailer_message, rows: 8, cols: 40, required: true, class: "form-control", placeholder: "Message" %>
|
17
21
|
</div>
|
18
22
|
|
19
23
|
<div class="hidden d-none">
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.7b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -293,8 +293,8 @@ files:
|
|
293
293
|
- README.md
|
294
294
|
- Rakefile
|
295
295
|
- app/assets/config/phcdevworks_mailer_form_manifest.js
|
296
|
-
- app/assets/javascripts/
|
297
|
-
- app/assets/stylesheets/phcdevworks_mailer_form/application.
|
296
|
+
- app/assets/javascripts/website/pages.coffee
|
297
|
+
- app/assets/stylesheets/phcdevworks_mailer_form/application.scss
|
298
298
|
- app/assets/stylesheets/phcdevworks_mailer_form/website/pages.scss
|
299
299
|
- app/controllers/phcdevworks_mailer_form/application_controller.rb
|
300
300
|
- app/controllers/phcdevworks_mailer_form/website/pages_controller.rb
|