Skip to content

Commit

Permalink
Update to bootstrap_form 2.1.1 for Rails 4.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
toomuchpete committed Mar 24, 2024
1 parent 4bfe133 commit 61f438f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ gem 'whenever', '~> 0.9.4'
gem 'active_link_to', '~> 1.0.0'
gem 'bootstrap-sass', '~> 2.3.1.0'
gem 'bootstrap-will_paginate', '~> 1.0.0'
gem 'bootstrap_form', '~> 0.3.2'
gem 'bootstrap_form', '~> 2.1.1'
gem 'haml', '~> 4.0.1'
gem 'jquery-rails', '~> 2.2.1'
gem 'will_paginate', '~> 3.1.6'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GEM
sass (~> 3.2)
bootstrap-will_paginate (1.0.0)
will_paginate
bootstrap_form (0.3.2)
bootstrap_form (2.1.1)
braintree (2.101.0)
builder (>= 2.0.0)
bson (3.2.7)
Expand Down Expand Up @@ -337,7 +337,7 @@ DEPENDENCIES
binding_of_caller (~> 1.0.0)
bootstrap-sass (~> 2.3.1.0)
bootstrap-will_paginate (~> 1.0.0)
bootstrap_form (~> 0.3.2)
bootstrap_form (~> 2.1.1)
braintree (~> 2.101.0)
bugsnag (~> 5.1.0)
dalli
Expand Down
9 changes: 4 additions & 5 deletions app/views/registrations/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
= f.check_box :waiver_accepted, value: 1, label: raw('I have read, understand, and accept the <br /> AFDC\'s <a href="http://blog.afdc.com/wp-content/uploads/2012/05/2012-AFDC-Waiver-Minors.pdf">liability waiver</a> and <a href="http://www.afdc.com/refund-policy/">refund policy</a>.')
- if @registration.errors[:waiver_accepted].any?
= f.alert_message @registration.errors[:waiver_accepted].first
= f.actions do
- if @registration.new_record?
= f.primary "Register", disable_with: 'Registering...'
- else
= f.primary "Update", disable_with: 'Updating...'
- if @registration.new_record?
= f.submit "Register", disable_with: 'Registering...', class: "btn btn-primary"
- else
= f.submit "Update", disable_with: 'Updating...', class: "btn btn-primary"
9 changes: 4 additions & 5 deletions app/views/users/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
COVID Admin


= f.actions do
- if @user.new_record?
= f.primary "Create my Account"
- else
= f.primary "Update Account"
- if @user.new_record?
= f.submit "Create my Account", class: "btn btn-primary"
- else
= f.submit "Update Account", class: "btn btn-primary"
3 changes: 1 addition & 2 deletions app/views/users/edit_avatar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
= bootstrap_form_for(@user, html: { class: 'form-horizontal' }, url: update_avatar_user_path(@user), method: 'PUT', help: :block) do |f|
= f.alert_message "Please fix the errors below."
= f.file_field :avatar, label: 'Upload file'
= f.actions do
= f.primary "Upload Image", disable_with: 'Uploading...'
= f.submit "Upload Image", disable_with: 'Uploading...', class: "btn btn-primary"

0 comments on commit 61f438f

Please sign in to comment.