simple_form_awesome 2.3.0 → 2.4.0
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.
- data/README.md +18 -1
- data/lib/generators/simple_form/templates/AUI_README +1 -1
- data/lib/simple_form/components/html5.rb +1 -1
- data/lib/simple_form/form_builder.rb +4 -4
- data/lib/simple_form/inputs.rb +0 -1
- data/lib/simple_form/inputs/base.rb +3 -0
- data/lib/simple_form/inputs/string_input.rb +2 -0
- data/lib/simple_form/version.rb +1 -1
- metadata +2 -3
- data/lib/simple_form/inputs/aui_string_input.rb +0 -10
data/README.md
CHANGED
@@ -9,7 +9,7 @@ https://docs.atlassian.com/aui/latest . Enjoy it!
|
|
9
9
|
|
10
10
|
Add it to your Gemfile:
|
11
11
|
|
12
|
-
`gem 'simple_form_awesome'`
|
12
|
+
`gem 'simple_form_awesome', '~> 2.4.0'`
|
13
13
|
|
14
14
|
Run the following command to install it:
|
15
15
|
|
@@ -20,6 +20,23 @@ Run the generator to install with AUI:
|
|
20
20
|
`rails generate simple_form:install --aui`
|
21
21
|
|
22
22
|
|
23
|
+
Inside your views, please add fieldset tag, and wrapper your submit or cancel
|
24
|
+
under a div that class is field_group.
|
25
|
+
|
26
|
+
NOTE: please use :as => :text_area instead of :as => :text when you want to use aui style.
|
27
|
+
as the following:
|
28
|
+
|
29
|
+
```erb
|
30
|
+
= simple_form_for @user do |form|
|
31
|
+
%fieldset
|
32
|
+
= f.input :name
|
33
|
+
= f.input :description, :as => :text_area
|
34
|
+
|
35
|
+
.field_group
|
36
|
+
= f.submit :class => "aui-button aui-button-primary"
|
37
|
+
= link_to "Cancel", "", :class => "aui-button aui-button-link"
|
38
|
+
```
|
39
|
+
|
23
40
|
## License
|
24
41
|
|
25
42
|
MIT License. Copyright 2012 Plataformatec.
|
@@ -2,7 +2,7 @@ require 'simple_form/core_ext/hash'
|
|
2
2
|
|
3
3
|
module SimpleForm
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder
|
5
|
-
attr_reader :template, :object_name, :object, :wrapper
|
5
|
+
attr_reader :template, :object_name, :object, :wrapper, :wrapper_name
|
6
6
|
|
7
7
|
# When action is create or update, we still should use new and edit
|
8
8
|
ACTIONS = {
|
@@ -26,8 +26,7 @@ module SimpleForm
|
|
26
26
|
map_type :date, :time, :datetime, :to => SimpleForm::Inputs::DateTimeInput
|
27
27
|
map_type :country, :time_zone, :to => SimpleForm::Inputs::PriorityInput
|
28
28
|
map_type :boolean, :to => SimpleForm::Inputs::BooleanInput
|
29
|
-
map_type :text_area, to
|
30
|
-
map_type :aui_string, to: SimpleForm::Inputs::AuiStringInput
|
29
|
+
map_type :text_area, :to => SimpleForm::Inputs::TextAreaInput
|
31
30
|
|
32
31
|
|
33
32
|
def self.discovery_cache
|
@@ -37,7 +36,8 @@ module SimpleForm
|
|
37
36
|
def initialize(*) #:nodoc:
|
38
37
|
super
|
39
38
|
@defaults = options[:defaults]
|
40
|
-
@
|
39
|
+
@wrapper_name = options[:wrapper] || SimpleForm.default_wrapper
|
40
|
+
@wrapper = SimpleForm.wrapper(@wrapper_name)
|
41
41
|
end
|
42
42
|
|
43
43
|
# Basic input helper, combines all components in the stack to generate
|
data/lib/simple_form/inputs.rb
CHANGED
@@ -18,6 +18,5 @@ module SimpleForm
|
|
18
18
|
autoload :StringInput, 'simple_form/inputs/string_input'
|
19
19
|
autoload :TextInput, 'simple_form/inputs/text_input'
|
20
20
|
autoload :TextAreaInput, 'simple_form/inputs/text_area_input'
|
21
|
-
autoload :AuiStringInput, 'simple_form/inputs/aui_string_input'
|
22
21
|
end
|
23
22
|
end
|
data/lib/simple_form/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_awesome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-06-01 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activemodel
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- lib/simple_form/inputs/collection_check_boxes_input.rb
|
79
79
|
- lib/simple_form/inputs/text_area_input.rb
|
80
80
|
- lib/simple_form/inputs/password_input.rb
|
81
|
-
- lib/simple_form/inputs/aui_string_input.rb
|
82
81
|
- lib/simple_form/inputs/text_input.rb
|
83
82
|
- lib/simple_form/inputs/numeric_input.rb
|
84
83
|
- lib/simple_form/inputs/range_input.rb
|