Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixes error validation states. #87

Merged
merged 2 commits into from

1 participant

@mjbellantoni

This adds necessary classes for both form and form field errors. These
had changed between Bootstrap 2 and 3.

added some commits
@mjbellantoni Fixes error validation state.
This adds necessary classes for both form and form field errors. These
had changed between Bootstrap 2 and 3.
6fbe0ca
@mjbellantoni v3.0.0.rc.2 7b91c8e
@mjbellantoni mjbellantoni merged commit 0804377 into from
@mjbellantoni mjbellantoni deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 27, 2013
  1. Fixes error validation state.

    authored
    This adds necessary classes for both form and form field errors. These
    had changed between Bootstrap 2 and 3.
Commits on Nov 28, 2013
  1. v3.0.0.rc.2

    authored
This page is out of date. Refresh to see the latest.
View
2  VERSION
@@ -1 +1 @@
-3.0.0.rc.1
+3.0.0.rc.2
View
4 lib/formtastic-bootstrap/helpers/errors_helper.rb
@@ -53,9 +53,9 @@ def semantic_errors(*args)
return nil if full_errors.blank?
if html_options[:class].blank?
- html_options[:class] = "alert alert-error"
+ html_options[:class] = "alert alert-danger"
else
- html_options[:class] = "alert alert-error " + html_options[:class]
+ html_options[:class] = "alert alert-danger " + html_options[:class]
end
template.content_tag(:div, html_options) do
View
1  lib/formtastic-bootstrap/inputs/base/labelling.rb
@@ -10,6 +10,7 @@ def label_html_options
# Bootstrap defines class 'label' too, so remove the
# one that gets created by Formtastic.
options[:class] = options[:class].reject { |c| c == 'label' }
+ options[:class] << " control-label"
end
end
View
1  lib/formtastic-bootstrap/inputs/base/wrapping.rb
@@ -46,6 +46,7 @@ def form_group_wrapping(&block)
def wrapper_html_options
super.tap do |options|
options[:class] << " form-group"
+ options[:class] << " has-error" if errors?
end
end
View
2  lib/formtastic-bootstrap/version.rb
@@ -1,3 +1,3 @@
module FormtasticBootstrap
- VERSION = "3.0.0.rc.1"
+ VERSION = "3.0.0.rc.2"
end
Something went wrong with that request. Please try again.