simple_contact 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/simple_contact/message.rb +1 -0
- data/app/views/simple_contact/contact/new.html.erb +49 -24
- data/app/views/simple_contact/contact_mailer/contact_message.html.erb +2 -4
- data/config/locales/en.yml +3 -4
- data/config/routes.rb +3 -2
- data/lib/simple_contact/engine.rb +2 -4
- data/lib/simple_contact/version.rb +1 -1
- data/test/dummy/log/development.log +1510 -0
- data/test/dummy/log/test.log +561 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3757a76e4a2601e881a26a95304e148c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/98fd2c085a74ec738711317e3165c032 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9de96c0b793236d6da31b0849d34d881 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b2fb5947f127c780362f6f64ba20371e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 143bf10259d2b189eebef503ef9c2091f822b9bf
|
4
|
+
data.tar.gz: 4128c655dbb59df3893d296f20369b23668d1136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa8c9f92bebfbf4152dfb4458749ddd2b34e9427b229099de364711dce8ed8653d078eae9000281a71a11eb01314b851a9e1f71ece66e08182cf7a1dd4ecf1bd
|
7
|
+
data.tar.gz: 9de72ccfff9f76735b3eef9f55a6b2c813f9d21b1b5ca74acf68f71c28eabc8d1a58bdd3290d805c491f64233b5e04d548e9caa406bb0c9aef8459ac2a946670
|
@@ -1,31 +1,56 @@
|
|
1
|
-
<div class=
|
1
|
+
<div class="page-header">
|
2
2
|
<h1>
|
3
3
|
<%= t(:contact_me) %>
|
4
|
-
<small> <%= t(:get_in_touch) %></small>
|
5
4
|
</h1>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<% @message.errors.
|
11
|
-
<
|
5
|
+
</div>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-8 col-sm-offset-2">
|
8
|
+
<%= form_for @message, url: simple_contact.create_contact_path, html: {class: "form-horizontal" } do |f| %>
|
9
|
+
<% if @message.errors.any? %>
|
10
|
+
<script>
|
11
|
+
$(document).ready(function() {
|
12
|
+
$('.field_with_errors').parent().addClass('has-error');
|
13
|
+
});
|
14
|
+
</script>
|
15
|
+
<p><%= t(:message_errors_present) %></p>
|
16
|
+
<ul class='list-unstyled'>
|
17
|
+
<% @message.errors.full_messages.each do |error| %>
|
18
|
+
<li><%= error %></li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
12
21
|
<% end %>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
<div class="form-inputs">
|
23
|
+
<div class="form-group">
|
24
|
+
<%= f.label :email, t(:email_address_label).html_safe, class: "col-xs-2 control-label" %>
|
25
|
+
<div class="col-xs-10">
|
26
|
+
<%= f.email_field :email, placeholder: t(:email_address_placeholder).html_safe, class: "form-control" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="form-group">
|
30
|
+
<%= f.label :name, t(:email_name_label).html_safe, class: "col-xs-2 control-label" %>
|
31
|
+
<div class="col-xs-10">
|
32
|
+
<%= f.text_field :name, placeholder: t(:email_name_placeholder).html_safe, class: "form-control" %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="form-group">
|
36
|
+
<%= f.label :subject, t(:email_subject_label).html_safe, class: "col-xs-2 control-label" %>
|
37
|
+
<div class="col-xs-10">
|
38
|
+
<%= f.text_field :subject, placeholder: t(:email_subject_placeholder).html_safe, class: "form-control" %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class="form-group">
|
42
|
+
<%= f.label :body, t(:email_body_label).html_safe, class: "col-xs-2 control-label" %>
|
43
|
+
<div class="col-xs-10">
|
44
|
+
<%= f.text_area :body, placeholder: t(:email_body_placeholder).html_safe, as: :text, rows: 10, class: "form-control" %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<br />
|
49
|
+
<div class="text-center">
|
50
|
+
<button name='commit' class='btn btn-primary btn-lg'><%= t(:submit_message).html_safe %></button>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
28
53
|
</div>
|
29
|
-
|
54
|
+
</div>
|
30
55
|
</div>
|
31
56
|
|
@@ -1,9 +1,7 @@
|
|
1
1
|
<h3> You've received a new message from: <%= mail_to @message.email, @message.name %> </h3>
|
2
2
|
<hr />
|
3
3
|
<h3> <%=@message.subject %> </h3>
|
4
|
-
|
5
4
|
<%= simple_format(@message.body) %>
|
6
|
-
|
5
|
+
<br />
|
7
6
|
<hr />
|
8
|
-
|
9
|
-
<p> Please respond to them within the next 24 hours </p>
|
7
|
+
<p> Please respond to <%= @message.name %> as soon as possible. </p>
|
data/config/locales/en.yml
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
en:
|
2
2
|
contact_me: "Contact Me"
|
3
|
-
get_in_touch: "Get in touch"
|
4
|
-
|
5
3
|
email_address_label: "Email Address"
|
6
4
|
email_address_placeholder: "Please enter your email address"
|
7
5
|
email_name_label: "Your Name"
|
@@ -10,6 +8,7 @@ en:
|
|
10
8
|
email_subject_placeholder: "Tell us what you want to know about"
|
11
9
|
email_body_label: "Message"
|
12
10
|
email_body_placeholder: "Please write your message..."
|
13
|
-
message_errors_present: "Please correct the following errors"
|
11
|
+
message_errors_present: "Please correct the following errors:"
|
14
12
|
mailer_success_message: "Thanks for contacting us. We'll be in touch soon!"
|
15
|
-
mailer_error_message: "Please correct the errors below"
|
13
|
+
mailer_error_message: "Please correct the errors below"
|
14
|
+
submit_message: "<i class='glyphicon glyphicon-envelope'></i> Send Message"
|
data/config/routes.rb
CHANGED