activeadmin-selleo-cms 0.0.59 → 0.0.60

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ class FormsController < ApplicationController
21
21
  def deliver
22
22
  respond_to do |format|
23
23
  format.html do
24
- if ActiveadminSelleoCms::FormMailer.respond_to? :delay
24
+ if ActiveadminSelleoCms::FormMailer.respond_to? :delay and !Rails.env.development?
25
25
  ActiveadminSelleoCms::FormMailer.delay.form_submission(@form, params[:form_uuid])
26
26
  else
27
27
  ActiveadminSelleoCms::FormMailer.form_submission(@form, params[:form_uuid]).deliver
@@ -5,7 +5,7 @@ module ActiveadminSelleoCms
5
5
  @form_uuid = form_uuid
6
6
  mail(
7
7
  to: @form.delivery_emails(@form_uuid),
8
- subject: I18n.t("active_admin.cms.forms.email_subject")
8
+ subject: I18n.t("active_admin.cms.forms.new_form_email.subject")
9
9
  )
10
10
  end
11
11
  end
@@ -4,15 +4,18 @@
4
4
  <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
5
5
  </head>
6
6
  <body>
7
- <h3>A new form "<%= @form.title %>" has been submitted!</h3>
7
+ <h3><%= t("active_admin.cms.forms.new_form_email.header", form_title: @form.title) %></h3>
8
8
  <p>
9
- <%= link_to "Click here to preview the form", "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download?form_uuid=#{@form_uuid}" %>
9
+ <%= t("active_admin.cms.forms.new_form_email.body") %>
10
10
  </p>
11
11
  <p>
12
- <%= link_to "Print", "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download?form_uuid=#{@form_uuid}&print=true" %>
12
+ <%= link_to t("active_admin.cms.forms.new_form_email.preview_link"), "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download?form_uuid=#{@form_uuid}" %>
13
13
  </p>
14
14
  <p>
15
- <%= link_to "Download PDF", "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download.pdf?form_uuid=#{@form_uuid}" %>
15
+ <%= link_to t("active_admin.cms.forms.new_form_email.print_link"), "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download?form_uuid=#{@form_uuid}&print=true" %>
16
+ </p>
17
+ <p>
18
+ <%= link_to t("active_admin.cms.forms.new_form_email.pdf_link"), "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download.pdf?form_uuid=#{@form_uuid}" %>
16
19
  </p>
17
20
  </body>
18
21
  </html>
@@ -42,8 +42,15 @@ en:
42
42
  other: "Other"
43
43
  required: "&nbsp;(required)"
44
44
  email: "Delivery email"
45
- email_subject: "New form has been submitted"
46
45
  upload: "Upload"
47
46
  upload_new_file: "Upload new file"
48
47
  uploaded_files: "Uploaded files"
49
48
  delete: "(delete)"
49
+ new_form_email:
50
+ subject: "New form has been submitted"
51
+ header: "A new form %{form_title} has been submitted!"
52
+ body: "You can preview, print or download the form as PDF by clicking one of the following links:"
53
+ preview_link: "Preview"
54
+ print_link: "Print"
55
+ pdf_link: "Download PDF"
56
+
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.59"
2
+ VERSION = "0.0.60"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.59
4
+ version: 0.0.60
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: