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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1f2cc84142f627b3672ed4add5a00bade0900db9e6db8d93e7c73f7d1fc168
4
- data.tar.gz: 8dd583e21c7d0397f3ac265217f01ab764813448c737b6d603ff3aaa59f9008e
3
+ metadata.gz: 94d54e57ddb70041a87e506c619b209b7c7d29c308e68ae0ed9f0904fff4ab78
4
+ data.tar.gz: df965d16706bd84647d70aff3a223cfd9a9b5ef70d79a8e9785302bca9c472db
5
5
  SHA512:
6
- metadata.gz: 9e34174d360d4e37a70eee0174cc7aab91509e8ef0c33b4b8cb031ea3507adab7cb8535c89a3d90f2dde4225f5888f100d1c162f182fcb281f35acc951b5ceeb
7
- data.tar.gz: f4695339260479eca2a6f7db57e66963cf1b08774cf411e3de7fb7dc3c537873884d44e59996933b03538c81aa4fd53e27cad44a667da6c739e2f175bda24456
6
+ metadata.gz: d0813d9303ed45138d02ffe55697722b0004b8bdb3fde7af3b624938a473c75d3f7679aa19d4031f18a96b26ebf45530b45a3408e57112575d6aeb47420f7c2c
7
+ data.tar.gz: 9be85f2fdaf12e9614d241ec353bfe89a25d2c55935df597ca3f57efe3cebdef0614fead4ffe3ce8f6844b99fb72b26841c805032c6ee456c60ae4f4c136f129
@@ -1 +1 @@
1
- //= link_directory ../stylesheets/phcdevworks_mailer_form .css
1
+ //= link_directory ../stylesheets/phcdevworks_mailer_form .scss
@@ -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[: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.3b"
2
+ VERSION = "0.1.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.3b
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-16 00:00:00.000000000 Z
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 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: []
@@ -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/phcdevworks_mailer_form/website/pages.coffee
297
- - app/assets/stylesheets/phcdevworks_mailer_form/application.css
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
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/