simple_form_bootstrap3 0.2.9 → 0.3.0
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: 5afdcffa73cffd6dfe2ac65b329e078a872da623
|
4
|
+
data.tar.gz: 448595ce076d075240039433902003eb983a4aac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a37376a8b87ef80954a6a9d4c6e763f7d57a4596ce0d788f7f1808413a047230c3cee41e9c9c82f2a844c8379b658853942a8b665fc3e283cf9fa6eb5a3a4b4b
|
7
|
+
data.tar.gz: 7687021a39cd83d796e17b25af3112baea47f91b2c9acaa96c61c75da29e1aa11709649026b1d7145bfd9bd90ba3f98a7d3c41ff53b42da32e27cc0ae7ab002f
|
@@ -2,10 +2,7 @@ module SimpleForm
|
|
2
2
|
module Inputs
|
3
3
|
class DatePickerInput < Base
|
4
4
|
def input
|
5
|
-
|
6
|
-
template.concat span_calendar
|
7
|
-
template.concat @builder.datetime_field(attribute_name, input_html_options)
|
8
|
-
end
|
5
|
+
@builder.datetime_field(attribute_name, input_html_options)
|
9
6
|
end
|
10
7
|
|
11
8
|
private
|
@@ -22,17 +19,7 @@ module SimpleForm
|
|
22
19
|
value = Time.zone.parse(value) if value.is_a?(String)
|
23
20
|
value = value.strftime("%Y-%m-%d") if value.respond_to?(:strftime)
|
24
21
|
|
25
|
-
{ class: 'form-control
|
26
|
-
end
|
27
|
-
|
28
|
-
def span_calendar
|
29
|
-
template.content_tag(:span, class: 'input-group-addon') do
|
30
|
-
template.concat icon_calendar
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def icon_calendar
|
35
|
-
'<i class="glyphicon glyphicon-calendar"></i>'.html_safe
|
22
|
+
{ class: 'form-control text-center date datepicker', value: value.presence || '' }
|
36
23
|
end
|
37
24
|
end
|
38
25
|
end
|
@@ -2,10 +2,7 @@ module SimpleForm
|
|
2
2
|
module Inputs
|
3
3
|
class DateTimePickerInput < Base
|
4
4
|
def input
|
5
|
-
|
6
|
-
template.concat span_calendar
|
7
|
-
template.concat @builder.datetime_field(attribute_name, input_html_options)
|
8
|
-
end
|
5
|
+
@builder.datetime_field(attribute_name, input_html_options)
|
9
6
|
end
|
10
7
|
|
11
8
|
private
|
@@ -22,17 +19,7 @@ module SimpleForm
|
|
22
19
|
value = Time.zone.parse(value) if value.is_a?(String)
|
23
20
|
value = value.strftime("%Y-%m-%d %H:%M") if value.respond_to?(:strftime)
|
24
21
|
|
25
|
-
{ class: 'form-control
|
26
|
-
end
|
27
|
-
|
28
|
-
def span_calendar
|
29
|
-
template.content_tag(:span, class: 'input-group-addon') do
|
30
|
-
template.concat icon_calendar
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def icon_calendar
|
35
|
-
'<i class="glyphicon glyphicon-calendar"></i>'.html_safe
|
22
|
+
{ class: 'form-control text-center datetime datetimepicker', value: value.presence || '' }
|
36
23
|
end
|
37
24
|
end
|
38
25
|
end
|
metadata
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_bootstrap3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuriy Kolodovskyy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
- - '>='
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 3.2.0.1
|
20
23
|
type: :runtime
|
@@ -22,6 +25,9 @@ dependencies:
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
30
|
+
- - '>='
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 3.2.0.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
@@ -29,6 +35,9 @@ dependencies:
|
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.0'
|
40
|
+
- - '>='
|
32
41
|
- !ruby/object:Gem::Version
|
33
42
|
version: 3.0.2
|
34
43
|
type: :runtime
|
@@ -36,6 +45,9 @@ dependencies:
|
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
47
|
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
50
|
+
- - '>='
|
39
51
|
- !ruby/object:Gem::Version
|
40
52
|
version: 3.0.2
|
41
53
|
description: Rails form generator with simple_form and bootstrap3.
|