ecm_contact2 4.0.1 → 4.0.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b21f9c40a67d16e198bde07233bbe654877f47f
|
4
|
+
data.tar.gz: 170731c1bef3497718826c1cfdbf54792928c0b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 290355612788ec2f6f537ab88d87d2051819ec821819c2d9df3cf42856563ee24bb5c37ca09230f26db63ffdf848e631f31a7bb75cf4557b76b1770b93ac1994
|
7
|
+
data.tar.gz: 2b58fe34085a24b3899a87685310337526a896c2b4363010d0ba2096fecc63d58771cdd0ff9a7780f45e263f6f90811d4711d3c1e7798c697f91dcaf1f6b2b20
|
@@ -8,7 +8,7 @@ module Ecm
|
|
8
8
|
|
9
9
|
def create
|
10
10
|
@title = I18n.t('ecm.contact.request.index.title')
|
11
|
-
@contact_request = ContactRequest.new(
|
11
|
+
@contact_request = ContactRequest.new(permitted_params)
|
12
12
|
|
13
13
|
if @contact_request.deliver
|
14
14
|
redirect_to(after_create_url, notice: -> { I18n.t('ecm.contact.form.messages.delivered') }.call)
|
@@ -19,6 +19,10 @@ module Ecm
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def permitted_params
|
23
|
+
params.require(:contact_request).permit(:nickname, :name, :email, :phone, :message, :terms_of_service)
|
24
|
+
end
|
25
|
+
|
22
26
|
def after_create_url
|
23
27
|
Ecm::Contact::Configuration.after_create_url.call(self)
|
24
28
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<h4 style="text-decoration:underline"><%= message.subject %></h4>
|
2
2
|
|
3
|
-
<% @resource.mail_attributes.each do |attribute
|
4
|
-
|
3
|
+
<% @resource.mail_attributes.each do |attribute| %>
|
4
|
+
<% value = @resource.send(attribute) %>
|
5
|
+
<% next if value.blank? %>
|
5
6
|
|
6
7
|
<p><b><%= @resource.class.human_attribute_name(attribute) %>:</b>
|
7
8
|
<%= case value
|
data/config/locales/de.yml
CHANGED
@@ -9,10 +9,11 @@ de:
|
|
9
9
|
page_title: Kontaktanfrage
|
10
10
|
meta_description: Kontaktieren Sie uns über unser Kontaktformular
|
11
11
|
title: Kontaktanfrage
|
12
|
-
subject: "[%{application_name}] Neue Kontaktanfrage"
|
13
12
|
contact_requests:
|
14
13
|
form:
|
15
14
|
submit: Abschicken
|
15
|
+
request:
|
16
|
+
subject: "[%{application_name}] Neue Kontaktanfrage"
|
16
17
|
views:
|
17
18
|
actions:
|
18
19
|
back: 'Zurück'
|
data/config/locales/en.yml
CHANGED
@@ -9,10 +9,11 @@ en:
|
|
9
9
|
page_title: Contact request
|
10
10
|
meta_description: Contact us
|
11
11
|
title: Contact request
|
12
|
-
subject: "[%{application_name}] New contact request"
|
13
12
|
contact_requests:
|
14
13
|
form:
|
15
14
|
submit: Submit
|
15
|
+
request:
|
16
|
+
subject: "[%{application_name}] New contact request"
|
16
17
|
views:
|
17
18
|
actions:
|
18
19
|
back: 'Back'
|
data/lib/ecm/contact/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_contact2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|