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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e031affc87b9375d37e36da05a1326b785734eb4d8fe2320ee95b15ddfef5a6
4
- data.tar.gz: d6e01de75a31ae92772d32f962c266819c72783db29af850d4c228baa6ee1d35
3
+ metadata.gz: 84f0d5c7866c6bdedce7b018564198229b95425ab7e474c88b790e1c0c210c51
4
+ data.tar.gz: e2ce5d7aefa33e5afe824f57bf12e4dfa9075abf849ed9a753c9cb5c4dec7448
5
5
  SHA512:
6
- metadata.gz: 542f4c459c0ab5f0d546093005066aee163005812afacc0f7f9ab250bbb6be7bc993f1d3849a00ca54eeee2af74707f0314153ca56e6def1bf9234142633f9b6
7
- data.tar.gz: 42c52f432e4f1ef5e6a1aa0396a8dfd3112747966854d28e52c73846fb144275f32c2b0a40e5beb31ac951b2ef2aa431d638db07b10a0a888c82a487f2bf5334
6
+ metadata.gz: 93c22da59e76b854a92bf05c5f10a02a7e89f6ea3b438d5d0770be37c90aea1d4e5cae3bad7aa5c388997ddad3bbc65b6846ccfe0b63bacfe2c21a0805cd0029
7
+ data.tar.gz: 1e41b57d22506bc42052906af251536177de6a2ba1317a98d99e52772add300777d7cd729c0e3c381d50c9086fc1ef820f87ad81e52bee3f378ccf6bbbca0aee
@@ -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
@@ -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
- flash.now[:notice] = 'Thank You Message Sent!'
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 :index
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, :captcha)
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
- class FormMailers < MailForm::Base
2
-
3
- # Mailer Fields
4
- attributes :mailer_name, :validate => true
5
- attributes :mailer_email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
6
- attributes :mailer_department
7
- attributes :mailer_subject
8
- attributes :mailer_message
9
- attribute :mailer_captcha, :captcha => true
10
-
11
- # Mailer Header
12
- def headers
13
- {
14
- :subject => "Website Contact",
15
- :to => "info@phcnetworks.net",
16
- :from => %("#{mailer_name}" <#{mailer_email}>)
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: "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.2b'
2
+ VERSION = "0.0.7b"
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.2b
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-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
@@ -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/