Revisão | 3774f2dca9ddf61aa42ffad2b85d267189caef20 (tree) |
---|---|
Hora | 2017-09-12 22:46:49 |
Autor | HMML <hmml3939@gmai...> |
Commiter | HMML |
Transit to bootstrap 4 beta!
@@ -40,7 +40,7 @@ gem 'responders' | ||
40 | 40 | gem 'kaminari' |
41 | 41 | gem 'kaminari-i18n' |
42 | 42 | gem 'font-awesome-rails' |
43 | -gem 'bootstrap', '4.0.0.alpha6' | |
43 | +gem 'bootstrap', '~> 4.0.0.beta' | |
44 | 44 | gem 'lightbox-bootstrap-rails', '5.1.0.1' |
45 | 45 | gem 'popper_js' |
46 | 46 | gem 'tether-rails' |
@@ -66,8 +66,9 @@ GEM | ||
66 | 66 | bindex (0.5.0) |
67 | 67 | binding_of_caller (0.7.2) |
68 | 68 | debug_inspector (>= 0.0.1) |
69 | - bootstrap (4.0.0.alpha6) | |
69 | + bootstrap (4.0.0.beta) | |
70 | 70 | autoprefixer-rails (>= 6.0.3) |
71 | + popper_js (~> 1.11.1) | |
71 | 72 | sass (>= 3.4.19) |
72 | 73 | builder (3.2.3) |
73 | 74 | byebug (9.1.0) |
@@ -265,7 +266,7 @@ GEM | ||
265 | 266 | cocaine (~> 0.5.5) |
266 | 267 | mime-types |
267 | 268 | mimemagic (~> 0.3.0) |
268 | - popper_js (1.12.3) | |
269 | + popper_js (1.11.1) | |
269 | 270 | pry (0.10.4) |
270 | 271 | coderay (~> 1.1.0) |
271 | 272 | method_source (~> 0.8.1) |
@@ -459,7 +460,7 @@ PLATFORMS | ||
459 | 460 | |
460 | 461 | DEPENDENCIES |
461 | 462 | awesome_print |
462 | - bootstrap (= 4.0.0.alpha6) | |
463 | + bootstrap (~> 4.0.0.beta) | |
463 | 464 | byebug |
464 | 465 | cancancan |
465 | 466 | capistrano-bundler |
@@ -6,6 +6,7 @@ | ||
6 | 6 | @import "lightbox-bootstrap"; |
7 | 7 | |
8 | 8 | @import "awesome_print"; |
9 | +@import "bootstrap4-beta-simpleform-workaround"; | |
9 | 10 | @import "common"; |
10 | 11 | |
11 | 12 | @import "dist_signals"; |
@@ -0,0 +1,19 @@ | ||
1 | + | |
2 | +@import 'bootstrap/functions'; | |
3 | +@import 'bootstrap/variables'; | |
4 | +@import 'bootstrap/mixins'; | |
5 | + | |
6 | +.has-invalid { | |
7 | + .invalid-feedback { | |
8 | + display: block; | |
9 | + } | |
10 | + | |
11 | + label { | |
12 | + color: theme-color('danger'); | |
13 | + } | |
14 | + | |
15 | + .form-control { | |
16 | + background: theme-color-level('danger', -10); | |
17 | + border-color: theme-color('danger'); | |
18 | + } | |
19 | +} |
@@ -22,7 +22,8 @@ | ||
22 | 22 | } |
23 | 23 | p a { color: #9cf; } |
24 | 24 | .image-container { |
25 | - margin-bottom: 2rem; | |
25 | + padding-bottom: 2rem; | |
26 | + height: 100%; | |
26 | 27 | } |
27 | 28 | @include media-breakpoint-up(lg) { |
28 | 29 | .image-container { |
@@ -30,8 +31,11 @@ | ||
30 | 31 | } |
31 | 32 | } |
32 | 33 | @include media-breakpoint-down(md) { |
34 | + .carousel-caption h3 { | |
35 | + font-size: 1.6rem; | |
36 | + } | |
33 | 37 | .image-container { |
34 | - margin-bottom: 10rem; | |
38 | + padding-bottom: 10rem; | |
35 | 39 | padding-left: 0px; |
36 | 40 | } |
37 | 41 | } |
@@ -104,7 +104,7 @@ class TW_Login extends React.Component { | ||
104 | 104 | return( |
105 | 105 | <div> |
106 | 106 | <div className="card"> |
107 | - <div className="card-block"> | |
107 | + <div className="card-body"> | |
108 | 108 | <h3>ログインの確認</h3> |
109 | 109 | <p>現在ログインしていません。このまま進めた場合、テーマを匿名で公開できますが、公開されたテーマの修正・削除などは一切できません。 |
110 | 110 | </p> |
@@ -139,7 +139,7 @@ class TW_ConfirmRights extends React.Component { | ||
139 | 139 | return( |
140 | 140 | <div> |
141 | 141 | <div className="card"> |
142 | - <div className="card-block"> | |
142 | + <div className="card-body"> | |
143 | 143 | <h3>最初に権利について確認してください</h3> |
144 | 144 | <p> |
145 | 145 | 公開テーマとして登録すると、データは誰でもダウンロードできるようになります。 |
@@ -153,8 +153,8 @@ class TW_ConfirmRights extends React.Component { | ||
153 | 153 | </li> |
154 | 154 | </ul> |
155 | 155 | <div className="form-group"> |
156 | - <div className={`form-check ${this.state.valid ? '' : 'has-danger'}`}> | |
157 | - <label className="form-check-label"> | |
156 | + <div className="form-check"> | |
157 | + <label className={`form-check-label ${this.state.valid ? '' : 'text-danger'}`}> | |
158 | 158 | <input className="form-check-input" type="checkbox" |
159 | 159 | checked={this.props.theme.rights_confirmed} |
160 | 160 | onChange={(e) => this.props.updateTheme({rights_confirmed: e.target.checked})} /> |
@@ -220,14 +220,14 @@ class TW_ThemeInfo extends React.Component { | ||
220 | 220 | if (attr == 'name' || attr == 'author') |
221 | 221 | required = <span><abbr title="required">*</abbr> </span> |
222 | 222 | inputs.push( |
223 | - <div className={`form-group row ${this.state['valid_'+attr] ? '' : 'has-danger'}`} key={`input-group-${attr}`}> | |
223 | + <div className="form-group row"> | |
224 | 224 | <label className="col-md-2 form-control-label string" htmlFor={`theme_${attr}`}> |
225 | 225 | {required} |
226 | 226 | {I18n.t(`activerecord.attributes.theme.${attr}`)}</label> |
227 | 227 | <div className="col-md-10"> |
228 | - <input className="form-control string" type="text" | |
228 | + <input className={`form-control string ${this.state['valid_'+attr] ? '' : 'is-invalid'}`} key={`input-group-${attr}`} | |
229 | 229 | placeholder={I18n.t(`simple_formn.placeholders.theme.${attr}`, {default: null})} |
230 | - name={`theme[${attr}]`} id={`theme_${attr}`} | |
230 | + name={`theme[${attr}]`} id={`theme_${attr}`} type="text" | |
231 | 231 | value={this.props.theme[attr]} |
232 | 232 | onChange={(e) => this.props.updateTheme({[attr]: e.target.value})} |
233 | 233 | /> |
@@ -239,7 +239,7 @@ class TW_ThemeInfo extends React.Component { | ||
239 | 239 | return( |
240 | 240 | <div> |
241 | 241 | <div className="card"> |
242 | - <div className="card-block"> | |
242 | + <div className="card-body"> | |
243 | 243 | <h3>テーマ情報を入力して下さい</h3> |
244 | 244 | {inputs} |
245 | 245 | </div> |
@@ -323,8 +323,8 @@ class TW_License extends React.Component { | ||
323 | 323 | for (let key in cc_conds) { |
324 | 324 | cc_choosers.push( |
325 | 325 | <div className="form-group" key={`cc-choice-${key}`}> |
326 | - <div className={`form-check ${this.state.valid_cc ? '' : 'has-danger'}`}> | |
327 | - <label className="form-check-label"> | |
326 | + <div className="form-check"> | |
327 | + <label className={`form-check-label ${this.state.valid_cc ? '' : 'text-danger'}`}> | |
328 | 328 | <input className="form-check-input" type="radio" name="cc" value={key} |
329 | 329 | checked={this.props.theme.license_cc == key} |
330 | 330 | onChange={(e) => this.props.updateTheme({license_cc: key})} |
@@ -346,21 +346,23 @@ class TW_License extends React.Component { | ||
346 | 346 | let other_block = null; |
347 | 347 | if (this.state.other_checked) { |
348 | 348 | other_block = <div className="other-block"> |
349 | - <div className={`form-group row ${this.state.valid_other ? '' : 'has-danger'}`}> | |
349 | + <div className="form-group row"> | |
350 | 350 | <label className="col-2 pl-4 form-control-label string" htmlFor="license_oather"> |
351 | 351 | ライセンス名</label> |
352 | 352 | <div className="col-10"> |
353 | - <input className="form-control string" type="text" id="license_other" | |
354 | - placeholder="名称を入力して下さい" value={this.props.theme.license_other} | |
355 | - onChange={(e) => this.props.updateTheme({license_other: e.target.value})} | |
356 | - /> | |
353 | + <input className={`form-control string ${this.state.valid_other ? '' : 'is-invalid'}`} | |
354 | + type="text" id="license_other" | |
355 | + placeholder="名称を入力して下さい" value={this.props.theme.license_other} | |
356 | + onChange={(e) => this.props.updateTheme({license_other: e.target.value})} | |
357 | + /> | |
357 | 358 | </div> |
358 | 359 | </div> |
359 | - <div className={`form-group row ${this.state.valid_other_url ? '' : 'has-danger'}`}> | |
360 | + <div className="form-group row"> | |
360 | 361 | <label className="col-2 pl-4 form-control-label string" htmlFor="license_other_url"> |
361 | 362 | ライセンス本文URL</label> |
362 | 363 | <div className="col-10"> |
363 | - <input className="form-control string" type="text" id="license_other_url" | |
364 | + <input className={`form-control string ${this.state.valid_other_url ? '' : 'is-invalid'}`} | |
365 | + type="text" id="license_other_url" | |
364 | 366 | placeholder="ライセンスの紹介・本文・など一次情報のURLを入力して下さい" |
365 | 367 | value={this.props.theme.license_other_url} |
366 | 368 | onChange={(e) => this.props.updateTheme({license_other_url: e.target.value})} |
@@ -373,13 +375,13 @@ class TW_License extends React.Component { | ||
373 | 375 | return( |
374 | 376 | <div> |
375 | 377 | <div className="card"> |
376 | - <div className="card-block"> | |
378 | + <div className="card-body"> | |
377 | 379 | <h3>ライセンスの選択</h3> |
378 | 380 | <p>公開したテーマを利用者がどのように扱えるか選択して下さい。</p> |
379 | 381 | |
380 | 382 | <div className="form-group"> |
381 | - <div className={`form-check ${this.state.valid ? '' : 'has-danger'}`}> | |
382 | - <label className="form-check-label"> | |
383 | + <div className="form-check"> | |
384 | + <label className={`form-check-label ${this.state.valid ? '' : 'text-danger'}`}> | |
383 | 385 | <input className="form-check-input" type="checkbox" |
384 | 386 | checked={this.props.theme.allow_orig_dl} |
385 | 387 | onChange={(e) => this.props.updateTheme({allow_orig_dl: e.target.checked})} /> |
@@ -439,7 +441,7 @@ class TW_Publish extends React.Component { | ||
439 | 441 | return ( |
440 | 442 | <div> |
441 | 443 | <div className="card"> |
442 | - <div className="card-block"> | |
444 | + <div className="card-body"> | |
443 | 445 | <h4>最後のステップです</h4> |
444 | 446 | <p>公開の準備ができました。以下の情報が間違いない事を確認して、公開するボタンを押して下さい。</p> |
445 | 447 | <ul> |
@@ -5,6 +5,8 @@ class User < ApplicationRecord | ||
5 | 5 | # :recoverable, :rememberable, :validatable, |
6 | 6 | devise :trackable, :omniauthable |
7 | 7 | |
8 | + validates :name, presence: true | |
9 | + | |
8 | 10 | has_many :themes |
9 | 11 | |
10 | 12 | def tw_url? |
@@ -3,16 +3,16 @@ | ||
3 | 3 | .draft-actions.pull-right.text-right |
4 | 4 | %button.btn.btn-secondary{data: {target: '.draft-basic-into', toggle: 'collapse'}} |
5 | 5 | = fa_icon :info |
6 | - %span.hidden-xs-down= t 'draft_info' | |
7 | - %span.hidden-sm-up= t 'draft_info_short' | |
6 | + %span.d-none.d-sm-inline= t 'draft_info' | |
7 | + %span.d-sm-none= t 'draft_info_short' | |
8 | 8 | %button.btn.btn-secondary{data: {toggle: 'modal', target: '.preview-info-modal'}} |
9 | 9 | = fa_icon :mobile |
10 | - %span.hidden-xs-down= t 'device_preview' | |
11 | - %span.hidden-sm-up= t 'device_preview_short' | |
10 | + %span.d-none.d-sm-inline= t 'device_preview' | |
11 | + %span.d-sm-none= t 'device_preview_short' | |
12 | 12 | .btn-group |
13 | 13 | %button.btn.btn-primary.dropdown-toggle{data: {toggle: :dropdown}} |
14 | - %span.hidden-xs-down= fa_icon('chevron-circle-right')+' '+t('finish_edit') | |
15 | - %span.hidden-sm-up= fa_icon('chevron-circle-right')+' '+t('finish_edit_short') | |
14 | + %span.d-none.d-sm-inline= fa_icon('chevron-circle-right')+' '+t('finish_edit') | |
15 | + %span.d-sm-none= fa_icon('chevron-circle-right')+' '+t('finish_edit_short') | |
16 | 16 | .dropdown-menu.dropdown-menu-right |
17 | 17 | = link_to fa_icon('chevron-circle-right')+' '+t('start_publish_theme'), new_theme_path(draft_key: @draft.key), class: 'dropdown-item' |
18 | 18 | .dropdown-divider |
@@ -24,7 +24,7 @@ | ||
24 | 24 | |
25 | 25 | .draft-basic-into.collapse.show |
26 | 26 | .card |
27 | - .card-block | |
27 | + .card-body | |
28 | 28 | %button.btn.btn-secondary.pull-right{data: {target: '.draft-basic-into', toggle: 'collapse'}} |
29 | 29 | = t 'dismiss' |
30 | 30 | %p.card-text=t 'draft_edit_desc_html', plus_icon: fa_icon('plus-circle') |
@@ -1,8 +1,8 @@ | ||
1 | -%nav.navbar.navbar-light.bg-faded.sticky-top.navbar-toggleable-md#topnav | |
2 | - %button.navbar-toggler.navbar-toggler-right{data: {toggle: :collapse, target: '#topnavbar-nav'}} | |
3 | - %span.navbar-toggler-icon | |
1 | +%nav.navbar.navbar-light.bg-light.sticky-top.navbar-expand-lg#topnav | |
4 | 2 | = link_to image_tag('app-icon.png', size: '30x30', class: 'd-inline-block align-top app-icon') + ' ' + t('site_title'), |
5 | 3 | root_path, class: "navbar-brand" |
4 | + %button.navbar-toggler{data: {toggle: :collapse, target: '#topnavbar-nav'}} | |
5 | + %span.navbar-toggler-icon | |
6 | 6 | .collapse.navbar-collapse#topnavbar-nav |
7 | 7 | %ul.navbar-nav.mr-auto |
8 | 8 | %li.nav-item{class: controller_name == "themes" ? 'active' : ''} |
@@ -9,7 +9,7 @@ | ||
9 | 9 | .card-columns.theme-index |
10 | 10 | - @themes.each do |theme| |
11 | 11 | .card{class: theme.day_frame_white? ? 'frame-white' : ''} |
12 | - .card-block.p-1 | |
12 | + .card-body.p-1 | |
13 | 13 | .icons |
14 | 14 | - 3.times do |idx| |
15 | 15 | .day-frame.day-frame-80 |
@@ -12,7 +12,7 @@ | ||
12 | 12 | .card-columns.theme-index |
13 | 13 | - @user.themes.each do |theme| |
14 | 14 | .card{class: theme.day_frame_white? ? 'frame-white' : ''} |
15 | - .card-block.p-1 | |
15 | + .card-body.p-1 | |
16 | 16 | .icons |
17 | 17 | - 3.times do |idx| |
18 | 18 | .day-frame.day-frame-80 |
@@ -1,4 +1,4 @@ | ||
1 | -.pull-right.hidden-sm-down | |
1 | +.pull-right.d-none.d-md-block | |
2 | 2 | = link_to image_tag('phone-shot.jpg', class: 'img-fluid'), |
3 | 3 | image_path('phone-shot-full.jpg'), |
4 | 4 | 'data-toggle' => 'lightbox', 'data-turbolinks' => 'false' |
@@ -36,7 +36,7 @@ | ||
36 | 36 | %w(1 髪飾り @gull08 https://twitter.com/gull08), |
37 | 37 | ].each_with_index do |tinfo, idx| |
38 | 38 | .carousel-item{class: "#{idx == 0 ? 'active' : ''} #{tinfo[0] == '3' ? 'item-white-bg' : ''}"} |
39 | - .image-container.text-center.text-lg-left.w-100 | |
39 | + .image-container.text-center.text-lg-left.w-100.d-inline-block | |
40 | 40 | = image_tag "theme-#{tinfo[0]}.png", size: '600x300', class: 'img-fluid mx-1' |
41 | 41 | .carousel-caption.d-block.text-lg-right |
42 | 42 | %h3= tinfo[1] |
@@ -45,7 +45,7 @@ | ||
45 | 45 | = link_to tinfo[2], tinfo[3] |
46 | 46 | = link_to fa_icon(:download) + ' 画像のダウンロード', |
47 | 47 | builtin_theme_download_path(tinfo[0]), |
48 | - class: 'btn btn-secondary btn-sm d-block d-lg-inline-block', | |
48 | + class: 'btn btn-light btn-sm d-block d-lg-inline-block', | |
49 | 49 | 'data-turbolinks' => 'false' |
50 | 50 | %a.carousel-control-prev{href: '#theme-gallery', data: {slide: 'prev'}} |
51 | 51 | %span.carousel-control-prev-icon |
@@ -4,7 +4,7 @@ SimpleForm.setup do |config| | ||
4 | 4 | config.button_class = 'btn btn-primary' |
5 | 5 | config.boolean_label_class = nil |
6 | 6 | |
7 | - config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
7 | + config.wrappers :vertical_form, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
8 | 8 | b.use :html5 |
9 | 9 | b.use :placeholder |
10 | 10 | b.optional :maxlength |
@@ -15,11 +15,11 @@ SimpleForm.setup do |config| | ||
15 | 15 | b.use :label, class: 'form-control-label' |
16 | 16 | |
17 | 17 | b.use :input, class: 'form-control' |
18 | - b.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
18 | + b.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
19 | 19 | b.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
20 | 20 | end |
21 | 21 | |
22 | - config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
22 | + config.wrappers :vertical_file_input, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
23 | 23 | b.use :html5 |
24 | 24 | b.use :placeholder |
25 | 25 | b.optional :maxlength |
@@ -28,11 +28,11 @@ SimpleForm.setup do |config| | ||
28 | 28 | b.use :label, class: 'form-control-label' |
29 | 29 | |
30 | 30 | b.use :input |
31 | - b.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
31 | + b.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
32 | 32 | b.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
33 | 33 | end |
34 | 34 | |
35 | - config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
35 | + config.wrappers :vertical_boolean, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
36 | 36 | b.use :html5 |
37 | 37 | b.optional :readonly |
38 | 38 |
@@ -40,20 +40,20 @@ SimpleForm.setup do |config| | ||
40 | 40 | ba.use :label_input |
41 | 41 | end |
42 | 42 | |
43 | - b.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
43 | + b.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
44 | 44 | b.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
45 | 45 | end |
46 | 46 | |
47 | - config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
47 | + config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
48 | 48 | b.use :html5 |
49 | 49 | b.optional :readonly |
50 | 50 | b.use :label, class: 'form-control-label' |
51 | 51 | b.use :input |
52 | - b.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
52 | + b.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
53 | 53 | b.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
54 | 54 | end |
55 | 55 | |
56 | - config.wrappers :horizontal_form, tag: 'div', class: 'form-group row', error_class: 'has-danger' do |b| | |
56 | + config.wrappers :horizontal_form, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
57 | 57 | b.use :html5 |
58 | 58 | b.use :placeholder |
59 | 59 | b.optional :maxlength |
@@ -65,12 +65,12 @@ SimpleForm.setup do |config| | ||
65 | 65 | |
66 | 66 | b.wrapper tag: 'div', class: 'col-9' do |ba| |
67 | 67 | ba.use :input, class: 'form-control' |
68 | - ba.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
68 | + ba.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
69 | 69 | ba.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
70 | 70 | end |
71 | 71 | end |
72 | 72 | |
73 | - config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group row', error_class: 'has-danger' do |b| | |
73 | + config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
74 | 74 | b.use :html5 |
75 | 75 | b.use :placeholder |
76 | 76 | b.optional :maxlength |
@@ -80,12 +80,12 @@ SimpleForm.setup do |config| | ||
80 | 80 | |
81 | 81 | b.wrapper tag: 'div', class: 'col-9' do |ba| |
82 | 82 | ba.use :input |
83 | - ba.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
83 | + ba.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
84 | 84 | ba.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
85 | 85 | end |
86 | 86 | end |
87 | 87 | |
88 | - config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group row', error_class: 'has-danger' do |b| | |
88 | + config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
89 | 89 | b.use :html5 |
90 | 90 | b.optional :readonly |
91 | 91 |
@@ -94,12 +94,12 @@ SimpleForm.setup do |config| | ||
94 | 94 | ba.use :label_input |
95 | 95 | end |
96 | 96 | |
97 | - wr.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
97 | + wr.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
98 | 98 | wr.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
99 | 99 | end |
100 | 100 | end |
101 | 101 | |
102 | - config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group row', error_class: 'has-danger' do |b| | |
102 | + config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
103 | 103 | b.use :html5 |
104 | 104 | b.optional :readonly |
105 | 105 |
@@ -107,12 +107,12 @@ SimpleForm.setup do |config| | ||
107 | 107 | |
108 | 108 | b.wrapper tag: 'div', class: 'col-9' do |ba| |
109 | 109 | ba.use :input |
110 | - ba.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
110 | + ba.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
111 | 111 | ba.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
112 | 112 | end |
113 | 113 | end |
114 | 114 | |
115 | - config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
115 | + config.wrappers :inline_form, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
116 | 116 | b.use :html5 |
117 | 117 | b.use :placeholder |
118 | 118 | b.optional :maxlength |
@@ -123,22 +123,22 @@ SimpleForm.setup do |config| | ||
123 | 123 | b.use :label, class: 'sr-only' |
124 | 124 | |
125 | 125 | b.use :input, class: 'form-control' |
126 | - b.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
126 | + b.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
127 | 127 | b.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
128 | 128 | end |
129 | 129 | |
130 | - config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
130 | + config.wrappers :multi_select, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
131 | 131 | b.use :html5 |
132 | 132 | b.optional :readonly |
133 | 133 | b.use :label, class: 'form-control-label' |
134 | 134 | b.wrapper tag: 'div', class: 'form-inline' do |ba| |
135 | 135 | ba.use :input, class: 'form-control' |
136 | - ba.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
136 | + ba.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
137 | 137 | ba.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
138 | 138 | end |
139 | 139 | end |
140 | 140 | |
141 | - config.wrappers :horizontal_multi_select, tag: 'div', class: 'form-group row', error_class: 'has-danger' do |b| | |
141 | + config.wrappers :horizontal_multi_select, tag: 'div', class: 'form-group row', error_class: 'has-invalid' do |b| | |
142 | 142 | b.use :html5 |
143 | 143 | b.optional :readonly |
144 | 144 | b.use :label, class: 'col-3 form-control-label' |
@@ -146,7 +146,7 @@ SimpleForm.setup do |config| | ||
146 | 146 | b.wrapper tag: 'div', class: 'col-9' do |ba| |
147 | 147 | ba.wrapper tag: 'div', class: 'form-inline' do |bb| |
148 | 148 | bb.use :input, class: 'form-control' |
149 | - bb.use :error, wrap_with: { tag: 'span', class: 'form-control-feedback' } | |
149 | + bb.use :error, wrap_with: { tag: 'span', class: 'invalid-feedback' } | |
150 | 150 | bb.use :hint, wrap_with: { tag: 'p', class: 'form-text text-muted' } |
151 | 151 | end |
152 | 152 | end |