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.
@@ -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="control-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>'
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-11">'
44
+ +' <div class="col">'
45
45
  +' <input type="url" id="" class="form-control" data-name="thing[urls][]" />'
46
46
  +' </div>'
47
- +' <div class="col-1">'
48
- +' <a class="btn btn-default remove-arrayed-field-row" href="javascript:void(0);">&times;</a>'
47
+ +' <div class="col-auto ml-auto">'
48
+ +' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">&times;</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-11">'
54
+ +' <div class="col">'
55
55
  +' <input type="url" id="" class="form-control" name="thing[urls][]" />'
56
56
  +' </div>'
57
- +' <div class="col-1">'
58
- +' <a class="btn btn-default remove-arrayed-field-row" href="javascript:void(0);">&times;</a>'
57
+ +' <div class="col-auto ml-auto">'
58
+ +' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">&times;</a>'
59
59
  +' </div>'
60
60
  +' </div>'
61
61
  +' <div class="row mt-1">'
62
- +' <div class="col-11">'
62
+ +' <div class="col">'
63
63
  +' <input type="url" id="" class="form-control" name="thing[urls][]" />'
64
64
  +' </div>'
65
- +' <div class="col-1">'
66
- +' <a class="btn btn-default remove-arrayed-field-row" href="javascript:void(0);">&times;</a>'
65
+ +' <div class="col-auto ml-auto">'
66
+ +' <a class="btn btn-light remove-arrayed-field-row" href="javascript:void(0);">&times;</a>'
67
67
  +' </div>'
68
68
  +' </div>'
69
69
  +' </div>'
70
70
  +' <div class="row mt-1">'
