From: Mark Otto Date: Sun, 24 Dec 2017 06:47:37 +0000 (-0800) Subject: Rewrite custom file input X-Git-Tag: v4.0.0-beta.3~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b01e81ed36493fc687250643395e2d5c55b07e28;p=thirdparty%2Fbootstrap.git Rewrite custom file input - Changes the wrapping label to a div so we can style the label instead of another element while also supporting form validation. - Fixes form validation styles for custom file input (closes #24831). - Updates docs with validation styles (also adding example feedback text while I was there) and new how it works section. --- diff --git a/docs/4.0/components/forms.md b/docs/4.0/components/forms.md index c69bfe2ae2..e5a568b67b 100644 --- a/docs/4.0/components/forms.md +++ b/docs/4.0/components/forms.md @@ -899,31 +899,37 @@ Our example forms show native textual ``s above, but form validation styl {% example html %}
-
+
+
Example invalid feedback text
-
+
+
More example invalid feedback text
- +
+ +
Example invalid custom select feedback
+
- +
+ + +
Example invalid custom file feedback
+
{% endexample %} @@ -1062,24 +1068,16 @@ As is the `size` attribute: ### File browser -The file input is the most gnarly of the bunch and require additional JavaScript if you'd like to hook them up with functional *Choose file...* and selected file name text. +The file input is the most gnarly of the bunch and requires additional JavaScript if you'd like to hook them up with functional *Choose file...* and selected file name text. {% example html %} - +
+ + +
{% endexample %} -Here's how it works: - -- We wrap the `` in a `