phcdevworks_mailer_form 0.0.3b → 0.1.0b
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 +4 -14
- 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 +5 -5
- 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: 94d54e57ddb70041a87e506c619b209b7c7d29c308e68ae0ed9f0904fff4ab78
|
4
|
+
data.tar.gz: df965d16706bd84647d70aff3a223cfd9a9b5ef70d79a8e9785302bca9c472db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0813d9303ed45138d02ffe55697722b0004b8bdb3fde7af3b624938a473c75d3f7679aa19d4031f18a96b26ebf45530b45a3408e57112575d6aeb47420f7c2c
|
7
|
+
data.tar.gz: 9be85f2fdaf12e9614d241ec353bfe89a25d2c55935df597ca3f57efe3cebdef0614fead4ffe3ce8f6844b99fb72b26841c805032c6ee456c60ae4f4c136f129
|
@@ -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
|
@@ -12,23 +10,15 @@ module PhcdevworksMailerForm
|
|
12
10
|
|
13
11
|
# Send Contact Email
|
14
12
|
def create
|
15
|
-
@contact = FormMailers.new(params[:
|
13
|
+
@contact = FormMailers.new(params[:form_mailers])
|
16
14
|
@contact.request = request
|
17
15
|
if @contact.deliver
|
18
|
-
flash
|
19
|
-
render :index
|
16
|
+
redirect_to contact_us_path, :flash => { :success => 'Thank You Message Sent!' }
|
20
17
|
else
|
21
|
-
flash.now[:error] = 'Error Message
|
22
|
-
render :
|
18
|
+
flash.now[:error] = 'Error Message Didnt Send!'
|
19
|
+
render :contact
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
26
|
-
private
|
27
|
-
|
28
|
-
# Whitelist
|
29
|
-
def contact_params
|
30
|
-
params.require(:contact_form).permit(:mailer_name, :mailer_email, :mailer_department, :mailer_subject, :mailer_message, :captcha)
|
31
|
-
end
|
32
|
-
|
33
23
|
end
|
34
24
|
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.
|
4
|
+
version: 0.1.0b
|
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
|
@@ -282,7 +282,7 @@ dependencies:
|
|
282
282
|
- - "~>"
|
283
283
|
- !ruby/object:Gem::Version
|
284
284
|
version: '1.4'
|
285
|
-
description: 'Beta
|
285
|
+
description: 'Beta: Contact form using Rails ActionMailer.'
|
286
286
|
email:
|
287
287
|
- imfo@phcdevworks.com
|
288
288
|
executables: []
|
@@ -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
|