71
- +' <div class="col-12">'
72
- +' <a class="btn btn-default add-arrayed-field-row" href="javascript:void(0);">+</a>'
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
- + ' <input class="duration-seconds" id="thing_duration_in_seconds2" name="thing[duration_in_seconds2]" type="hidden" value="0">'
43
- + ' <input class="hours" id="thing_hours" min="0" name="thing[hours]" type="number" value="0">:'
44
- + ' <input class="minutes" id="thing_minutes" max="59" min="0" name="thing[minutes]" type="number" value="0">:'
45
- + ' <input class="seconds" id="thing_seconds" max="59" min="0" name="thing[seconds]" type="number" value="0">.'
46
- + ' <input class="milliseconds" id="thing_milliseconds" max="999" min="0" name="thing[milliseconds]" type="number" value="0">'
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="control-label col-2" for="thing_schedule">Schedule</label>'
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="control-label col-2" for="thing_category">Category</label>'
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
  +' &nbsp;'
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>'
@@ -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">&nbsp;</td><td class="on" data-day="0" data-hour="1">&nbsp;</td><td class="on" data-day="0" data-hour="2">&nbsp;</td><td class="on" data-day="0" data-hour="3">&nbsp;</td><td class="on" data-day="0" data-hour="4">&nbsp;</td><td class="on" data-day="0" data-hour="5">&nbsp;</td><td class="on" data-day="0" data-hour="6">&nbsp;</td><td class="on" data-day="0" data-hour="7">&nbsp;</td><td class="on" data-day="0" data-hour="8">&nbsp;</td><td class="on" data-day="0" data-hour="9">&nbsp;</td><td class="on" data-day="0" data-hour="10">&nbsp;</td><td class="on" data-day="0" data-hour="11">&nbsp;</td><td class="on" data-day="0" data-hour="12">&nbsp;</td><td class="on" data-day="0" data-hour="13">&nbsp;</td><td class="on" data-day="0" data-hour="14">&nbsp;</td><td class="on" data-day="0" data-hour="15">&nbsp;</td><td class="on" data-day="0" data-hour="16">&nbsp;</td><td class="on" data-day="0" data-hour="17">&nbsp;</td><td class="on" data-day="0" data-hour="18">&nbsp;</td><td class="on" data-day="0" data-hour="19">&nbsp;</td><td class="on" data-day="0" data-hour="20">&nbsp;</td><td class="on" data-day="0" data-hour="21">&nbsp;</td><td class="on" data-day="0" data-hour="22">&nbsp;</td><td class="on" data-day="0" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="1" data-hour="0">&nbsp;</td><td class="on" data-day="1" data-hour="1">&nbsp;</td><td class="on" data-day="1" data-hour="2">&nbsp;</td><td class="on" data-day="1" data-hour="3">&nbsp;</td><td class="on" data-day="1" data-hour="4">&nbsp;</td><td class="on" data-day="1" data-hour="5">&nbsp;</td><td class="on" data-day="1" data-hour="6">&nbsp;</td><td class="on" data-day="1" data-hour="7">&nbsp;</td><td class="on" data-day="1" data-hour="8">&nbsp;</td><td class="on" data-day="1" data-hour="9">&nbsp;</td><td class="on" data-day="1" data-hour="10">&nbsp;</td><td class="on" data-day="1" data-hour="11">&nbsp;</td><td class="on" data-day="1" data-hour="12">&nbsp;</td><td class="on" data-day="1" data-hour="13">&nbsp;</td><td class="on" data-day="1" data-hour="14">&nbsp;</td><td class="on" data-day="1" data-hour="15">&nbsp;</td><td class="on" data-day="1" data-hour="16">&nbsp;</td><td class="on" data-day="1" data-hour="17">&nbsp;</td><td class="on" data-day="1" data-hour="18">&nbsp;</td><td class="on" data-day="1" data-hour="19">&nbsp;</td><td class="on" data-day="1" data-hour="20">&nbsp;</td><td class="on" data-day="1" data-hour="21">&nbsp;</td><td class="on" data-day="1" data-hour="22">&nbsp;</td><td class="on" data-day="1" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="2" data-hour="0">&nbsp;</td><td class="on" data-day="2" data-hour="1">&nbsp;</td><td class="on" data-day="2" data-hour="2">&nbsp;</td><td class="on" data-day="2" data-hour="3">&nbsp;</td><td class="on" data-day="2" data-hour="4">&nbsp;</td><td class="on" data-day="2" data-hour="5">&nbsp;</td><td class="on" data-day="2" data-hour="6">&nbsp;</td><td class="on" data-day="2" data-hour="7">&nbsp;</td><td class="on" data-day="2" data-hour="8">&nbsp;</td><td class="on" data-day="2" data-hour="9">&nbsp;</td><td class="on" data-day="2" data-hour="10">&nbsp;</td><td class="on" data-day="2" data-hour="11">&nbsp;</td><td class="on" data-day="2" data-hour="12">&nbsp;</td><td class="on" data-day="2" data-hour="13">&nbsp;</td><td class="on" data-day="2" data-hour="14">&nbsp;</td><td class="on" data-day="2" data-hour="15">&nbsp;</td><td class="on" data-day="2" data-hour="16">&nbsp;</td><td class="on" data-day="2" data-hour="17">&nbsp;</td><td class="on" data-day="2" data-hour="18">&nbsp;</td><td class="on" data-day="2" data-hour="19">&nbsp;</td><td class="on" data-day="2" data-hour="20">&nbsp;</td><td class="on" data-day="2" data-hour="21">&nbsp;</td><td class="on" data-day="2" data-hour="22">&nbsp;</td><td class="on" data-day="2" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="3" data-hour="0">&nbsp;</td><td class="on" data-day="3" data-hour="1">&nbsp;</td><td class="on" data-day="3" data-hour="2">&nbsp;</td><td class="on" data-day="3" data-hour="3">&nbsp;</td><td class="on" data-day="3" data-hour="4">&nbsp;</td><td class="on" data-day="3" data-hour="5">&nbsp;</td><td class="on" data-day="3" data-hour="6">&nbsp;</td><td class="on" data-day="3" data-hour="7">&nbsp;</td><td class="on" data-day="3" data-hour="8">&nbsp;</td><td class="on" data-day="3" data-hour="9">&nbsp;</td><td class="on" data-day="3" data-hour="10">&nbsp;</td><td class="on" data-day="3" data-hour="11">&nbsp;</td><td class="on" data-day="3" data-hour="12">&nbsp;</td><td class="on" data-day="3" data-hour="13">&nbsp;</td><td class="on" data-day="3" data-hour="14">&nbsp;</td><td class="on" data-day="3" data-hour="15">&nbsp;</td><td class="on" data-day="3" data-hour="16">&nbsp;</td><td class="on" data-day="3" data-hour="17">&nbsp;</td><td class="on" data-day="3" data-hour="18">&nbsp;</td><td class="on" data-day="3" data-hour="19">&nbsp;</td><td class="on" data-day="3" data-hour="20">&nbsp;</td><td class="on" data-day="3" data-hour="21">&nbsp;</td><td class="on" data-day="3" data-hour="22">&nbsp;</td><td class="on" data-day="3" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="4" data-hour="0">&nbsp;</td><td class="on" data-day="4" data-hour="1">&nbsp;</td><td class="on" data-day="4" data-hour="2">&nbsp;</td><td class="on" data-day="4" data-hour="3">&nbsp;</td><td class="on" data-day="4" data-hour="4">&nbsp;</td><td class="on" data-day="4" data-hour="5">&nbsp;</td><td class="on" data-day="4" data-hour="6">&nbsp;</td><td class="on" data-day="4" data-hour="7">&nbsp;</td><td class="on" data-day="4" data-hour="8">&nbsp;</td><td class="on" data-day="4" data-hour="9">&nbsp;</td><td class="on" data-day="4" data-hour="10">&nbsp;</td><td class="on" data-day="4" data-hour="11">&nbsp;</td><td class="on" data-day="4" data-hour="12">&nbsp;</td><td class="on" data-day="4" data-hour="13">&nbsp;</td><td class="on" data-day="4" data-hour="14">&nbsp;</td><td class="on" data-day="4" data-hour="15">&nbsp;</td><td class="on" data-day="4" data-hour="16">&nbsp;</td><td class="on" data-day="4" data-hour="17">&nbsp;</td><td class="on" data-day="4" data-hour="18">&nbsp;</td><td class="on" data-day="4" data-hour="19">&nbsp;</td><td class="on" data-day="4" data-hour="20">&nbsp;</td><td class="on" data-day="4" data-hour="21">&nbsp;</td><td class="on" data-day="4" data-hour="22">&nbsp;</td><td class="on" data-day="4" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="5" data-hour="0">&nbsp;</td><td class="on" data-day="5" data-hour="1">&nbsp;</td><td class="on" data-day="5" data-hour="2">&nbsp;</td><td class="on" data-day="5" data-hour="3">&nbsp;</td><td class="on" data-day="5" data-hour="4">&nbsp;</td><td class="on" data-day="5" data-hour="5">&nbsp;</td><td class="on" data-day="5" data-hour="6">&nbsp;</td><td class="on" data-day="5" data-hour="7">&nbsp;</td><td class="on" data-day="5" data-hour="8">&nbsp;</td><td class="on" data-day="5" data-hour="9">&nbsp;</td><td class="on" data-day="5" data-hour="10">&nbsp;</td><td class="on" data-day="5" data-hour="11">&nbsp;</td><td class="on" data-day="5" data-hour="12">&nbsp;</td><td class="on" data-day="5" data-hour="13">&nbsp;</td><td class="on" data-day="5" data-hour="14">&nbsp;</td><td class="on" data-day="5" data-hour="15">&nbsp;</td><td class="on" data-day="5" data-hour="16">&nbsp;</td><td class="on" data-day="5" data-hour="17">&nbsp;</td><td class="on" data-day="5" data-hour="18">&nbsp;</td><td class="on" data-day="5" data-hour="19">&nbsp;</td><td class="on" data-day="5" data-hour="20">&nbsp;</td><td class="on" data-day="5" data-hour="21">&nbsp;</td><td class="on" data-day="5" data-hour="22">&nbsp;</td><td class="on" data-day="5" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="6" data-hour="0">&nbsp;</td><td class="on" data-day="6" data-hour="1">&nbsp;</td><td class="on" data-day="6" data-hour="2">&nbsp;</td><td class="on" data-day="6" data-hour="3">&nbsp;</td><td class="on" data-day="6" data-hour="4">&nbsp;</td><td class="on" data-day="6" data-hour="5">&nbsp;</td><td class="on" data-day="6" data-hour="6">&nbsp;</td><td class="on" data-day="6" data-hour="7">&nbsp;</td><td class="on" data-day="6" data-hour="8">&nbsp;</td><td class="on" data-day="6" data-hour="9">&nbsp;</td><td class="on" data-day="6" data-hour="10">&nbsp;</td><td class="on" data-day="6" data-hour="11">&nbsp;</td><td class="on" data-day="6" data-hour="12">&nbsp;</td><td class="on" data-day="6" data-hour="13">&nbsp;</td><td class="on" data-day="6" data-hour="14">&nbsp;</td><td class="on" data-day="6" data-hour="15">&nbsp;</td><td class="on" data-day="6" data-hour="16">&nbsp;</td><td class="on" data-day="6" data-hour="17">&nbsp;</td><td class="on" data-day="6" data-hour="18">&nbsp;</td><td class="on" data-day="6" data-hour="19">&nbsp;</td><td class="on" data-day="6" data-hour="20">&nbsp;</td><td class="on" data-day="6" data-hour="21">&nbsp;</td><td class="on" data-day="6" data-hour="22">&nbsp;</td><td class="on" data-day="6" data-hour="23">&nbsp;</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">&nbsp;</td><td class="on" data-day="0" data-hour="1">&nbsp;</td><td class="on" data-day="0" data-hour="2">&nbsp;</td><td class="on" data-day="0" data-hour="3">&nbsp;</td><td class="on" data-day="0" data-hour="4">&nbsp;</td><td class="on" data-day="0" data-hour="5">&nbsp;</td><td class="on" data-day="0" data-hour="6">&nbsp;</td><td class="on" data-day="0" data-hour="7">&nbsp;</td><td class="on" data-day="0" data-hour="8">&nbsp;</td><td class="on" data-day="0" data-hour="9">&nbsp;</td><td class="on" data-day="0" data-hour="10">&nbsp;</td><td class="on" data-day="0" data-hour="11">&nbsp;</td><td class="on" data-day="0" data-hour="12">&nbsp;</td><td class="on" data-day="0" data-hour="13">&nbsp;</td><td class="on" data-day="0" data-hour="14">&nbsp;</td><td class="on" data-day="0" data-hour="15">&nbsp;</td><td class="on" data-day="0" data-hour="16">&nbsp;</td><td class="on" data-day="0" data-hour="17">&nbsp;</td><td class="on" data-day="0" data-hour="18">&nbsp;</td><td class="on" data-day="0" data-hour="19">&nbsp;</td><td class="on" data-day="0" data-hour="20">&nbsp;</td><td class="on" data-day="0" data-hour="21">&nbsp;</td><td class="on" data-day="0" data-hour="22">&nbsp;</td><td class="on" data-day="0" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="1" data-hour="0">&nbsp;</td><td class="on" data-day="1" data-hour="1">&nbsp;</td><td class="on" data-day="1" data-hour="2">&nbsp;</td><td class="on" data-day="1" data-hour="3">&nbsp;</td><td class="on" data-day="1" data-hour="4">&nbsp;</td><td class="on" data-day="1" data-hour="5">&nbsp;</td><td class="on" data-day="1" data-hour="6">&nbsp;</td><td class="on" data-day="1" data-hour="7">&nbsp;</td><td class="on" data-day="1" data-hour="8">&nbsp;</td><td class="on" data-day="1" data-hour="9">&nbsp;</td><td class="on" data-day="1" data-hour="10">&nbsp;</td><td class="on" data-day="1" data-hour="11">&nbsp;</td><td class="on" data-day="1" data-hour="12">&nbsp;</td><td class="on" data-day="1" data-hour="13">&nbsp;</td><td class="on" data-day="1" data-hour="14">&nbsp;</td><td class="on" data-day="1" data-hour="15">&nbsp;</td><td class="on" data-day="1" data-hour="16">&nbsp;</td><td class="on" data-day="1" data-hour="17">&nbsp;</td><td class="on" data-day="1" data-hour="18">&nbsp;</td><td class="on" data-day="1" data-hour="19">&nbsp;</td><td class="on" data-day="1" data-hour="20">&nbsp;</td><td class="on" data-day="1" data-hour="21">&nbsp;</td><td class="on" data-day="1" data-hour="22">&nbsp;</td><td class="on" data-day="1" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="2" data-hour="0">&nbsp;</td><td class="on" data-day="2" data-hour="1">&nbsp;</td><td class="on" data-day="2" data-hour="2">&nbsp;</td><td class="on" data-day="2" data-hour="3">&nbsp;</td><td class="on" data-day="2" data-hour="4">&nbsp;</td><td class="on" data-day="2" data-hour="5">&nbsp;</td><td class="on" data-day="2" data-hour="6">&nbsp;</td><td class="on" data-day="2" data-hour="7">&nbsp;</td><td class="on" data-day="2" data-hour="8">&nbsp;</td><td class="on" data-day="2" data-hour="9">&nbsp;</td><td class="on" data-day="2" data-hour="10">&nbsp;</td><td class="on" data-day="2" data-hour="11">&nbsp;</td><td class="on" data-day="2" data-hour="12">&nbsp;</td><td class="on" data-day="2" data-hour="13">&nbsp;</td><td class="on" data-day="2" data-hour="14">&nbsp;</td><td class="on" data-day="2" data-hour="15">&nbsp;</td><td class="on" data-day="2" data-hour="16">&nbsp;</td><td class="on" data-day="2" data-hour="17">&nbsp;</td><td class="on" data-day="2" data-hour="18">&nbsp;</td><td class="on" data-day="2" data-hour="19">&nbsp;</td><td class="on" data-day="2" data-hour="20">&nbsp;</td><td class="on" data-day="2" data-hour="21">&nbsp;</td><td class="on" data-day="2" data-hour="22">&nbsp;</td><td class="on" data-day="2" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="3" data-hour="0">&nbsp;</td><td class="on" data-day="3" data-hour="1">&nbsp;</td><td class="on" data-day="3" data-hour="2">&nbsp;</td><td class="on" data-day="3" data-hour="3">&nbsp;</td><td class="on" data-day="3" data-hour="4">&nbsp;</td><td class="on" data-day="3" data-hour="5">&nbsp;</td><td class="on" data-day="3" data-hour="6">&nbsp;</td><td class="on" data-day="3" data-hour="7">&nbsp;</td><td class="on" data-day="3" data-hour="8">&nbsp;</td><td class="on" data-day="3" data-hour="9">&nbsp;</td><td class="on" data-day="3" data-hour="10">&nbsp;</td><td class="on" data-day="3" data-hour="11">&nbsp;</td><td class="on" data-day="3" data-hour="12">&nbsp;</td><td class="on" data-day="3" data-hour="13">&nbsp;</td><td class="on" data-day="3" data-hour="14">&nbsp;</td><td class="on" data-day="3" data-hour="15">&nbsp;</td><td class="on" data-day="3" data-hour="16">&nbsp;</td><td class="on" data-day="3" data-hour="17">&nbsp;</td><td class="on" data-day="3" data-hour="18">&nbsp;</td><td class="on" data-day="3" data-hour="19">&nbsp;</td><td class="on" data-day="3" data-hour="20">&nbsp;</td><td class="on" data-day="3" data-hour="21">&nbsp;</td><td class="on" data-day="3" data-hour="22">&nbsp;</td><td class="on" data-day="3" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="4" data-hour="0">&nbsp;</td><td class="on" data-day="4" data-hour="1">&nbsp;</td><td class="on" data-day="4" data-hour="2">&nbsp;</td><td class="on" data-day="4" data-hour="3">&nbsp;</td><td class="on" data-day="4" data-hour="4">&nbsp;</td><td class="on" data-day="4" data-hour="5">&nbsp;</td><td class="on" data-day="4" data-hour="6">&nbsp;</td><td class="on" data-day="4" data-hour="7">&nbsp;</td><td class="on" data-day="4" data-hour="8">&nbsp;</td><td class="on" data-day="4" data-hour="9">&nbsp;</td><td class="on" data-day="4" data-hour="10">&nbsp;</td><td class="on" data-day="4" data-hour="11">&nbsp;</td><td class="on" data-day="4" data-hour="12">&nbsp;</td><td class="on" data-day="4" data-hour="13">&nbsp;</td><td class="on" data-day="4" data-hour="14">&nbsp;</td><td class="on" data-day="4" data-hour="15">&nbsp;</td><td class="on" data-day="4" data-hour="16">&nbsp;</td><td class="on" data-day="4" data-hour="17">&nbsp;</td><td class="on" data-day="4" data-hour="18">&nbsp;</td><td class="on" data-day="4" data-hour="19">&nbsp;</td><td class="on" data-day="4" data-hour="20">&nbsp;</td><td class="on" data-day="4" data-hour="21">&nbsp;</td><td class="on" data-day="4" data-hour="22">&nbsp;</td><td class="on" data-day="4" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="5" data-hour="0">&nbsp;</td><td class="on" data-day="5" data-hour="1">&nbsp;</td><td class="on" data-day="5" data-hour="2">&nbsp;</td><td class="on" data-day="5" data-hour="3">&nbsp;</td><td class="on" data-day="5" data-hour="4">&nbsp;</td><td class="on" data-day="5" data-hour="5">&nbsp;</td><td class="on" data-day="5" data-hour="6">&nbsp;</td><td class="on" data-day="5" data-hour="7">&nbsp;</td><td class="on" data-day="5" data-hour="8">&nbsp;</td><td class="on" data-day="5" data-hour="9">&nbsp;</td><td class="on" data-day="5" data-hour="10">&nbsp;</td><td class="on" data-day="5" data-hour="11">&nbsp;</td><td class="on" data-day="5" data-hour="12">&nbsp;</td><td class="on" data-day="5" data-hour="13">&nbsp;</td><td class="on" data-day="5" data-hour="14">&nbsp;</td><td class="on" data-day="5" data-hour="15">&nbsp;</td><td class="on" data-day="5" data-hour="16">&nbsp;</td><td class="on" data-day="5" data-hour="17">&nbsp;</td><td class="on" data-day="5" data-hour="18">&nbsp;</td><td class="on" data-day="5" data-hour="19">&nbsp;</td><td class="on" data-day="5" data-hour="20">&nbsp;</td><td class="on" data-day="5" data-hour="21">&nbsp;</td><td class="on" data-day="5" data-hour="22">&nbsp;</td><td class="on" data-day="5" data-hour="23">&nbsp;</td></tr><tr><td class="off" data-day="6" data-hour="0">&nbsp;</td><td class="on" data-day="6" data-hour="1">&nbsp;</td><td class="on" data-day="6" data-hour="2">&nbsp;</td><td class="on" data-day="6" data-hour="3">&nbsp;</td><td class="on" data-day="6" data-hour="4">&nbsp;</td><td class="on" data-day="6" data-hour="5">&nbsp;</td><td class="on" data-day="6" data-hour="6">&nbsp;</td><td class="on" data-day="6" data-hour="7">&nbsp;</td><td class="on" data-day="6" data-hour="8">&nbsp;</td><td class="on" data-day="6" data-hour="9">&nbsp;</td><td class="on" data-day="6" data-hour="10">&nbsp;</td><td class="on" data-day="6" data-hour="11">&nbsp;</td><td class="on" data-day="6" data-hour="12">&nbsp;</td><td class="on" data-day="6" data-hour="13">&nbsp;</td><td class="on" data-day="6" data-hour="14">&nbsp;</td><td class="on" data-day="6" data-hour="15">&nbsp;</td><td class="on" data-day="6" data-hour="16">&nbsp;</td><td class="on" data-day="6" data-hour="17">&nbsp;</td><td class="on" data-day="6" data-hour="18">&nbsp;</td><td class="on" data-day="6" data-hour="19">&nbsp;</td><td class="on" data-day="6" data-hour="20">&nbsp;</td><td class="on" data-day="6" data-hour="21">&nbsp;</td><td class="on" data-day="6" data-hour="22">&nbsp;</td><td class="on" data-day="6" data-hour="23">&nbsp;</td></tr></tbody></table></div></div>'
12
12
  assert_equal expected, @builder.scheduler(:schedule)
13
13
  end
14
14
 
@@ -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="control-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>
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">&times;</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="control-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>
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">&times;</button></div></div></div></div>
@@ -27,7 +27,7 @@ class SubmitBarTest < ActionView::TestCase
27
27
  </button>
28
28
  </div>
29
29
  </div>
30
- <a class="btn btn-default submitbar-cancel" rel="nofollow" href="/things">Cancel</a>
30
+ <a class="btn btn-light submitbar-cancel" rel="nofollow" href="/things">Cancel</a>
31
31
  </div>
32
32
  </div>
33
33
  HTML
@@ -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 'div.has-error > input.timespan-quantity'
44
- assert_select 'span.help-block', text: 'has some errors'
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.2
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-16 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap_form