refinerycms-forms 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/generators/refinery/form/USAGE +1 -1
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/settings_controller.rb.erb +6 -6
- data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/db/seeds.rb.erb +2 -2
- data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +1 -1
- data/lib/refinery/forms.rb +20 -0
- metadata +25 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8fb2aa9be4ef0a82b6f504960db3c5368f3497203619f7ea3ebcce2ad98570e0
|
4
|
+
data.tar.gz: f5320a660a900d66dd928ac8a2d864dbb2e8cefdb4377eeb2139fd535a475fa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e64f8d02bff46d14c2e01d70d7057351d22729689d9106871ba7993839da77a6971b83fee18aa20dc9333427f998e34b9fd3dbd6ce0e5be388c4e80fec07bd
|
7
|
+
data.tar.gz: 03a11c4cc127d3ce5a9a4cd56f02439d998b433d885d44454f7de5245ecf1b670bc47fc4a216d38db8b3329570a40bb019009c454b57825e9a65326607ae0610
|
@@ -17,4 +17,4 @@ Additional Supported Field Types
|
|
17
17
|
select - creates a select list with options using Model::FIELD_NAMES
|
18
18
|
|
19
19
|
Example:
|
20
|
-
rails generate refinery:form job_inquiry name:string message:text job_type:radio brochure:checkbox qualification:select
|
20
|
+
rails generate refinery:form job_inquiry name:string message:text job_type:radio brochure:checkbox qualification:select --authors 'John Jones'
|
@@ -10,13 +10,13 @@ module Refinery
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def update
|
13
|
-
|
13
|
+
flash[:notice] = t('refinery.crudify.updated', what: @setting.name.gsub("<%= singular_name %>_", "").titleize)
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
if request.xhr? or from_dialog?
|
16
|
+
render html: "<script type='text/javascript'>parent.window.location = '#{refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path}';</script>".html_safe
|
17
|
+
else
|
18
|
+
redirect_back_or_default(refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path)
|
19
|
+
end
|
20
20
|
end
|
21
21
|
|
22
22
|
protected
|
@@ -25,8 +25,8 @@ Refinery::I18n.frontend_locales.each do |lang|
|
|
25
25
|
)
|
26
26
|
thank_you_page.update_attribute(:parent, page)
|
27
27
|
Refinery::Pages.default_parts.each do |default_page_part|
|
28
|
-
page.parts.where(:
|
29
|
-
thank_you_page.parts.where(:
|
28
|
+
page.parts.where(title: default_page_part[:title]).first_or_create!(slug: default_page_part[:slug], body: nil)
|
29
|
+
thank_you_page.parts.where(title: default_page_part[:title]).first_or_create!(slug: default_page_part[:slug], body: nil)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.summary = "<%= plural_name.titleize %> forms-extension for Refinery CMS"
|
10
10
|
s.require_paths = %w(lib)
|
11
11
|
s.files = Dir["{app,config,db,lib}/**/*"] + ["readme.md"]
|
12
|
-
s.authors =
|
12
|
+
s.authors = <%= extension_authors %>
|
13
13
|
|
14
14
|
# Runtime dependencies
|
15
15
|
s.add_dependency "refinerycms-core", "~> <%= Refinery::Version %>"
|
data/lib/refinery/forms.rb
CHANGED
@@ -1 +1,21 @@
|
|
1
1
|
require 'refinerycms-core'
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
autoload :FormGenerator, 'generators/refinery/form/form_generator'
|
5
|
+
|
6
|
+
module Forms
|
7
|
+
require 'refinery/forms/engine'
|
8
|
+
|
9
|
+
class << self
|
10
|
+
attr_writer :root
|
11
|
+
|
12
|
+
def root
|
13
|
+
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
14
|
+
end
|
15
|
+
|
16
|
+
def factory_paths
|
17
|
+
@factory_paths ||= [ root.join('spec', 'factories').to_s ]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,44 +1,56 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Arndt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: refinerycms-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.0'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '5'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: refinerycms-testing
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
39
|
+
version: '4.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '5'
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4.0'
|
50
|
+
- - "<"
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description: Form generator for Refinery CMS
|
52
|
+
version: '5'
|
53
|
+
description: Form generator for Refinery CMS v4.0 (rails generate refinery:form)
|
42
54
|
email: rubygems@p.arndt.io
|
43
55
|
executables: []
|
44
56
|
extensions: []
|
@@ -129,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
141
|
- !ruby/object:Gem::Version
|
130
142
|
version: '0'
|
131
143
|
requirements: []
|
132
|
-
|
133
|
-
rubygems_version: 2.5.1
|
144
|
+
rubygems_version: 3.0.3
|
134
145
|
signing_key:
|
135
146
|
specification_version: 4
|
136
|
-
summary: Form generator for Refinery CMS
|
147
|
+
summary: Form generator for Refinery CMS v4.0
|
137
148
|
test_files: []
|