dhatu 0.1.14 → 0.1.15
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: 207582844252cbc513c51d56cd5ca842b933a252
|
4
|
+
data.tar.gz: 48bb89706fa65a6b83e2bb822f078e9f8f253c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c3cc6e28d138f9decf50ccc03655fd3b58c0197cc6fd73e0864e0945051a9e18e50ff4f1369235df8b479b680dfe44859d90f6dc85987016737350dcda429a
|
7
|
+
data.tar.gz: 2dabaff57d5a3c3672fb3216b96b537446c766892e55e4ec5d240e3c19444bd54635dbad75aead27b81c0807ad9b29e5da97852768230846a537a175405b17e5
|
@@ -4,7 +4,7 @@ module Dhatu
|
|
4
4
|
private
|
5
5
|
|
6
6
|
def permitted_params
|
7
|
-
params.require("dhatu/promotion").permit(:title, :short_description, :display_name, :display_email, :display_phone, :name_mandatory, :email_mandatory, :phone_mandatory)
|
7
|
+
params.require("dhatu/promotion").permit(:title, :short_description, :display_name, :display_email, :display_phone, :name_mandatory, :email_mandatory, :phone_mandatory, :show_popup, :show_only_on_homepage, :popup_lifespan_in_minutes)
|
8
8
|
end
|
9
9
|
|
10
10
|
def get_resource
|
@@ -65,7 +65,8 @@ module Dhatu
|
|
65
65
|
view_path: "dhatu/promotions",
|
66
66
|
collection_name: :promotions,
|
67
67
|
item_name: :promotion,
|
68
|
-
|
68
|
+
checkbox_fields: [:name_mandatory, :email_mandatory, :phone_mandatory, :show_popup, :show_only_on_homepage],
|
69
|
+
class: Dhatu::Promotion,
|
69
70
|
}
|
70
71
|
end
|
71
72
|
|
@@ -37,7 +37,18 @@
|
|
37
37
|
<%= theme_form_field(@promotion, :phone_mandatory, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
|
38
38
|
</div>
|
39
39
|
</div>
|
40
|
-
|
40
|
+
|
41
|
+
<div class="row">
|
42
|
+
<div class="col-md-4 pl-20">
|
43
|
+
<%= theme_form_field(@promotion, :show_popup, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
|
44
|
+
</div>
|
45
|
+
<div class="col-md-4 pl-20">
|
46
|
+
<%= theme_form_field(@promotion, :show_only_on_homepage, required: false, html_options: {type: :checkbox}, form_style: "top-bottom") %>
|
47
|
+
</div>
|
48
|
+
<div class="col-md-4 pl-20">
|
49
|
+
<%= theme_form_field(@promotion, :popup_lifespan_in_minutes, required: false, html_options: {type: :number, style: "width:80px"}, form_style: "top-bottom") %>
|
50
|
+
</div>
|
51
|
+
</div>
|
41
52
|
</div>
|
42
53
|
|
43
54
|
<div>
|
@@ -34,22 +34,52 @@
|
|
34
34
|
<tr>
|
35
35
|
<th>Display Name</th>
|
36
36
|
<td><%= @promotion.display_name ? "Yes" : "No" %></td>
|
37
|
-
|
38
|
-
|
37
|
+
<% if @promotion.display_phone %>
|
38
|
+
<th>Name Mandatory?</th>
|
39
|
+
<td><%= @promotion.name_mandatory ? "Yes" : "No" %></td>
|
40
|
+
<% else %>
|
41
|
+
<th></th>
|
42
|
+
<td></td>
|
43
|
+
<% end %>
|
39
44
|
</tr>
|
40
45
|
|
41
46
|
<tr>
|
42
47
|
<th>Display Email</th>
|
43
48
|
<td><%= @promotion.display_email ? "Yes" : "No" %></td>
|
49
|
+
<% if @promotion.display_email %>
|
44
50
|
<th>Email Mandatory?</th>
|
45
|
-
<td><%= @promotion.email_mandatory ? "Yes" : "No" %></td
|
51
|
+
<td><%= @promotion.email_mandatory ? "Yes" : "No" %></td
|
52
|
+
>
|
53
|
+
<% else %>
|
54
|
+
<th></th>
|
55
|
+
<td></td>
|
56
|
+
<% end %>
|
46
57
|
</tr>
|
47
58
|
|
48
59
|
<tr>
|
49
60
|
<th>Display Phone</th>
|
50
61
|
<td><%= @promotion.display_phone ? "Yes" : "No" %></td>
|
62
|
+
<% if @promotion.display_phone %>
|
51
63
|
<th>Phone Mandatory?</th>
|
52
64
|
<td><%= @promotion.phone_mandatory ? "Yes" : "No" %></td>
|
65
|
+
<% else %>
|
66
|
+
<th></th>
|
67
|
+
<td></td>
|
68
|
+
<% end %>
|
69
|
+
</tr>
|
70
|
+
|
71
|
+
<tr>
|
72
|
+
<th>Show Popup</th>
|
73
|
+
<td><%= @promotion.show_popup ? "Yes" : "No" %></td>
|
74
|
+
<th>Show Only on Homepage?</th>
|
75
|
+
<td><%= @promotion.show_only_on_homepage ? "Yes" : "No" %></td>
|
76
|
+
</tr>
|
77
|
+
|
78
|
+
<tr>
|
79
|
+
<th>Popup lifespan in minutes</th>
|
80
|
+
<td><%= @promotion.popup_lifespan_in_minutes %></td>
|
81
|
+
<th></th>
|
82
|
+
<td></td>
|
53
83
|
</tr>
|
54
84
|
|
55
85
|
</tbody>
|
data/lib/dhatu/version.rb
CHANGED