ecm_contact2 1.0.1 → 1.1.0

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: c4f8e120b24a22981329833e812b3eefd65f5a61
4
- data.tar.gz: 653ab859ba763823131a945a6db0f4a14f4dc6bd
3
+ metadata.gz: f51e6c3f383be7e00f9885d427d8a49bfda38919
4
+ data.tar.gz: ae25e27a2976016df071287f55ed3ed019306f34
5
5
  SHA512:
6
- metadata.gz: 57a3b81675252e0c039178edfd5a0d1429c1f339f88a043d96e949379d78109c683ab499488a265676bdb51d91919d9a9b0b5c7b83537e50378d836f7afa24d0
7
- data.tar.gz: 8f1550181f6ac1b2046bc0ce28e32694099c4ad80f2aa33321e2b9f23087288b9cdfff5e3c75c18376ac029b02b60d1e48c8a50024eb4d2f6dd6148bbef9ec9c
6
+ metadata.gz: 1c122b7dc0c6b0f425efb5926c1379b3b25895b2695581b46ce1553f89443c798246a8f029ea9c0aab91d9f776f7377fd531fe95683cf30e9ed317ab9c09639e
7
+ data.tar.gz: 58d371e886eedf81c6ffd043327e3f936219a6ca5cf95c7a22eb100424a85139ab21073a77b18f5933b7eb414191ce17e3699a7eab3672f5eb0d6aead64cdb48
@@ -2,4 +2,6 @@
2
2
  <% content_for :meta_description do %><%= I18n.t('ecm.contact.request.index.meta_description') %><% end %>
3
3
  <h1><%= Ecm::Contact::Request.model_name.human %></h1>
4
4
 
5
+ <%= Ecm::Contact::Configuration.additional_contact_information.call(self) if Ecm::Contact::Configuration.additional_contact_information.respond_to?(:call) %>
6
+
5
7
  <%= render 'form' %>
@@ -8,15 +8,25 @@ module Ecm
8
8
  def configure
9
9
  yield self
10
10
  end
11
- mattr_accessor :input_name_css_classes
11
+ mattr_accessor :input_name_css_classes do
12
+ 'form-control'
13
+ end
12
14
 
13
- mattr_accessor :input_email_css_classes
15
+ mattr_accessor :input_email_css_classes do
16
+ 'form-control'
17
+ end
14
18
 
15
- mattr_accessor :input_phone_css_classes
19
+ mattr_accessor :input_phone_css_classes do
20
+ 'form-control'
21
+ end
16
22
 
17
- mattr_accessor :input_message_css_classes
23
+ mattr_accessor :input_message_css_classes do
24
+ 'form-control'
25
+ end
18
26
 
19
- mattr_accessor :input_terms_of_service_css_classes
27
+ mattr_accessor :input_terms_of_service_css_classes do
28
+ ''
29
+ end
20
30
 
21
31
  mattr_accessor :recipients do
22
32
  {}
@@ -26,6 +36,10 @@ module Ecm
26
36
  'ApplicationController'
27
37
  end
28
38
 
39
+ mattr_accessor :additional_contact_information do
40
+ nil
41
+ end
42
+
29
43
  def recipients=(recipients)
30
44
  @@recipients = HashWithIndifferentAccess.new(recipients)
31
45
  end
@@ -1,6 +1,6 @@
1
1
  module Ecm
2
2
  module Contact
3
- VERSION = '1.0.1'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
6
6
 
@@ -52,4 +52,15 @@ Ecm::Contact.configure do |config|
52
52
  # Default: config.base_controller = 'ApplicationController'
53
53
  #
54
54
  config.base_controller = 'ApplicationController'
55
+
56
+ # Add additional information to the contact form. This will be printed
57
+ # between the heading and the form. You should provide a proc, or
58
+ # an object, that reponds to #call. The view ist provided as paramter.
59
+ #
60
+ # Example: config.additional_contact_information = lambda { |view| view.render 'additional_contact_information' }
61
+ #
62
+ # Default: config.additional_contact_information = nil
63
+ #
64
+ config.additional_contact_information = nil
55
65
  end
66
+
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: 1.0.1
4
+ version: 1.1.0
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: 2015-10-25 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails