Tidy up last patch and update changelog

This commit is contained in:
Rafael Mendonça França 2011-04-07 21:53:27 -03:00
parent 5bf135ae93
commit 7f7f374d4e
3 changed files with 12 additions and 11 deletions

View File

@ -8,6 +8,7 @@
* Add form_class configuration option (by github.com/fagiani)
* Default step of "any" for number input with non integer attributes (by github.com/fedesoria)
* Add option to disable HTML5 browser validations on all forms (by github.com/coryschires)
* Add option to diable all HTML% extensions (by github.com/wolframarnold)
* bug fix
* Fix for file attributes automatic detection, to work with virtual attributes

View File

@ -64,6 +64,11 @@ SimpleForm.setup do |config|
# Tell browsers whether to use default HTML5 validations (novalidate option). Default is enabled.
# config.disable_browser_validations = false
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes (e.g. required) are used
# or not. True by default.
# Having this on in non-HTML5 compliant sites can cause odd behavior in HTML5-aware browsers such as Chrome.
# config.use_html5 = true
# Custom mappings for input types. This should be a hash containing a regexp
# to match as key, and the input type that will be used when the field name
# matches the regexp as value.
@ -83,9 +88,4 @@ SimpleForm.setup do |config|
# When false, do not use translations for labels, hints or placeholders.
# config.translate = true
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes (e.g. required) are used
# or not. True by default.
# Having this on in non-HTML5 compliant sites can cause odd behavior in HTML5-aware browsers such as Chrome.
# config.use_html5 = true
end

View File

@ -95,6 +95,12 @@ module SimpleForm
mattr_accessor :disable_browser_validations
@@disable_browser_validations = false
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes (e.g. required) are used
# or not. True by default.
# Having this on in non-HTML5 compliant sites can cause odd behavior in HTML5-aware browsers such as Chrome.
mattr_accessor :use_html5
@@use_html5 = true
# Collection of methods to detect if a file type was given.
mattr_accessor :file_methods
@@file_methods = [ :mounted_as, :file?, :public_filename ]
@ -122,12 +128,6 @@ module SimpleForm
mattr_accessor :translate
@@translate = true
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes (e.g. required) are used
# or not. True by default.
# Having this on in non-HTML5 compliant sites can cause odd behavior in HTML5-aware browsers such as Chrome.
mattr_accessor :use_html5
@@use_html5 = true
# Default way to setup SimpleForm. Run rails generate simple_form:install
# to create a fresh initializer with all configuration values.
def self.setup