cama_contact_form 0.0.17 → 0.0.18
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: 320176081f13bd7f2cc54f68388aaa20dee423d9
|
4
|
+
data.tar.gz: 99b5cf2de7775901cb12c1160cc47b721e7474b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2a2d225613fc07bb11bae080d1a39a5e87faa09a5b6e27569cb2c7c851ea2eb27eceb5484b764268b209cebc1d63f7dcfdeda704d9b8bedbff2547f2b5347c9
|
7
|
+
data.tar.gz: 155627810d2343de307b279aa35f9a3e1fbf6fd30b5b940db7bbdfe206c7e496c195e67a0e000b11ba754b103e1245e05df6a60a4bd60dfb0b241913d411af24
|
@@ -18,7 +18,7 @@ module Plugins::CamaContactForm::ContactFormControllerConcern
|
|
18
18
|
if form_new.save
|
19
19
|
fields_data = convert_form_values(form, fields)
|
20
20
|
message_body = form.the_settings[:railscf_mail][:body].to_s.translate.cama_replace_codes(fields)
|
21
|
-
content = render_to_string(partial: plugin_view('contact_form/email_content'), layout: false, locals: {file_attachments: attachments, fields: fields_data, values: fields, message_body: message_body, form: form})
|
21
|
+
content = render_to_string(partial: plugin_view('contact_form/email_content'), layout: false, formats: ['html'], locals: {file_attachments: attachments, fields: fields_data, values: fields, message_body: message_body, form: form})
|
22
22
|
cama_send_email(form.the_settings[:railscf_mail][:to], form.the_settings[:railscf_mail][:subject].to_s.translate.cama_replace_codes(fields), {attachments: attachments, content: content, extra_data: {fields: fields_data}})
|
23
23
|
success << form.the_message('mail_sent_ok', t('.success_form_val', default: 'Your message has been sent successfully. Thank you very much!'))
|
24
24
|
args = {form: form, values: fields}; hooks_run("contact_form_after_submit", args)
|
@@ -17,7 +17,7 @@ class Plugins::CamaContactForm::FrontController < CamaleonCms::Apps::PluginsFron
|
|
17
17
|
flash[:contact_form][:error] = errors.join('<br>')
|
18
18
|
flash[:values] = fields.delete_if{|k, v| v.class.name == 'ActionDispatch::Http::UploadedFile' }
|
19
19
|
end
|
20
|
-
redirect_to :back
|
20
|
+
params[:format] == 'json' ? render(json: flash[:contact_form].to_hash) : (redirect_to :back)
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cama_contact_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen Peredo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|