activeadmin-selleo-cms 0.0.48 → 0.0.49

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,9 @@
1
1
  module ActiveadminSelleoCms
2
2
  class FormMailer < ActionMailer::Base
3
- default from: "web-form@jips.org"
4
-
5
3
  def form_submission(form, form_uuid)
6
4
  @form = form
7
5
  @form_uuid = form_uuid
8
- mail(to: 'aossowski@gmail.com', subject: "New form submission")
6
+ mail(subject: "New form submission")
9
7
  end
10
8
  end
11
9
  end
@@ -4,9 +4,9 @@
4
4
  <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
5
5
  </head>
6
6
  <body>
7
- <h3>New form has been submitted!</h3>
7
+ <h3>A new form "<%= @form.title %>" has been submitted!</h3>
8
8
  <p>
9
- <%= link_to "Click here for details.", "/forms/#{@form.id}/download?form_uuid=#{@form_uuid}" %>
9
+ <%= link_to "Click here for details.", "http://#{ActionMailer::Base.default_url_options[:host]}/forms/#{@form.id}/download?form_uuid=#{@form_uuid}" %>
10
10
  </p>
11
11
  </body>
12
12
  </html>
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  function print(form_id, form_dom_id){
51
- window.open('/forms/'+form_id+'/download?form_uuid='+localStorage[form_dom_id]);
51
+ window.open('/forms/'+form_id+'/download?print=true&form_uuid='+localStorage[form_dom_id]);
52
52
  }
53
53
 
54
54
  function deliver(form_id, form_dom_id) {
@@ -1,5 +1,8 @@
1
+ <h1><%= @form.title %></h1>
1
2
  <%= render partial: 'download'%>
2
3
 
4
+ <% if params[:print] %>
3
5
  <script>
4
6
  window.print();
5
7
  </script>
8
+ <% end %>
@@ -1 +1,2 @@
1
+ <h1><%= @form.title %></h1>
1
2
  <%= render partial: 'download'%>
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.48"
2
+ VERSION = "0.0.49"
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.48
4
+ version: 0.0.49
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: