phcdevworks_mailer_form 0.0.4b → 0.2.0b

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d637770a204393fdd2c828406255362534f592c2fbb2cb057322cbbfc59b354
4
- data.tar.gz: 2571d002043634c1c222647635ca023bccfa5c8a28db1787cdbec86eed68a831
3
+ metadata.gz: edf7cba5c1ed66a51753f679d02988b4dcd09b9fcbba65a4714170ab5638946c
4
+ data.tar.gz: a2262f2491922c7c65c3269ff44ac6413f225f3bc9a3f169ff86c07e8c2fb677
5
5
  SHA512:
6
- metadata.gz: 0400fc3b886717d68930f96b62d4c1779c791d12772f92bc494a7d8d3a15ab8cb68a24758a358a1d9772588d1366f62c237eba3a6498d0c6b3cb0bd3059d39a7
7
- data.tar.gz: 333d83f8f1c0293505ff12062c92c7ae9d2a8f195a3e53b95a7affb4f446fff6bec5b5587ad34bc12bbdd832e4a30e0b7269ed51ee37d4a1cf1fad3e83da60ab
6
+ metadata.gz: 9dad81bf9130be715097aeb5969a09a4b0a289aff06e4ffad02ef0b3971d39bbaf59804ac7caac8d856132e7c2360cb6e44cbad0b74c3ad9c8b3d84d1789479e
7
+ data.tar.gz: 8a9ebc06857c066dfbb314d62ddb55912fe8fdc1ebe737dcc6d6793ef0f90595b402611a8158c8f43cf6b57b64314e2832a5b6bd8f39a08b3e77844ee00b729f
@@ -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[:contact_form])
13
+ @contact = FormMailers.new(params[:form_mailers])
16
14
  @contact.request = request
17
15
  if @contact.deliver
18
- flash.now[:notice] = 'Thank You Message Sent!'
19
- render :index
16
+ redirect_to contact_us_path, :flash => { :success => 'Thank You Message Sent!' }
20
17
  else
21
- flash.now[:error] = 'Error Message Not Sent!'
22
- render :index
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: "Your Name" %>
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: "Your E-mail Address" %>
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 :mailer_email, required: true, class: "form-control", placeholder: "Your E-mail Address" %>
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 :mailer_subject, rows: 8, cols: 40, required: true, class: "form-control", placeholder: "Your Message" %>
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">
@@ -2,7 +2,6 @@ PhcdevworksMailerForm::Engine.routes.draw do
2
2
 
3
3
  # Contact Page
4
4
  get "contact_us", to: "website/pages#contact"
5
-
6
-
7
-
5
+ post "contact_us", to: "website/pages#create"
6
+
8
7
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksMailerForm
2
- VERSION = "0.0.4b"
2
+ VERSION = "0.2.0b"
3
3
  end
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.4b
4
+ version: 0.2.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-17 00:00:00.000000000 Z
11
+ date: 2020-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '6.1'
151
+ version: '6.2'
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '6.1'
158
+ version: '6.2'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: wicked
161
161
  requirement: !ruby/object:Gem::Requirement
@@ -260,14 +260,14 @@ dependencies:
260
260
  requirements:
261
261
  - - "~>"
262
262
  - !ruby/object:Gem::Version
263
- version: '2.1'
263
+ version: '2.2'
264
264
  type: :runtime
265
265
  prerelease: false
266
266
  version_requirements: !ruby/object:Gem::Requirement
267
267
  requirements:
268
268
  - - "~>"
269
269
  - !ruby/object:Gem::Version
270
- version: '2.1'
270
+ version: '2.2'
271
271
  - !ruby/object:Gem::Dependency
272
272
  name: sqlite3
273
273
  requirement: !ruby/object:Gem::Requirement
@@ -282,7 +282,7 @@ dependencies:
282
282
  - - "~>"
283
283
  - !ruby/object:Gem::Version
284
284
  version: '1.4'
285
- description: 'Beta Testing: Contact form using Rails actionmailer.'
285
+ description: 'Beta: Contact form using Rails ActionMailer.'
286
286
  email:
287
287
  - imfo@phcdevworks.com
288
288
  executables: []