bootstrap_form_extensions 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/bootstrap_form_extensions/scheduler.js +1 -1
- data/app/views/bootstrap_form_extensions/_submit_bar.html.erb +1 -1
- data/lib/bootstrap_form_extensions.rb +1 -0
- data/lib/bootstrap_form_extensions/select_or_new.rb +3 -3
- data/lib/bootstrap_form_extensions/submit_bar.rb +1 -1
- data/lib/bootstrap_form_extensions/timespan.rb +3 -5
- data/lib/bootstrap_form_extensions/version.rb +1 -1
- data/test/arrayed_field_test.rb +9 -9
- data/test/dummy/log/test.log +6489 -0
- data/test/duration_test.rb +3 -3
- data/test/javascripts/arrayed_field_spec.js +11 -11
- data/test/javascripts/duration_spec.js +9 -6
- data/test/javascripts/scheduler_spec.js +2 -2
- data/test/javascripts/select_or_new_spec.js +2 -2
- data/test/javascripts/timespan_spec.js +2 -2
- data/test/scheduler_test.rb +1 -1
- data/test/select_or_new_test.rb +2 -2
- data/test/submit_bar_test.rb +1 -1
- data/test/timespan_test.rb +2 -2
- metadata +2 -2
data/test/duration_test.rb
CHANGED
@@ -8,7 +8,7 @@ class DurationTest < ActionView::TestCase
|
|
8
8
|
end
|
9
9
|
|
10
10
|
test "duration" do
|
11
|
-
expected = '<div class="form-group duration-group" data-duration="true"><label class="
|
11
|
+
expected = '<div class="form-group duration-group row" data-duration="true"><label class="col-form-label col-2" for="thing_duration_in_seconds2">Duration in seconds2</label><div class="col-10 form-inline"><input class="duration-seconds" data-formatted="1:37:23.476" type="hidden" value="5843.476" name="thing[duration_in_seconds2]" id="thing_duration_in_seconds2" /><input type="number" name="thing[hours]" id="thing_hours" value="1" class="form-control hours" min="0" pattern="[0-9]*" />:<input type="number" name="thing[minutes]" id="thing_minutes" value="37" class="form-control minutes" min="0" pattern="[0-9]*" max="59" />:<input type="number" name="thing[seconds]" id="thing_seconds" value="23" class="form-control seconds" min="0" pattern="[0-9]*" max="59" />.<input type="number" name="thing[milliseconds]" id="thing_milliseconds" value="476" class="form-control milliseconds" min="0" pattern="[0-9]*" max="999" /></div></div>'
|
12
12
|
assert_equal expected, @builder.duration(:duration_in_seconds2)
|
13
13
|
end
|
14
14
|
|
@@ -17,12 +17,12 @@ class DurationTest < ActionView::TestCase
|
|
17
17
|
assert_equal expected, @builder.duration_without_bootstrap(:duration_in_seconds2)
|
18
18
|
end
|
19
19
|
|
20
|
-
test "duration_without_bootstrap accepts wrapper options, like a bootstrap form's form-group" do
|
20
|
+
test "duration_without_bootstrap accepts wrapper options, like a bootstrap form's form-group row" do
|
21
21
|
@output_buffer = @builder.duration_without_bootstrap :duration_in_seconds2, wrapper: { data: { test: 'accepts' } }
|
22
22
|
assert_select 'div.duration-group[data-test="accepts"]'
|
23
23
|
end
|
24
24
|
|
25
|
-
test "duration_without_bootstrap accepts wrapper_class, like a bootstrap form's form-group" do
|
25
|
+
test "duration_without_bootstrap accepts wrapper_class, like a bootstrap form's form-group row" do
|
26
26
|
@output_buffer = @builder.duration_without_bootstrap :duration_in_seconds2, wrapper_class: 'test_class'
|
27
27
|
assert_select 'div.duration-group.test_class'
|
28
28
|
end
|
@@ -41,35 +41,35 @@ describe("ArrayedField", function() {
|
|
41
41
|
return '<div data-arrayed-field="true">'
|
42
42
|
+' <div class="blueprint-for-arrayed-field" style="display:none;">'
|
43
43
|
+' <div class="row mt-1">'
|
44
|
-
+' <div class="col
|
44
|
+
+' <div class="col">'
|
45
45
|
+' <input type="url" id="" class="form-control" data-name="thing[urls][]" />'
|
46
46
|
+' </div>'
|
47
|
-
+' <div class="col-
|
48
|
-
+' <a class="btn btn-
|
47
|
+
+' <div class="col-auto ml-auto">'
|
48
|
+
+' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">×</a>'
|
49
49
|
+' </div>'
|
50
50
|
+' </div>'
|
51
51
|
+' </div>'
|
52
52
|
+' <div class="arrayed-field-rows">'
|
53
53
|
+' <div class="row mt-1">'
|
54
|
-
+' <div class="col
|
54
|
+
+' <div class="col">'
|
55
55
|
+' <input type="url" id="" class="form-control" name="thing[urls][]" />'
|
56
56
|
+' </div>'
|
57
|
-
+' <div class="col-
|
58
|
-
+' <a class="btn btn-
|
57
|
+
+' <div class="col-auto ml-auto">'
|
58
|
+
+' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">×</a>'
|
59
59
|
+' </div>'
|
60
60
|
+' </div>'
|
61
61
|
+' <div class="row mt-1">'
|
62
|
-
+' <div class="col
|
62
|
+
+' <div class="col">'
|
63
63
|
+' <input type="url" id="" class="form-control" name="thing[urls][]" />'
|
64
64
|
+' </div>'
|
65
|
-
+' <div class="col-
|
66
|
-
+' <a class="btn btn-
|
65
|
+
+' <div class="col-auto ml-auto">'
|
66
|
+
+' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">×</a>'
|
67
67
|
+' </div>'
|
68
68
|
+' </div>'
|
69
69
|
+' </div>'
|
70
70
|
+' <div class="row mt-1">'
|
71
|
-
+' <div class="col-
|
72
|
-
+' <a class="btn btn-
|
71
|
+
+' <div class="col-auto ml-auto2">'
|
72
|
+
+' <a class="btn btn-light add-arrayed-field-row" href="javascript:void(0);">+</a>'
|
73
73
|
+' </div>'
|
74
74
|
+' </div>'
|
75
75
|
+'</div>'
|
@@ -38,12 +38,15 @@ describe("Duration", function() {
|
|
38
38
|
|
39
39
|
var $element
|
40
40
|
var fixture = function() {
|
41
|
-
return '<div class="duration-group" data-duration="true">'
|
42
|
-
+ ' <
|
43
|
-
+ ' <
|
44
|
-
+ '
|
45
|
-
+ '
|
46
|
-
+ '
|
41
|
+
return '<div class="form-group duration-group row" data-duration="true">'
|
42
|
+
+ ' <label class="col-form-label col-2" for="thing_duration_in_seconds2">Duration in seconds2</label>'
|
43
|
+
+ ' <div class="col-10 form-inline">'
|
44
|
+
+ ' <input class="duration-seconds" data-formatted="0:00:00.000" type="hidden" value="0" name="thing[duration_in_seconds2]" id="thing_duration_in_seconds2" />'
|
45
|
+
+ ' <input type="number" name="thing[hours]" id="thing_hours" value="0" class="form-control hours" min="0" pattern="[0-9]*" />:'
|
46
|
+
+ ' <input type="number" name="thing[minutes]" id="thing_minutes" value="0" class="form-control minutes" min="0" pattern="[0-9]*" max="59" />:'
|
47
|
+
+ ' <input type="number" name="thing[seconds]" id="thing_seconds" value="0" class="form-control seconds" min="0" pattern="[0-9]*" max="59" />.'
|
48
|
+
+ ' <input type="number" name="thing[milliseconds]" id="thing_milliseconds" value="0" class="form-control milliseconds" min="0" pattern="[0-9]*" max="999" />'
|
49
|
+
+ ' </div>'
|
47
50
|
+ '</div>'
|
48
51
|
}
|
49
52
|
|
@@ -38,8 +38,8 @@ describe("Scheduler", function() {
|
|
38
38
|
|
39
39
|
var $element
|
40
40
|
var fixture = function() {
|
41
|
-
return '<div class="form-group" data-scheduler="true">'
|
42
|
-
+' <label class="
|
41
|
+
return '<div class="form-group row" data-scheduler="true">'
|
42
|
+
+' <label class="col-form-label col-2" for="thing_schedule">Schedule</label>'
|
43
43
|
+' <div class="col-10">'
|
44
44
|
+' <input class="scheduler-hidden-field" id="thing_schedule" name="thing[schedule]" type="hidden" value="[[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]">'
|
45
45
|
+' <table class="scheduler-badge">'
|
@@ -38,8 +38,8 @@ describe("SelectOrNew", function() {
|
|
38
38
|
|
39
39
|
var $element, $select, $input, $inputGroup
|
40
40
|
var fixture = function() {
|
41
|
-
return '<div class="form-group" data-select-or-new="true">'
|
42
|
-
+' <label class="
|
41
|
+
return '<div class="form-group row" data-select-or-new="true">'
|
42
|
+
+' <label class="col-form-label col-2" for="thing_category">Category</label>'
|
43
43
|
+' <div class="col-10">'
|
44
44
|
+' <select class="form-control" name="thing[category]" id="thing_category">'
|
45
45
|
+' <option value="">Please select</option>'
|
@@ -40,11 +40,11 @@ describe("Timespan", function() {
|
|
40
40
|
var fixture = function() {
|
41
41
|
return '<span data-timespan="true">'
|
42
42
|
+' <input class="timespan-seconds" type="hidden" value="0" name="duration_in_seconds" id="duration_in_seconds">'
|
43
|
-
+' <div class="form-group">'
|
43
|
+
+' <div class="form-group row">'
|
44
44
|
+' <input type="text" name="duration_quantity" id="duration_quantity" value="1" size="5" class="form-control timespan-quantity">'
|
45
45
|
+' </div>'
|
46
46
|
+' '
|
47
|
-
+' <div class="form-group">'
|
47
|
+
+' <div class="form-group row">'
|
48
48
|
+' <select name="duration_unit" id="duration_unit" class="form-control timespan-unit">'
|
49
49
|
+' <option value="3600" selected>hours</option>'
|
50
50
|
+' <option value="86400">days</option>'
|
data/test/scheduler_test.rb
CHANGED
@@ -8,7 +8,7 @@ class SchedulerTest < ActionView::TestCase
|
|
8
8
|
end
|
9
9
|
|
10
10
|
test "scheduler" do
|
11
|
-
expected = '<div class="form-group" data-scheduler="true"><label class="control-label col-2" for="thing_schedule">Schedule</label><div class="col-10"><input value="[[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]" class="scheduler-hidden-field" type="hidden" name="thing[schedule]" id="thing_schedule" /><table class="scheduler-badge"><tbody><tr><td class="off" data-day="0" data-hour="0"> </td><td class="on" data-day="0" data-hour="1"> </td><td class="on" data-day="0" data-hour="2"> </td><td class="on" data-day="0" data-hour="3"> </td><td class="on" data-day="0" data-hour="4"> </td><td class="on" data-day="0" data-hour="5"> </td><td class="on" data-day="0" data-hour="6"> </td><td class="on" data-day="0" data-hour="7"> </td><td class="on" data-day="0" data-hour="8"> </td><td class="on" data-day="0" data-hour="9"> </td><td class="on" data-day="0" data-hour="10"> </td><td class="on" data-day="0" data-hour="11"> </td><td class="on" data-day="0" data-hour="12"> </td><td class="on" data-day="0" data-hour="13"> </td><td class="on" data-day="0" data-hour="14"> </td><td class="on" data-day="0" data-hour="15"> </td><td class="on" data-day="0" data-hour="16"> </td><td class="on" data-day="0" data-hour="17"> </td><td class="on" data-day="0" data-hour="18"> </td><td class="on" data-day="0" data-hour="19"> </td><td class="on" data-day="0" data-hour="20"> </td><td class="on" data-day="0" data-hour="21"> </td><td class="on" data-day="0" data-hour="22"> </td><td class="on" data-day="0" data-hour="23"> </td></tr><tr><td class="off" data-day="1" data-hour="0"> </td><td class="on" data-day="1" data-hour="1"> </td><td class="on" data-day="1" data-hour="2"> </td><td class="on" data-day="1" data-hour="3"> </td><td class="on" data-day="1" data-hour="4"> </td><td class="on" data-day="1" data-hour="5"> </td><td class="on" data-day="1" data-hour="6"> </td><td class="on" data-day="1" data-hour="7"> </td><td class="on" data-day="1" data-hour="8"> </td><td class="on" data-day="1" data-hour="9"> </td><td class="on" data-day="1" data-hour="10"> </td><td class="on" data-day="1" data-hour="11"> </td><td class="on" data-day="1" data-hour="12"> </td><td class="on" data-day="1" data-hour="13"> </td><td class="on" data-day="1" data-hour="14"> </td><td class="on" data-day="1" data-hour="15"> </td><td class="on" data-day="1" data-hour="16"> </td><td class="on" data-day="1" data-hour="17"> </td><td class="on" data-day="1" data-hour="18"> </td><td class="on" data-day="1" data-hour="19"> </td><td class="on" data-day="1" data-hour="20"> </td><td class="on" data-day="1" data-hour="21"> </td><td class="on" data-day="1" data-hour="22"> </td><td class="on" data-day="1" data-hour="23"> </td></tr><tr><td class="off" data-day="2" data-hour="0"> </td><td class="on" data-day="2" data-hour="1"> </td><td class="on" data-day="2" data-hour="2"> </td><td class="on" data-day="2" data-hour="3"> </td><td class="on" data-day="2" data-hour="4"> </td><td class="on" data-day="2" data-hour="5"> </td><td class="on" data-day="2" data-hour="6"> </td><td class="on" data-day="2" data-hour="7"> </td><td class="on" data-day="2" data-hour="8"> </td><td class="on" data-day="2" data-hour="9"> </td><td class="on" data-day="2" data-hour="10"> </td><td class="on" data-day="2" data-hour="11"> </td><td class="on" data-day="2" data-hour="12"> </td><td class="on" data-day="2" data-hour="13"> </td><td class="on" data-day="2" data-hour="14"> </td><td class="on" data-day="2" data-hour="15"> </td><td class="on" data-day="2" data-hour="16"> </td><td class="on" data-day="2" data-hour="17"> </td><td class="on" data-day="2" data-hour="18"> </td><td class="on" data-day="2" data-hour="19"> </td><td class="on" data-day="2" data-hour="20"> </td><td class="on" data-day="2" data-hour="21"> </td><td class="on" data-day="2" data-hour="22"> </td><td class="on" data-day="2" data-hour="23"> </td></tr><tr><td class="off" data-day="3" data-hour="0"> </td><td class="on" data-day="3" data-hour="1"> </td><td class="on" data-day="3" data-hour="2"> </td><td class="on" data-day="3" data-hour="3"> </td><td class="on" data-day="3" data-hour="4"> </td><td class="on" data-day="3" data-hour="5"> </td><td class="on" data-day="3" data-hour="6"> </td><td class="on" data-day="3" data-hour="7"> </td><td class="on" data-day="3" data-hour="8"> </td><td class="on" data-day="3" data-hour="9"> </td><td class="on" data-day="3" data-hour="10"> </td><td class="on" data-day="3" data-hour="11"> </td><td class="on" data-day="3" data-hour="12"> </td><td class="on" data-day="3" data-hour="13"> </td><td class="on" data-day="3" data-hour="14"> </td><td class="on" data-day="3" data-hour="15"> </td><td class="on" data-day="3" data-hour="16"> </td><td class="on" data-day="3" data-hour="17"> </td><td class="on" data-day="3" data-hour="18"> </td><td class="on" data-day="3" data-hour="19"> </td><td class="on" data-day="3" data-hour="20"> </td><td class="on" data-day="3" data-hour="21"> </td><td class="on" data-day="3" data-hour="22"> </td><td class="on" data-day="3" data-hour="23"> </td></tr><tr><td class="off" data-day="4" data-hour="0"> </td><td class="on" data-day="4" data-hour="1"> </td><td class="on" data-day="4" data-hour="2"> </td><td class="on" data-day="4" data-hour="3"> </td><td class="on" data-day="4" data-hour="4"> </td><td class="on" data-day="4" data-hour="5"> </td><td class="on" data-day="4" data-hour="6"> </td><td class="on" data-day="4" data-hour="7"> </td><td class="on" data-day="4" data-hour="8"> </td><td class="on" data-day="4" data-hour="9"> </td><td class="on" data-day="4" data-hour="10"> </td><td class="on" data-day="4" data-hour="11"> </td><td class="on" data-day="4" data-hour="12"> </td><td class="on" data-day="4" data-hour="13"> </td><td class="on" data-day="4" data-hour="14"> </td><td class="on" data-day="4" data-hour="15"> </td><td class="on" data-day="4" data-hour="16"> </td><td class="on" data-day="4" data-hour="17"> </td><td class="on" data-day="4" data-hour="18"> </td><td class="on" data-day="4" data-hour="19"> </td><td class="on" data-day="4" data-hour="20"> </td><td class="on" data-day="4" data-hour="21"> </td><td class="on" data-day="4" data-hour="22"> </td><td class="on" data-day="4" data-hour="23"> </td></tr><tr><td class="off" data-day="5" data-hour="0"> </td><td class="on" data-day="5" data-hour="1"> </td><td class="on" data-day="5" data-hour="2"> </td><td class="on" data-day="5" data-hour="3"> </td><td class="on" data-day="5" data-hour="4"> </td><td class="on" data-day="5" data-hour="5"> </td><td class="on" data-day="5" data-hour="6"> </td><td class="on" data-day="5" data-hour="7"> </td><td class="on" data-day="5" data-hour="8"> </td><td class="on" data-day="5" data-hour="9"> </td><td class="on" data-day="5" data-hour="10"> </td><td class="on" data-day="5" data-hour="11"> </td><td class="on" data-day="5" data-hour="12"> </td><td class="on" data-day="5" data-hour="13"> </td><td class="on" data-day="5" data-hour="14"> </td><td class="on" data-day="5" data-hour="15"> </td><td class="on" data-day="5" data-hour="16"> </td><td class="on" data-day="5" data-hour="17"> </td><td class="on" data-day="5" data-hour="18"> </td><td class="on" data-day="5" data-hour="19"> </td><td class="on" data-day="5" data-hour="20"> </td><td class="on" data-day="5" data-hour="21"> </td><td class="on" data-day="5" data-hour="22"> </td><td class="on" data-day="5" data-hour="23"> </td></tr><tr><td class="off" data-day="6" data-hour="0"> </td><td class="on" data-day="6" data-hour="1"> </td><td class="on" data-day="6" data-hour="2"> </td><td class="on" data-day="6" data-hour="3"> </td><td class="on" data-day="6" data-hour="4"> </td><td class="on" data-day="6" data-hour="5"> </td><td class="on" data-day="6" data-hour="6"> </td><td class="on" data-day="6" data-hour="7"> </td><td class="on" data-day="6" data-hour="8"> </td><td class="on" data-day="6" data-hour="9"> </td><td class="on" data-day="6" data-hour="10"> </td><td class="on" data-day="6" data-hour="11"> </td><td class="on" data-day="6" data-hour="12"> </td><td class="on" data-day="6" data-hour="13"> </td><td class="on" data-day="6" data-hour="14"> </td><td class="on" data-day="6" data-hour="15"> </td><td class="on" data-day="6" data-hour="16"> </td><td class="on" data-day="6" data-hour="17"> </td><td class="on" data-day="6" data-hour="18"> </td><td class="on" data-day="6" data-hour="19"> </td><td class="on" data-day="6" data-hour="20"> </td><td class="on" data-day="6" data-hour="21"> </td><td class="on" data-day="6" data-hour="22"> </td><td class="on" data-day="6" data-hour="23"> </td></tr></tbody></table></div></div>'
|
11
|
+
expected = '<div class="form-group row" data-scheduler="true"><label class="col-form-label col-2" for="thing_schedule">Schedule</label><div class="col-10"><input value="[[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]" class="scheduler-hidden-field" type="hidden" name="thing[schedule]" id="thing_schedule" /><table class="scheduler-badge"><tbody><tr><td class="off" data-day="0" data-hour="0"> </td><td class="on" data-day="0" data-hour="1"> </td><td class="on" data-day="0" data-hour="2"> </td><td class="on" data-day="0" data-hour="3"> </td><td class="on" data-day="0" data-hour="4"> </td><td class="on" data-day="0" data-hour="5"> </td><td class="on" data-day="0" data-hour="6"> </td><td class="on" data-day="0" data-hour="7"> </td><td class="on" data-day="0" data-hour="8"> </td><td class="on" data-day="0" data-hour="9"> </td><td class="on" data-day="0" data-hour="10"> </td><td class="on" data-day="0" data-hour="11"> </td><td class="on" data-day="0" data-hour="12"> </td><td class="on" data-day="0" data-hour="13"> </td><td class="on" data-day="0" data-hour="14"> </td><td class="on" data-day="0" data-hour="15"> </td><td class="on" data-day="0" data-hour="16"> </td><td class="on" data-day="0" data-hour="17"> </td><td class="on" data-day="0" data-hour="18"> </td><td class="on" data-day="0" data-hour="19"> </td><td class="on" data-day="0" data-hour="20"> </td><td class="on" data-day="0" data-hour="21"> </td><td class="on" data-day="0" data-hour="22"> </td><td class="on" data-day="0" data-hour="23"> </td></tr><tr><td class="off" data-day="1" data-hour="0"> </td><td class="on" data-day="1" data-hour="1"> </td><td class="on" data-day="1" data-hour="2"> </td><td class="on" data-day="1" data-hour="3"> </td><td class="on" data-day="1" data-hour="4"> </td><td class="on" data-day="1" data-hour="5"> </td><td class="on" data-day="1" data-hour="6"> </td><td class="on" data-day="1" data-hour="7"> </td><td class="on" data-day="1" data-hour="8"> </td><td class="on" data-day="1" data-hour="9"> </td><td class="on" data-day="1" data-hour="10"> </td><td class="on" data-day="1" data-hour="11"> </td><td class="on" data-day="1" data-hour="12"> </td><td class="on" data-day="1" data-hour="13"> </td><td class="on" data-day="1" data-hour="14"> </td><td class="on" data-day="1" data-hour="15"> </td><td class="on" data-day="1" data-hour="16"> </td><td class="on" data-day="1" data-hour="17"> </td><td class="on" data-day="1" data-hour="18"> </td><td class="on" data-day="1" data-hour="19"> </td><td class="on" data-day="1" data-hour="20"> </td><td class="on" data-day="1" data-hour="21"> </td><td class="on" data-day="1" data-hour="22"> </td><td class="on" data-day="1" data-hour="23"> </td></tr><tr><td class="off" data-day="2" data-hour="0"> </td><td class="on" data-day="2" data-hour="1"> </td><td class="on" data-day="2" data-hour="2"> </td><td class="on" data-day="2" data-hour="3"> </td><td class="on" data-day="2" data-hour="4"> </td><td class="on" data-day="2" data-hour="5"> </td><td class="on" data-day="2" data-hour="6"> </td><td class="on" data-day="2" data-hour="7"> </td><td class="on" data-day="2" data-hour="8"> </td><td class="on" data-day="2" data-hour="9"> </td><td class="on" data-day="2" data-hour="10"> </td><td class="on" data-day="2" data-hour="11"> </td><td class="on" data-day="2" data-hour="12"> </td><td class="on" data-day="2" data-hour="13"> </td><td class="on" data-day="2" data-hour="14"> </td><td class="on" data-day="2" data-hour="15"> </td><td class="on" data-day="2" data-hour="16"> </td><td class="on" data-day="2" data-hour="17"> </td><td class="on" data-day="2" data-hour="18"> </td><td class="on" data-day="2" data-hour="19"> </td><td class="on" data-day="2" data-hour="20"> </td><td class="on" data-day="2" data-hour="21"> </td><td class="on" data-day="2" data-hour="22"> </td><td class="on" data-day="2" data-hour="23"> </td></tr><tr><td class="off" data-day="3" data-hour="0"> </td><td class="on" data-day="3" data-hour="1"> </td><td class="on" data-day="3" data-hour="2"> </td><td class="on" data-day="3" data-hour="3"> </td><td class="on" data-day="3" data-hour="4"> </td><td class="on" data-day="3" data-hour="5"> </td><td class="on" data-day="3" data-hour="6"> </td><td class="on" data-day="3" data-hour="7"> </td><td class="on" data-day="3" data-hour="8"> </td><td class="on" data-day="3" data-hour="9"> </td><td class="on" data-day="3" data-hour="10"> </td><td class="on" data-day="3" data-hour="11"> </td><td class="on" data-day="3" data-hour="12"> </td><td class="on" data-day="3" data-hour="13"> </td><td class="on" data-day="3" data-hour="14"> </td><td class="on" data-day="3" data-hour="15"> </td><td class="on" data-day="3" data-hour="16"> </td><td class="on" data-day="3" data-hour="17"> </td><td class="on" data-day="3" data-hour="18"> </td><td class="on" data-day="3" data-hour="19"> </td><td class="on" data-day="3" data-hour="20"> </td><td class="on" data-day="3" data-hour="21"> </td><td class="on" data-day="3" data-hour="22"> </td><td class="on" data-day="3" data-hour="23"> </td></tr><tr><td class="off" data-day="4" data-hour="0"> </td><td class="on" data-day="4" data-hour="1"> </td><td class="on" data-day="4" data-hour="2"> </td><td class="on" data-day="4" data-hour="3"> </td><td class="on" data-day="4" data-hour="4"> </td><td class="on" data-day="4" data-hour="5"> </td><td class="on" data-day="4" data-hour="6"> </td><td class="on" data-day="4" data-hour="7"> </td><td class="on" data-day="4" data-hour="8"> </td><td class="on" data-day="4" data-hour="9"> </td><td class="on" data-day="4" data-hour="10"> </td><td class="on" data-day="4" data-hour="11"> </td><td class="on" data-day="4" data-hour="12"> </td><td class="on" data-day="4" data-hour="13"> </td><td class="on" data-day="4" data-hour="14"> </td><td class="on" data-day="4" data-hour="15"> </td><td class="on" data-day="4" data-hour="16"> </td><td class="on" data-day="4" data-hour="17"> </td><td class="on" data-day="4" data-hour="18"> </td><td class="on" data-day="4" data-hour="19"> </td><td class="on" data-day="4" data-hour="20"> </td><td class="on" data-day="4" data-hour="21"> </td><td class="on" data-day="4" data-hour="22"> </td><td class="on" data-day="4" data-hour="23"> </td></tr><tr><td class="off" data-day="5" data-hour="0"> </td><td class="on" data-day="5" data-hour="1"> </td><td class="on" data-day="5" data-hour="2"> </td><td class="on" data-day="5" data-hour="3"> </td><td class="on" data-day="5" data-hour="4"> </td><td class="on" data-day="5" data-hour="5"> </td><td class="on" data-day="5" data-hour="6"> </td><td class="on" data-day="5" data-hour="7"> </td><td class="on" data-day="5" data-hour="8"> </td><td class="on" data-day="5" data-hour="9"> </td><td class="on" data-day="5" data-hour="10"> </td><td class="on" data-day="5" data-hour="11"> </td><td class="on" data-day="5" data-hour="12"> </td><td class="on" data-day="5" data-hour="13"> </td><td class="on" data-day="5" data-hour="14"> </td><td class="on" data-day="5" data-hour="15"> </td><td class="on" data-day="5" data-hour="16"> </td><td class="on" data-day="5" data-hour="17"> </td><td class="on" data-day="5" data-hour="18"> </td><td class="on" data-day="5" data-hour="19"> </td><td class="on" data-day="5" data-hour="20"> </td><td class="on" data-day="5" data-hour="21"> </td><td class="on" data-day="5" data-hour="22"> </td><td class="on" data-day="5" data-hour="23"> </td></tr><tr><td class="off" data-day="6" data-hour="0"> </td><td class="on" data-day="6" data-hour="1"> </td><td class="on" data-day="6" data-hour="2"> </td><td class="on" data-day="6" data-hour="3"> </td><td class="on" data-day="6" data-hour="4"> </td><td class="on" data-day="6" data-hour="5"> </td><td class="on" data-day="6" data-hour="6"> </td><td class="on" data-day="6" data-hour="7"> </td><td class="on" data-day="6" data-hour="8"> </td><td class="on" data-day="6" data-hour="9"> </td><td class="on" data-day="6" data-hour="10"> </td><td class="on" data-day="6" data-hour="11"> </td><td class="on" data-day="6" data-hour="12"> </td><td class="on" data-day="6" data-hour="13"> </td><td class="on" data-day="6" data-hour="14"> </td><td class="on" data-day="6" data-hour="15"> </td><td class="on" data-day="6" data-hour="16"> </td><td class="on" data-day="6" data-hour="17"> </td><td class="on" data-day="6" data-hour="18"> </td><td class="on" data-day="6" data-hour="19"> </td><td class="on" data-day="6" data-hour="20"> </td><td class="on" data-day="6" data-hour="21"> </td><td class="on" data-day="6" data-hour="22"> </td><td class="on" data-day="6" data-hour="23"> </td></tr></tbody></table></div></div>'
|
12
12
|
assert_equal expected, @builder.scheduler(:schedule)
|
13
13
|
end
|
14
14
|
|
data/test/select_or_new_test.rb
CHANGED
@@ -9,7 +9,7 @@ class SelectOrNewTest < ActionView::TestCase
|
|
9
9
|
|
10
10
|
test "select_or_new" do
|
11
11
|
expected = <<-HTML.chomp
|
12
|
-
<div class="form-group" data-select-or-new="true"><label class="
|
12
|
+
<div class="form-group row" data-select-or-new="true"><label class="col-form-label col-2" for="thing_category">Category</label><div class="col-10"><select class="form-control" name="thing[category]" id="thing_category"><option value="">Please select</option>
|
13
13
|
<option value="1">One</option>
|
14
14
|
<option value="2">Two</option>
|
15
15
|
<option value="0">New...</option></select><div class="input-group" style="display: none;"><input type="text" name="thing[new_category]" id="thing_new_category" class="form-control" placeholder="New..." /><div class="input-group-append select-or-new-cancel"><button class="btn btn-outline-danger" type="button">×</button></div></div></div></div>
|
@@ -19,7 +19,7 @@ class SelectOrNewTest < ActionView::TestCase
|
|
19
19
|
|
20
20
|
test "display new, if option is selected" do
|
21
21
|
expected = <<-HTML.chomp
|
22
|
-
<div class="form-group" data-select-or-new="true"><label class="
|
22
|
+
<div class="form-group row" data-select-or-new="true"><label class="col-form-label col-2" for="thing_category">Category</label><div class="col-10"><select class="form-control" name="thing[category]" id="thing_category"><option value="">Please select</option>
|
23
23
|
<option value="1">One</option>
|
24
24
|
<option value="2">Two</option>
|
25
25
|
<option value="0">New...</option></select><div class="input-group" style="display: none;"><input type="text" name="thing[new_category]" id="thing_new_category" value="New Category" class="form-control" placeholder="New..." /><div class="input-group-append select-or-new-cancel"><button class="btn btn-outline-danger" type="button">×</button></div></div></div></div>
|
data/test/submit_bar_test.rb
CHANGED
@@ -27,7 +27,7 @@ class SubmitBarTest < ActionView::TestCase
|
|
27
27
|
</button>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
|
-
<a class="btn btn-
|
30
|
+
<a class="btn btn-light submitbar-cancel" rel="nofollow" href="/things">Cancel</a>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
HTML
|
data/test/timespan_test.rb
CHANGED
@@ -40,8 +40,8 @@ class TimespanTest < ActionView::TestCase
|
|
40
40
|
test "field has errors" do
|
41
41
|
@thing.errors.add :duration_in_seconds, 'has some errors'
|
42
42
|
@output_buffer = @builder.timespan(:duration_in_seconds)
|
43
|
-
assert_select '
|
44
|
-
assert_select '
|
43
|
+
assert_select 'input.timespan-quantity.is-invalid'
|
44
|
+
assert_select 'div.invalid-feedback', text: 'has some errors'
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_form_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesús Dugarte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap_form
|