scrivito_crm_form_widget 0.1.1 → 0.1.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a43a0a25760b9265c7ccef43eba38980b5f20b1d
|
|
4
|
+
data.tar.gz: 98eb6fb7a70cfc9f661611cbd105c064a7e855fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3567cdf96cebe341f857db8e0069e184bd26f93f2197911cdd1f357c33fc3e737b1da2b2d72a936faa9d7019243edbd77bf486c9bd701feb1afb34c33238052e
|
|
7
|
+
data.tar.gz: 6bf225abbefdaa9a864f1f14e197ea9efe40751d3c5f18b8a655db55321d4155f9cbc2bd00f4c6e02be8b942f728bfe6886856cc22ef38e3d6dd6e7391c2a880
|
|
@@ -10,14 +10,15 @@ class CrmFormPresenter < CrmFormAttributes
|
|
|
10
10
|
@page = widget.obj
|
|
11
11
|
@params = request.params["crm_form_presenter"]
|
|
12
12
|
|
|
13
|
-
if request.post?
|
|
13
|
+
if request.post? && widget.id == @params[:widget_id]
|
|
14
|
+
@params.delete("widget_id")
|
|
14
15
|
redirect_after_submit(controller, widget, self.submit)
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def submit
|
|
19
20
|
contact = nil
|
|
20
|
-
|
|
21
|
+
|
|
21
22
|
if @params['custom_email'] && @params['custom_last_name']
|
|
22
23
|
contact = manipulate_or_create_user
|
|
23
24
|
end
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
<%= form.hidden_field(:title, value: widget.subject) %>
|
|
4
4
|
<% end %>
|
|
5
5
|
|
|
6
|
+
<%= form.hidden_field(:widget_id, value: widget.id) %>
|
|
7
|
+
|
|
6
8
|
<% widget.attributes.each do |name, options| %>
|
|
7
9
|
<%= render "crm_form_widget/crm_#{options["attribute_type"]}", form: form, name: name, options: options %>
|
|
8
10
|
<% end %>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div class="tab-panel" id="edit-tags">
|
|
23
23
|
<%= scrivito_details_for 'Tags for Contact' do %>
|
|
24
24
|
<div class="alert alert-info">
|
|
25
|
-
optional attribute. can be used to add tags to a contact like has_visited_event. contatc will be calculated by the custom attributes email and last_name of your selected activtiy. If this fields do not exist, this field has no effect.
|
|
25
|
+
optional attribute. can be used to add tags to a contact like has_visited_event. contatc will be calculated by the custom attributes email and last_name of your selected activtiy. If this fields do not exist, this field has no effect.
|
|
26
26
|
</div>
|
|
27
27
|
<%= scrivito_tag :div, widget, :tags, data: {editor: 'scrivito-list-editor'} %>
|
|
28
28
|
<% end %>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<div class="tab-panel" id="edit-event">
|
|
38
38
|
<%= scrivito_details_for 'Event' do %>
|
|
39
|
-
|
|
39
|
+
<%- scrivito_toggle_button_editor(widget, :event_id, CrmFormWidget.events) do |event| %>
|
|
40
40
|
<%= scrivito_tag(:button, widget, :event_id, data: {editor: 'scrivito-toggle-button', content: event.id}) do %>
|
|
41
41
|
<%= event.title %>
|
|
42
42
|
<% end %>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scrivito_crm_form_widget
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scrivito
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
142
142
|
version: '0'
|
|
143
143
|
requirements: []
|
|
144
144
|
rubyforge_project:
|
|
145
|
-
rubygems_version: 2.
|
|
145
|
+
rubygems_version: 2.4.5
|
|
146
146
|
signing_key:
|
|
147
147
|
specification_version: 4
|
|
148
148
|
summary: A widget for Scrivito to show a form using Infopark CRM api v2.0.
|