bootstrap-bookingsync-sass 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -1
  3. data/CHANGELOG.md +11 -0
  4. data/assets/stylesheets/_bootstrap-bookingsync.scss +5 -2
  5. data/assets/stylesheets/bookingsync/_layout.scss +0 -49
  6. data/assets/stylesheets/bookingsync/_menu.scss +282 -0
  7. data/assets/stylesheets/bookingsync/_sheet.scss +27 -0
  8. data/assets/stylesheets/bookingsync/_switch.scss +0 -4
  9. data/assets/stylesheets/bookingsync/_theme.scss +0 -301
  10. data/assets/stylesheets/bookingsync/_type.scss +0 -4
  11. data/assets/stylesheets/bookingsync/_utilities.scss +46 -3
  12. data/assets/stylesheets/bookingsync/_variables.scss +130 -108
  13. data/docs/Gemfile +16 -0
  14. data/docs/Guardfile +25 -0
  15. data/docs/Rakefile +53 -0
  16. data/docs/Rules +58 -0
  17. data/docs/config.ru +15 -0
  18. data/docs/content/CNAME +1 -0
  19. data/docs/content/assets/javascripts/application.js.coffee +7 -0
  20. data/docs/content/assets/stylesheets/_base.scss +41 -0
  21. data/docs/content/assets/stylesheets/_callout.scss +50 -0
  22. data/docs/content/assets/stylesheets/_code.scss +18 -0
  23. data/docs/content/assets/stylesheets/_panels.scss +4 -0
  24. data/docs/content/assets/stylesheets/_variables.scss +14 -0
  25. data/docs/content/assets/stylesheets/application.scss +11 -0
  26. data/docs/content/components.html +23 -0
  27. data/docs/content/components/chosen.md +54 -0
  28. data/docs/content/components/menu.md +184 -0
  29. data/docs/content/components/sheet.md +36 -0
  30. data/docs/content/components/switch.md +44 -0
  31. data/docs/content/css.html +42 -0
  32. data/docs/content/css/forms.md +1138 -0
  33. data/docs/content/css/helpers.md +49 -0
  34. data/docs/content/highlight.css +1 -0
  35. data/docs/content/index.html +5 -0
  36. data/docs/layouts/default.html +12 -0
  37. data/docs/layouts/head.html +17 -0
  38. data/docs/layouts/navbar.html +27 -0
  39. data/docs/lib/default.rb +13 -0
  40. data/docs/nanoc.yaml +74 -0
  41. data/docs/vendor/assets/javascripts/chosen.js +1284 -0
  42. data/docs/vendor/assets/stylesheets/chosen.scss +448 -0
  43. data/lib/bootstrap/bookingsync/version.rb +1 -1
  44. metadata +36 -3
@@ -0,0 +1,36 @@
1
+ ##Sheet
2
+
3
+ <div class="example">
4
+ <h2 id="sheet-example">Basic example</h2>
5
+ <p>Highly inspired from the <code>panel</code> component, the sheet will auto scale and have a relative position to ease children positioning.</p>
6
+ <div class="bs-example bs-sheet" data-example-id="sheet-example">
7
+ <div class="sheet">
8
+ <p>Text...</p>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ ~~~ html
13
+ <div class="sheet">
14
+ <p>Text...</p>
15
+ </div>
16
+ ~~~
17
+
18
+ <div class="example">
19
+ <h2 id="sheet-example-with-header">Example with header</h2>
20
+ <div class="bs-example bs-sheet-with-header" data-example-id="sheet-example-with-header">
21
+ <div class="sheet">
22
+ <div class="sheet-header">
23
+ <h2>Header</h2>
24
+ </div>
25
+ <p>Text...</p>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ ~~~ html
30
+ <div class="sheet">
31
+ <div class="sheet-header">
32
+ <h2>Header</h2>
33
+ </div>
34
+ <p>Text...</p>
35
+ </div>
36
+ ~~~
@@ -0,0 +1,44 @@
1
+ ## Switch
2
+
3
+ Turns checkboxes and radio buttons in toggle switches
4
+
5
+ <div class="bs-callout bs-callout-danger">
6
+ <h4>Plugin dependency</h4>
7
+ <p>
8
+ This component requires customized bootstrapSwitch JS plugin provided by the
9
+ bootstrap-bookingsync-sass gem.
10
+ </p>
11
+ </div>
12
+
13
+ <div class="bs-callout bs-callout-danger">
14
+ <h4>Sizes</h4>
15
+ <p>
16
+ BootstrapSwitch plugin provides various size variants. The only variant
17
+ currently supported by bootstrap-bookingsync-sass is the
18
+ <code>switch-small</code>.
19
+ </p>
20
+ </div>
21
+
22
+ <div class="example">
23
+ <div class="make-switch switch-small">
24
+ <input type="checkbox" checked>
25
+ </div>
26
+ </div>
27
+ ~~~ HTML
28
+ <div class="make-switch switch-small">
29
+ <input type="checkbox" checked>
30
+ </div>
31
+ ~~~
32
+
33
+ ### Disabled state
34
+
35
+ <div class="example">
36
+ <div class="make-switch switch-small">
37
+ <input type="checkbox" checked disabled>
38
+ </div>
39
+ </div>
40
+ ~~~ HTML
41
+ <div class="make-switch switch-small">
42
+ <input type="checkbox" checked disabled>
43
+ </div>
44
+ ~~~
@@ -0,0 +1,42 @@
1
+ <div class="row">
2
+ <div class="col-md-3 col-md-push-9">
3
+ <div class="panel panel-default">
4
+ <div class="panel-heading">
5
+ <h3 class="panel-title">
6
+ <%= link_to("Forms", "#forms") %>
7
+ </h3>
8
+ </div>
9
+ <div class="list-group">
10
+ <%= link_to("Basic example", "#basic-example", class: "list-group-item") %>
11
+ <%= link_to("Inline form", "#inline-form", class: "list-group-item") %>
12
+ <%= link_to("Horizontal form", "#horizontal-form", class: "list-group-item") %>
13
+ <%= link_to("Supported controls", "#supported-controls", class: "list-group-item") %>
14
+ <%= link_to("Static control", "#static-control", class: "list-group-item") %>
15
+ <%= link_to("Focus state", "#focus-state", class: "list-group-item") %>
16
+ <%= link_to("Filled state", "#filled-state", class: "list-group-item") %>
17
+ <%= link_to("Disabled state", "#disabled-state", class: "list-group-item") %>
18
+ <%= link_to("Readonly state", "#readonly-state", class: "list-group-item") %>
19
+ <%= link_to("Help text", "#help-text", class: "list-group-item") %>
20
+ <%= link_to("Validation states", "#validation-states", class: "list-group-item") %>
21
+ <%= link_to("Control sizing", "#control-sizing", class: "list-group-item") %>
22
+ </div>
23
+ <div class="panel-heading">
24
+ <h3 class="panel-title">
25
+ <%= link_to("Helper classes", "#helper-classes") %>
26
+ </h3>
27
+ </div>
28
+ <div class="list-group">
29
+ <%= link_to("Basic example", "#basic-example", class: "list-group-item") %>
30
+ </div>
31
+ </div>
32
+ </div>
33
+
34
+ <div class="col-md-9 col-md-pull-3">
35
+ <div class="panel panel-default">
36
+ <div class="panel-body reference-body">
37
+ <%= items['/css/forms/'].compiled_content %>
38
+ <%= items['/css/helpers/'].compiled_content %>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
@@ -0,0 +1,1138 @@
1
+ # Forms
2
+
3
+ ## Basic example
4
+
5
+ Individual form controls automatically receive some global styling. All textual `<input>`, `<textarea>`, and `<select>` elements with `.form-control` are set to `width: 100%;` by default. Wrap labels and controls in `.form-group` for optimum spacing.
6
+
7
+ <div class="example">
8
+ <form>
9
+ <div class="form-group">
10
+ <label for="exampleInputEmail1">Email address</label>
11
+ <input type="email" class="form-control" id="exampleInputEmail1">
12
+ </div>
13
+ <div class="form-group">
14
+ <label for="exampleInputPassword1">Password</label>
15
+ <input type="password" class="form-control" id="exampleInputPassword1">
16
+ </div>
17
+ <div class="form-group">
18
+ <label for="exampleTextarea1">Comment</label>
19
+ <textarea class="form-control" id="exampleTextarea1" rows="5"></textarea>
20
+ </div>
21
+ <div class="form-group">
22
+ <label for="exampleInputFile">File input</label>
23
+ <input type="file" id="exampleInputFile">
24
+ <p class="help-block">Example block-level help text here.</p>
25
+ </div>
26
+ <div class="checkbox">
27
+ <label>
28
+ <input type="checkbox"> Check me out
29
+ </label>
30
+ </div>
31
+ <button type="submit" class="btn btn-default">Submit</button>
32
+ </form>
33
+ </div>
34
+
35
+ ~~~ html
36
+ <form>
37
+ <div class="form-group">
38
+ <label for="exampleInputEmail1">Email address</label>
39
+ <input type="email" class="form-control" id="exampleInputEmail1">
40
+ </div>
41
+ <div class="form-group">
42
+ <label for="exampleInputPassword1">Password</label>
43
+ <input type="password" class="form-control" id="exampleInputPassword1">
44
+ </div>
45
+ <div class="form-group">
46
+ <label for="exampleInputFile">File input</label>
47
+ <input type="file" id="exampleInputFile">
48
+ <p class="help-block">Example block-level help text here.</p>
49
+ </div>
50
+ <div class="checkbox">
51
+ <label>
52
+ <input type="checkbox"> Check me out
53
+ </label>
54
+ </div>
55
+ <button type="submit" class="btn btn-default">Submit</button>
56
+ </form>
57
+ ~~~
58
+
59
+ <div class="bs-callout bs-callout-warning">
60
+ <h4>Don't mix form groups with input groups</h4>
61
+ <p>Do not mix form groups directly with <a href="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
62
+ </div>
63
+
64
+ ## Inline form
65
+
66
+ Add `.form-inline` to your form (which doesn't have to be a `<form>`) for left-aligned and inline-block controls. __This only applies to forms within viewports that are at least 768px wide.__
67
+
68
+ <div class="bs-callout bs-callout-danger">
69
+ <h4>May require custom widths</h4>
70
+ <p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
71
+ </div>
72
+ <div class="bs-callout bs-callout-warning">
73
+ <h4>Always add labels</h4>
74
+ <p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria-labelledby` or `title` attribute. If none of these is present, screen readers may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised.</p>
75
+ </div>
76
+
77
+ <div class="example">
78
+ <form class="form-inline">
79
+ <div class="form-group">
80
+ <label for="exampleInputName2">Name</label>
81
+ <input type="text" class="form-control" id="exampleInputName2">
82
+ </div>
83
+ <div class="form-group">
84
+ <label for="exampleInputEmail2">Email</label>
85
+ <input type="email" class="form-control" id="exampleInputEmail2">
86
+ </div>
87
+ <button type="submit" class="btn btn-default">Send invitation</button>
88
+ </form>
89
+ </div>
90
+
91
+ ~~~ html
92
+ <form class="form-inline">
93
+ <div class="form-group">
94
+ <label for="exampleInputName2">Name</label>
95
+ <input type="text" class="form-control" id="exampleInputName2">
96
+ </div>
97
+ <div class="form-group">
98
+ <label for="exampleInputEmail2">Email</label>
99
+ <input type="email" class="form-control" id="exampleInputEmail2">
100
+ </div>
101
+ <button type="submit" class="btn btn-default">Send invitation</button>
102
+ </form>
103
+ ~~~
104
+
105
+ <div class="example">
106
+ <form class="form-inline">
107
+ <div class="form-group">
108
+ <label for="exampleInputEmail3">Email address</label>
109
+ <input type="email" class="form-control" id="exampleInputEmail3">
110
+ </div>
111
+ <div class="form-group">
112
+ <label for="exampleInputPassword3">Password</label>
113
+ <input type="password" class="form-control" id="exampleInputPassword3">
114
+ </div>
115
+ <div class="checkbox">
116
+ <label>
117
+ <input type="checkbox"> Remember me
118
+ </label>
119
+ </div>
120
+ <button type="submit" class="btn btn-default">Sign in</button>
121
+ </form>
122
+ </div>
123
+
124
+ ~~~ html
125
+ <form class="form-inline">
126
+ <div class="form-group">
127
+ <label for="exampleInputEmail3">Email address</label>
128
+ <input type="email" class="form-control" id="exampleInputEmail3">
129
+ </div>
130
+ <div class="form-group">
131
+ <label for="exampleInputPassword3">Password</label>
132
+ <input type="password" class="form-control" id="exampleInputPassword3">
133
+ </div>
134
+ <div class="checkbox">
135
+ <label>
136
+ <input type="checkbox"> Remember me
137
+ </label>
138
+ </div>
139
+ <button type="submit" class="btn btn-default">Sign in</button>
140
+ </form>
141
+ ~~~
142
+
143
+ <div class="example">
144
+ <form class="form-inline">
145
+ <div class="form-group">
146
+ <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
147
+ <div class="input-group">
148
+ <div class="input-group-addon">$</div>
149
+ <input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
150
+ <div class="input-group-addon">.00</div>
151
+ </div>
152
+ </div>
153
+ <div class="form-group">
154
+ <div class="input-group">
155
+ <div class="input-group-addon">$</div>
156
+ <label for="exampleInputAmountWithLabel">Amount (in dollars)
157
+ </label>
158
+ <input type="text" class="form-control" id="exampleInputAmountWithLabel">
159
+ <div class="input-group-addon">.00</div>
160
+ </div>
161
+ </div>
162
+ <button type="submit" class="btn btn-primary">Transfer cash</button>
163
+ </form>
164
+ </div>
165
+
166
+ ~~~ html
167
+ <form class="form-inline">
168
+ <div class="form-group">
169
+ <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
170
+ <div class="input-group">
171
+ <div class="input-group-addon">$</div>
172
+ <input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
173
+ <div class="input-group-addon">.00</div>
174
+ </div>
175
+ </div>
176
+ <div class="form-group">
177
+ <div class="input-group">
178
+ <div class="input-group-addon">$</div>
179
+ <label for="exampleInputAmountWithLabel">Amount (in dollars)
180
+ </label>
181
+ <input type="text" class="form-control" id="exampleInputAmountWithLabel">
182
+ <div class="input-group-addon">.00</div>
183
+ </div>
184
+ </div>
185
+ <button type="submit" class="btn btn-primary">Transfer cash</button>
186
+ </form>
187
+ ~~~
188
+
189
+ ## Horizontal form
190
+
191
+ <div class="bs-callout bs-callout-info">
192
+ <h4>Not Recommended</h4>
193
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
194
+ </div>
195
+
196
+ ## Supported controls
197
+
198
+ Examples of standard form controls supported in an example form layout.
199
+
200
+ ### Inputs
201
+
202
+ Most common form control, text-based input fields. Includes support for all HTML5 types: `text`, `password`, `datetime`, `datetime-local`, `date`, `month`, `time`, `week`, `number`, `email`, `url`, `search`, `tel`, and `color`.
203
+
204
+ <div class="bs-callout bs-callout-danger">
205
+ <h4>Type declaration required</h4>
206
+ <p>Inputs will only be fully styled if their `type` is properly declared.</p>
207
+ </div>
208
+
209
+ <div class="example">
210
+ <form>
211
+ <input type="text" class="form-control" placeholder="Text input">
212
+ </form>
213
+ </div>
214
+
215
+ ~~~ html
216
+ <input type="text" class="form-control" placeholder="Text input">
217
+ ~~~
218
+
219
+ <div class="bs-callout bs-callout-info" id="callout-xref-input-group">
220
+ <h4>Input groups</h4>
221
+ <p>To add integrated text or buttons before and/or after any text-based <code>&lt;input&gt;</code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
222
+ </div>
223
+
224
+ ### Textarea
225
+
226
+ Form control which supports multiple lines of text. Change `rows` attribute as necessary.
227
+
228
+ <div class="example">
229
+ <form>
230
+ <div class="form-group">
231
+ <textarea class="form-control" rows="3" placeholder="Textarea"></textarea>
232
+ </div>
233
+ </form>
234
+ </div>
235
+
236
+ ~~~ html
237
+ <textarea class="form-control" rows="3"></textarea>
238
+ ~~~
239
+
240
+ ### Checkboxes and radios
241
+
242
+ Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.
243
+
244
+ Disabled checkboxes and radios are supported, but to provide a "not-allowed" cursor on hover of the parent `<label>`, you'll need to add the `.disabled` class to the parent `.radio`, `.radio-inline`, `.checkbox`, or `.checkbox-inline`.
245
+
246
+ #### Default (stacked)
247
+
248
+ <div class="example">
249
+ <form>
250
+ <div class="checkbox">
251
+ <label>
252
+ <input type="checkbox" value="">
253
+ Option one is this and that&mdash;be sure to include why it's great
254
+ </label>
255
+ </div>
256
+ <div class="checkbox">
257
+ <label>
258
+ <input type="checkbox" value="" disabled>
259
+ Option two is disabled
260
+ </label>
261
+ </div>
262
+ <br>
263
+ <div class="radio">
264
+ <label>
265
+ <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
266
+ Option one is this and that&mdash;be sure to include why it's great
267
+ </label>
268
+ </div>
269
+ <div class="radio">
270
+ <label>
271
+ <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
272
+ Option two can be something else and selecting it will deselect option one
273
+ </label>
274
+ </div>
275
+ <div class="radio">
276
+ <label>
277
+ <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
278
+ Option three is disabled
279
+ </label>
280
+ </div>
281
+ </form>
282
+ </div>
283
+
284
+ ~~~ html
285
+ <div class="checkbox">
286
+ <label>
287
+ <input type="checkbox" value="">
288
+ Option one is this and that&mdash;be sure to include why it's great
289
+ </label>
290
+ </div>
291
+ <div class="checkbox">
292
+ <label>
293
+ <input type="checkbox" value="" disabled>
294
+ Option two is disabled
295
+ </label>
296
+ </div>
297
+
298
+ <div class="radio">
299
+ <label>
300
+ <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
301
+ Option one is this and that&mdash;be sure to include why it's great
302
+ </label>
303
+ </div>
304
+ <div class="radio">
305
+ <label>
306
+ <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
307
+ Option two can be something else and selecting it will deselect option one
308
+ </label>
309
+ </div>
310
+ <div class="radio ">
311
+ <label>
312
+ <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
313
+ Option three is disabled
314
+ </label>
315
+ </div>
316
+ ~~~
317
+
318
+ #### Inline checkboxes and radios
319
+
320
+ Use the `.checkbox-inline` or `.radio-inline` classes on a series of checkboxes or radios for controls that appear on the same line.
321
+
322
+ <div class="example">
323
+ <form>
324
+ <label class="checkbox-inline">
325
+ <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
326
+ </label>
327
+ <label class="checkbox-inline">
328
+ <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
329
+ </label>
330
+ <label class="checkbox-inline">
331
+ <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
332
+ </label>
333
+ </form>
334
+ <br>
335
+ <form>
336
+ <label class="radio-inline">
337
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value=" option1"> 1
338
+ </label>
339
+ <label class="radio-inline">
340
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value=" option2"> 2
341
+ </label>
342
+ <label class="radio-inline">
343
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value=" option3"> 3
344
+ </label>
345
+ </form>
346
+ </div>
347
+
348
+ ~~~ html
349
+ <label class="checkbox-inline">
350
+ <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
351
+ </label>
352
+ <label class="checkbox-inline">
353
+ <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
354
+ </label>
355
+ <label class="checkbox-inline">
356
+ <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
357
+ </label>
358
+
359
+ <label class="radio-inline">
360
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> 1
361
+ </label>
362
+ <label class="radio-inline">
363
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> 2
364
+ </label>
365
+ <label class="radio-inline">
366
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3"> 3
367
+ </label>
368
+ ~~~
369
+
370
+ #### Checkboxes and radios without label text
371
+
372
+ Should you have no text within the `<label>`, the input is positioned as you'd expect. <strong>Currently only works on non-inline checkboxes and radios.</strong> Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
373
+
374
+ <div class="example">
375
+ <form>
376
+ <div class="checkbox">
377
+ <label>
378
+ <input type="checkbox" id="blankCheckbox" value="option1" aria-label=" Checkbox without label text">
379
+ </label>
380
+ </div>
381
+ <div class="radio">
382
+ <label>
383
+ <input type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="Radio button without label text">
384
+ </label>
385
+ </div>
386
+ </form>
387
+ </div>
388
+
389
+ ~~~ html
390
+ <div class="checkbox">
391
+ <label>
392
+ <input type="checkbox" id="blankCheckbox" value="option1" aria-label="...">
393
+ </label>
394
+ </div>
395
+ <div class="radio">
396
+ <label>
397
+ <input type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="...">
398
+ </label>
399
+ </div>
400
+ ~~~
401
+
402
+ ### Selects
403
+
404
+ Note that many native select menus—namely in Safari and Chrome—have rounded corners that cannot be modified via `border-radius` properties.
405
+
406
+ <div class="example">
407
+ <form>
408
+ <select class="form-control">
409
+ <option>1</option>
410
+ <option>2</option>
411
+ <option>3</option>
412
+ <option>4</option>
413
+ <option>5</option>
414
+ </select>
415
+ </form>
416
+ </div>
417
+
418
+ ~~~ html
419
+ <select class="form-control">
420
+ <option>1</option>
421
+ <option>2</option>
422
+ <option>3</option>
423
+ <option>4</option>
424
+ <option>5</option>
425
+ </select>
426
+ ~~~
427
+
428
+ For `<select>` controls with the `multiple` attribute, multiple options are shown by default.
429
+
430
+ <div class="example">
431
+ <form>
432
+ <select multiple class="form-control">
433
+ <option>1</option>
434
+ <option>2</option>
435
+ <option>3</option>
436
+ <option>4</option>
437
+ <option>5</option>
438
+ </select>
439
+ </form>
440
+ </div>
441
+
442
+ ~~~ html
443
+ <select multiple class="form-control">
444
+ <option>1</option>
445
+ <option>2</option>
446
+ <option>3</option>
447
+ <option>4</option>
448
+ <option>5</option>
449
+ </select>
450
+ ~~~
451
+
452
+ ## Static control
453
+
454
+ When you need to place plain text next to a form label within a form, use the `.form-control-static` class on a `<p>`.
455
+
456
+ <div class="example">
457
+ <form class="form-inline">
458
+ <div class="form-group">
459
+ <label class="sr-only">Email</label>
460
+ <p class="form-control-static">email@example.com</p>
461
+ </div>
462
+ <div class="form-group">
463
+ <label for="inputPassword2" class="sr-only">Password</label>
464
+ <input type="password" class="form-control" id="inputPassword2" placeholder="Password">
465
+ </div>
466
+ <button type="submit" class="btn btn-default">Confirm identity</button>
467
+ </form>
468
+ </div>
469
+
470
+ ~~~ html
471
+ <form class="form-inline">
472
+ <div class="form-group">
473
+ <label class="sr-only">Email</label>
474
+ <p class="form-control-static">email@example.com</p>
475
+ </div>
476
+ <div class="form-group">
477
+ <label for="inputPassword2" class="sr-only">Password</label>
478
+ <input type="password" class="form-control" id="inputPassword2" placeholder="Password">
479
+ </div>
480
+ <button type="submit" class="btn btn-default">Confirm identity</button>
481
+ </form>
482
+ ~~~
483
+
484
+ ## Focus state
485
+
486
+ We remove the default `outline` styles on some form controls and adjust labels and border-bottom placement and color for `:focus`.
487
+
488
+ <div class="example">
489
+ <form>
490
+ <div class="form-group focused">
491
+ <label for="focusedInput2">Focus state</label>
492
+ <input class="form-control" id="focusedInput2" type="text"
493
+ value="Demonstrative focus state">
494
+ </div>
495
+ <div class="form-group focused">
496
+ <label for="focusedTextarea">Comment</label>
497
+ <textarea class="form-control" id="focusedTextarea" rows="5">
498
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
499
+ </textarea>
500
+ </div>
501
+ </form>
502
+ </div>
503
+
504
+ ~~~ html
505
+ <div class="form-group focused">
506
+ <label for="focusedInput2">Focus state</label>
507
+ <input class="form-control" id="focusedInput2" type="text"
508
+ value="Demonstrative focus state">
509
+ </div>
510
+ <div class="form-group focused">
511
+ <label for="focusedTextarea">Comment</label>
512
+ <textarea class="form-control" id="focusedTextarea" rows="5">
513
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
514
+ </textarea>
515
+ </div>
516
+ ~~~
517
+
518
+ <div class="bs-callout bs-callout-info">
519
+ <h4>Demo <code>:focus</code> state</h4>
520
+ <p>The above example forces the <code>focused</code> class normally set by javascript on the <code>.form-group</code> parent to demonstrate the <code>:focus</code> state on a <code>.form-group .form-control</code>.</p>
521
+ </div>
522
+
523
+ ## Filled state
524
+
525
+ <div class="example">
526
+ <form>
527
+ <div class="form-group filled">
528
+ <label for="filledInput">Filled state</label>
529
+ <input class="form-control" id="filledInput" type="text"
530
+ value="Demonstrative filled state">
531
+ </div>
532
+ <div class="form-group filled">
533
+ <label for="filledTextarea">Comment</label>
534
+ <textarea class="form-control" id="filledTextarea" rows="5">
535
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
536
+ </textarea>
537
+ </div>
538
+ </form>
539
+ </div>
540
+
541
+ ~~~ html
542
+ <div class="form-group filled">
543
+ <label for="filledInput">Filled state</label>
544
+ <input class="form-control" id="filledInput" type="text"
545
+ value="Demonstrative filled state">
546
+ </div>
547
+ <div class="form-group filled">
548
+ <label for="filledTextarea">Comment</label>
549
+ <textarea class="form-control" id="filledTextarea" rows="5">
550
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
551
+ </textarea>
552
+ </div>
553
+ ~~~
554
+
555
+ <div class="bs-callout bs-callout-info" id="callout-filled-demo">
556
+ <h4>Demo filled state</h4>
557
+ <p>The above example forces the <code>filled</code> class normally set by javascript on the <code>.form-froup</code> parent to demonstrate the filled state on a <code>.form-group .form-control</code>.</p>
558
+ </div>
559
+
560
+ ## Disabled state
561
+
562
+ Add the `disabled` boolean attribute on an input to prevent user interactions. Disabled inputs appear lighter and add a `not-allowed` cursor.
563
+
564
+ <div class="example">
565
+ <form>
566
+ <div class="form-group">
567
+ <label for="disabledInput">Disabled state</label>
568
+ <input class="form-control" id="disabledInput" type="text"
569
+ value="Disabled input here…" disabled>
570
+ </div>
571
+ <div class="form-group">
572
+ <label for="disabledEmptyInput">Disabled state on empty input</label>
573
+ <input class="form-control" id="disabledEmptyInput" type="text" disabled>
574
+ </div>
575
+ <div class="form-group">
576
+ <label for="disabledTextarea">Disabled comment</label>
577
+ <textarea class="form-control" id="disabledTextarea" rows="5" disabled>
578
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
579
+ </textarea>
580
+ </div>
581
+ <div class="form-group">
582
+ <label for="disabledEmptyTextarea">Disabled comment on empty textarea</label>
583
+ <textarea class="form-control" id="disabledEmptyTextarea" rows="5" disabled ></textarea>
584
+ </div>
585
+ <div class="form-group">
586
+ <label for="disabledSelect">Disabled select menu</label>
587
+ <select id="disabledSelect" class="form-control" disabled>
588
+ <option>Disabled select</option>
589
+ </select>
590
+ </div>
591
+ <div class="checkbox">
592
+ <label>
593
+ <input type="checkbox" disabled> Can't check this
594
+ </label>
595
+ </div>
596
+ </form>
597
+ </div>
598
+
599
+ ~~~ html
600
+ <div class="form-group">
601
+ <label for="disabledInput">Disabled state</label>
602
+ <input class="form-control" id="disabledInput" type="text"
603
+ value="Disabled input here…" disabled>
604
+ </div>
605
+ <div class="form-group">
606
+ <label for="disabledEmptyInput">Disabled state on empty input</label>
607
+ <input class="form-control" id="disabledEmptyInput" type="text" disabled>
608
+ </div>
609
+ <div class="form-group">
610
+ <label for="disabledTextarea">Disabled comment</label>
611
+ <textarea class="form-control" id="disabledTextarea" rows="5" disabled>
612
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
613
+ </textarea>
614
+ </div>
615
+ <div class="form-group">
616
+ <label for="disabledEmptyTextarea">Disabled comment on empty textarea</label>
617
+ <textarea class="form-control" id="disabledEmptyTextarea" rows="5" disabled></textarea>
618
+ </div>
619
+ <div class="form-group">
620
+ <label for="disabledSelect">Disabled select menu</label>
621
+ <select id="disabledSelect" class="form-control" disabled>
622
+ <option>Disabled select</option>
623
+ </select>
624
+ </div>
625
+ <div class="checkbox">
626
+ <label>
627
+ <input type="checkbox" disabled> Can't check this
628
+ </label>
629
+ </div>
630
+ ~~~
631
+
632
+ ### Disabled fieldsets
633
+
634
+ Add the `disabled` attribute to a `<fieldset>` to disable all the controls within the `<fieldset>` at once.
635
+
636
+ <div class="bs-callout bs-callout-warning">
637
+ <h4>Caveat about link functionality of <code>&lt;a&gt;</code></h4>
638
+ <p>By default, browsers will treat all native form controls (<code>&lt;input&gt;</code>, <code>&lt;select&gt;</code> and `<code>&lt;button&gt;</code>` elements) inside a <code>&lt;fieldset disabled&gt;</code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code>&lt;a ... class="btn btn-*"&gt;</code> elements, these will only be given a style of `pointer-events: none`. As noted in the section about <a href="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
639
+ </div>
640
+
641
+ <div class="bs-callout bs-callout-danger">
642
+ <h4>Cross-browser compatibility</h4>
643
+ <p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code>&lt;fieldset&gt;</code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
644
+ </div>
645
+
646
+ <div class="example">
647
+ <form>
648
+ <fieldset disabled>
649
+ <div class="form-group">
650
+ <label for="disabledInputFromFieldset">Disabled state</label>
651
+ <input class="form-control" id="disabledInputFromFieldset" type="text" value="Disabled input here…">
652
+ </div>
653
+ <div class="form-group">
654
+ <label for="disabledEmptyInputFromFieldset">Disabled state on empty input</label>
655
+ <input class="form-control" id="disabledEmptyInputFromFieldset" type="text">
656
+ </div>
657
+ <div class="form-group">
658
+ <label for="disabledTextareaFromFieldset">Disabled comment</label>
659
+ <textarea class="form-control" id="disabledTextareaFromFieldset" rows="5">
660
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
661
+ </textarea>
662
+ </div>
663
+ <div class="form-group">
664
+ <label for="disabledEmptyTextareaFromFieldset">Disabled comment on empty textarea</label>
665
+ <textarea class="form-control" id="disabledEmptyTextareaFromFieldset"
666
+ rows="5" disabled></textarea>
667
+ </div>
668
+ <div class="form-group">
669
+ <label for="disabledSelectFromFieldset">Disabled select menu</label>
670
+ <select id="disabledSelectFromFieldset" class="form-control">
671
+ <option>Disabled select</option>
672
+ </select>
673
+ </div>
674
+ <div class="checkbox">
675
+ <label>
676
+ <input type="checkbox"> Can't check this
677
+ </label>
678
+ </div>
679
+ <button type="submit" class="btn btn-primary">Submit</button>
680
+ </fieldset>
681
+ </form>
682
+ </div>
683
+
684
+ ~~~ html
685
+ <form>
686
+ <fieldset disabled>
687
+ <div class="form-group">
688
+ <label for="disabledInputFromFieldset">Disabled state</label>
689
+ <input class="form-control" id="disabledInputFromFieldset" type="text"
690
+ value="Disabled input here…">
691
+ </div>
692
+ <div class="form-group">
693
+ <label for="disabledEmptyInputFromFieldset">Disabled state on empty input</label>
694
+ <input class="form-control" id="disabledEmptyInputFromFieldset" type="text">
695
+ </div>
696
+ <div class="form-group">
697
+ <label for="disabledTextareaFromFieldset">Disabled comment</label>
698
+ <textarea class="form-control" id="disabledTextareaFromFieldset" rows="5">
699
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
700
+ </textarea>
701
+ </div>
702
+ <div class="form-group">
703
+ <label for="disabledEmptyTextareaFromFieldset">Disabled comment on empty textarea</label>
704
+ <textarea class="form-control" id="disabledEmptyTextareaFromFieldset" rows="5" disabled></textarea>
705
+ </div>
706
+ <div class="form-group">
707
+ <label for="disabledSelectFromFieldset">Disabled select menu</label>
708
+ <select id="disabledSelectFromFieldset" class="form-control">
709
+ <option>Disabled select</option>
710
+ </select>
711
+ </div>
712
+ <div class="checkbox">
713
+ <label>
714
+ <input type="checkbox"> Can't check this
715
+ </label>
716
+ </div>
717
+ <button type="submit" class="btn btn-primary">Submit</button>
718
+ </fieldset>
719
+ </form>
720
+ ~~~
721
+
722
+ ## Readonly state
723
+
724
+ Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.
725
+
726
+ <div class="example">
727
+ <form>
728
+ <div class="form-group">
729
+ <label for="readonlyInput">Readonly state</label>
730
+ <input class="form-control" id="readonlyInput" type="text"
731
+ value="Readonly input here…" readonly>
732
+ </div>
733
+ <div class="form-group">
734
+ <label for="readonlyEmptyInput">Readonly state on empty input</label>
735
+ <input class="form-control" id="readonlyEmptyInput" type="text" readonly>
736
+ </div>
737
+ <div class="form-group">
738
+ <label for="readonlyTextarea">Readonly comment</label>
739
+ <textarea class="form-control" id="readonlyTextarea" rows="5" readonly>
740
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
741
+ </textarea>
742
+ </div>
743
+ <div class="form-group">
744
+ <label for="readonlyEmptyTextarea">Readonly comment on empty textarea</label>
745
+ <textarea class="form-control" id="readonlyEmptyTextarea" rows="5" readonly></textarea>
746
+ </div>
747
+ </form>
748
+ </div>
749
+
750
+ ~~~ html
751
+ <div class="form-group">
752
+ <label for="readonlyInput">Readonly state</label>
753
+ <input class="form-control" id="readonlyInput" type="text"
754
+ value="Readonly input here…" readonly>
755
+ </div>
756
+ <div class="form-group">
757
+ <label for="readonlyEmptyInput">Readonly state on empty input</label>
758
+ <input class="form-control" id="readonlyEmptyInput" type="text" readonly>
759
+ </div>
760
+ <div class="form-group">
761
+ <label for="readonlyTextarea">Readonly comment</label>
762
+ <textarea class="form-control" id="readonlyTextarea" rows="5" readonly>
763
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a blandit quam, at aliquam eros. Ut faucibus odio justo, maximus facilisis ante tempus et. Suspendisse quis mauris id metus fermentum lacinia at id magna. Phasellus ullamcorper risus nunc, et efficitur enim efficitur varius. Sed auctor cursus arcu, vel ullamcorper purus bibendum non. Integer elementum, lacus sed ullamcorper vehicula, urna ipsum tristique nulla, eu vulputate libero risus eget lorem. Fusce sollicitudin justo arcu, sit amet pulvinar mauris faucibus vel. Fusce lectus enim, auctor ac ex ut, egestas tempor ipsum. Donec ligula tellus, tempor sit amet tellus quis, euismod elementum risus. Nullam tincidunt lectus non augue iaculis pellentesque. Vivamus eu sem et arcu varius aliquam. Nulla non ante sit amet magna blandit sagittis. Cras eleifend ex eget volutpat tristique.
764
+ </textarea>
765
+ </div>
766
+ <div class="form-group">
767
+ <label for="readonlyEmptyTextarea">Readonly comment on empty textarea</label>
768
+ <textarea class="form-control" id="readonlyEmptyTextarea" rows="5" readonly></textarea>
769
+ </div>
770
+ ~~~
771
+
772
+
773
+ ## Help text
774
+
775
+ Block level help text for form controls.
776
+
777
+ <div class="bs-callout bs-callout-info">
778
+ <h4>Associating help text with form controls</h4>
779
+ <p>Help text should be explicitly associated with the form control it relates to using the <code>aria-describedby</code> attribute. This will ensure that assistive technologies – such as screen readers – will announce this help text when the user focuses or enters the control.</p>
780
+ </div>
781
+
782
+ <div class="example">
783
+ <form>
784
+ <div class="form-group">
785
+ <label for="inputHelpBlock">Input with help text</label>
786
+ <input type="text" id="inputHelpBlock" class="form-control" aria-describedby="helpBlock">
787
+ </div>
788
+ <span id="helpBlock" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
789
+ </form>
790
+ </div>
791
+
792
+ ~~~ html
793
+ <label for="inputHelpBlock">Input with help text</label>
794
+ <input type="text" id="inputHelpBlock" class="form-control" aria-describedby="helpBlock">
795
+ ...
796
+ <span id="helpBlock" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
797
+ ~~~
798
+
799
+ ## Validation states
800
+
801
+ Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles.
802
+
803
+ <div class="bs-callout bs-callout-warning">
804
+ <h4>Conveying validation state to assistive technologies and colorblind users</h4>
805
+ <p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p>
806
+ <p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code>&lt;label&gt;</code> text itself (as is the case in the following code example), include a <a href="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <a href="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <a href="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
807
+ </div>
808
+
809
+ <div class="example">
810
+ <form>
811
+ <div class="form-group has-success">
812
+ <label class="control-label" for="inputSuccess1">Input with success</label>
813
+ <input type="text" class="form-control" id="inputSuccess1" aria-describedby ="helpBlock2">
814
+ <span id="helpBlock2" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
815
+ </div>
816
+ <div class="form-group has-warning">
817
+ <label class="control-label" for="inputWarning1">Input with warning</label>
818
+ <input type="text" class="form-control" id="inputWarning1">
819
+ </div>
820
+ <div class="form-group has-error">
821
+ <label class="control-label" for="inputError1">Input with error</label>
822
+ <input type="text" class="form-control" id="inputError1">
823
+ </div>
824
+ <div class="has-success">
825
+ <div class="checkbox">
826
+ <label>
827
+ <input type="checkbox" id="checkboxSuccess" value="option1">
828
+ Checkbox with success
829
+ </label>
830
+ </div>
831
+ </div>
832
+ <div class="has-warning">
833
+ <div class="checkbox">
834
+ <label>
835
+ <input type="checkbox" id="checkboxWarning" value="option1">
836
+ Checkbox with warning
837
+ </label>
838
+ </div>
839
+ </div>
840
+ <div class="has-error">
841
+ <div class="checkbox">
842
+ <label>
843
+ <input type="checkbox" id="checkboxError" value="option1">
844
+ Checkbox with error
845
+ </label>
846
+ </div>
847
+ </div>
848
+ </form>
849
+ </div>
850
+
851
+ ~~~ html
852
+ <div class="form-group has-success">
853
+ <label class="control-label" for="inputSuccess1">Input with success</label>
854
+ <input type="text" class="form-control" id="inputSuccess1" aria-describedby="helpBlock2">
855
+ <span id="helpBlock2" class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
856
+ </div>
857
+ <div class="form-group has-warning">
858
+ <label class="control-label" for="inputWarning1">Input with warning</label>
859
+ <input type="text" class="form-control" id="inputWarning1">
860
+ </div>
861
+ <div class="form-group has-error">
862
+ <label class="control-label" for="inputError1">Input with error</label>
863
+ <input type="text" class="form-control" id="inputError1">
864
+ </div>
865
+ <div class="has-success">
866
+ <div class="checkbox">
867
+ <label>
868
+ <input type="checkbox" id="checkboxSuccess" value="option1">
869
+ Checkbox with success
870
+ </label>
871
+ </div>
872
+ </div>
873
+ <div class="has-warning">
874
+ <div class="checkbox">
875
+ <label>
876
+ <input type="checkbox" id="checkboxWarning" value="option1">
877
+ Checkbox with warning
878
+ </label>
879
+ </div>
880
+ </div>
881
+ <div class="has-error">
882
+ <div class="checkbox">
883
+ <label>
884
+ <input type="checkbox" id="checkboxError" value="option1">
885
+ Checkbox with error
886
+ </label>
887
+ </div>
888
+ </div>
889
+ ~~~
890
+
891
+ ### With optional icons
892
+
893
+ You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
894
+
895
+ <p><strong class="text-danger">Feedback icons only work with textual <code>&lt;input class="form-control"&gt;</code>`<input class="form-control"> elements.</strong></p>
896
+
897
+ <div class="bs-callout bs-callout-warning">
898
+ <h4>Icons, labels, and input groups</h4>
899
+ <p>Manual positioning of feedback icons is required for inputs without a label and for <a href="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the <code>.sr-only</code> class. If you must do without labels, adjust the <code>top</code> value of the feedback icon. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p>
900
+ </div>
901
+ <div class="bs-callout bs-callout-warning">
902
+ <h4>Conveying the icon's meaning to assistive technologies</h4>
903
+ <p>To ensure that assistive technologies – such as screen readers – correctly convey the meaning of an icon, additional hidden text should be included with the <code>.sr-only</code> class and explicitly associated with the form control it relates to using <code>aria-describedby</code>. Alternatively, ensure that the meaning (for instance, the fact that there is a warning for a particular text entry field) is conveyed in some other form, such as changing the text of the actual <code>&lt;label&gt;</code> associated with the form control.</p>
904
+ <p>Although the following examples already mention the validation state of their respective form controls in the <code>&lt;label&gt;</code> text itself, the above technique (using <code>.sr-only</code> text and <code>aria-describedby</code>) has been included for illustrative purposes.</p>
905
+ </div>
906
+
907
+ <div class="example">
908
+ <form>
909
+ <div class="form-group has-success has-feedback">
910
+ <label class="control-label" for="inputSuccess2">Input with success</label>
911
+ <input type="text" class="form-control" id="inputSuccess2" aria-describedby ="inputSuccess2Status">
912
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden=" true"></span>
913
+ <span id="inputSuccess2Status" class="sr-only">(success)</span>
914
+ </div>
915
+ <div class="form-group has-warning has-feedback">
916
+ <label class="control-label" for="inputWarning2">Input with warning</label>
917
+ <input type="text" class="form-control" id="inputWarning2" aria-describedby="inputWarning2Status">
918
+ <span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"></span>
919
+ <span id="inputWarning2Status" class="sr-only">(warning)</span>
920
+ </div>
921
+ <div class="form-group has-error has-feedback">
922
+ <label class="control-label" for="inputError2">Input with error</label>
923
+ <input type="text" class="form-control" id="inputError2" aria-describedby="inputError2Status">
924
+ <span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>
925
+ <span id="inputError2Status" class="sr-only">(error)</span>
926
+ </div>
927
+ <div class="form-group has-success has-feedback">
928
+ <div class="input-group">
929
+ <span class="input-group-addon">@</span>
930
+ <label class="control-label" for="inputGroupSuccess1">Input group with success</label>
931
+ <input type="text" class="form-control" id="inputGroupSuccess1" aria-describedby="inputGroupSuccess1Status">
932
+ </div>
933
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
934
+ <span id="inputGroupSuccess1Status" class="sr-only">(success)</span>
935
+ </div>
936
+ </form>
937
+ </div>
938
+
939
+ ~~~ html
940
+ <div class="form-group has-success has-feedback">
941
+ <label class="control-label" for="inputSuccess2">Input with success</label>
942
+ <input type="text" class="form-control" id="inputSuccess2" aria-describedby="inputSuccess2Status">
943
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
944
+ <span id="inputSuccess2Status" class="sr-only">(success)</span>
945
+ </div>
946
+ <div class="form-group has-warning has-feedback">
947
+ <label class="control-label" for="inputWarning2">Input with warning</label>
948
+ <input type="text" class="form-control" id="inputWarning2" aria-describedby="inputWarning2Status">
949
+ <span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"></span>
950
+ <span id="inputWarning2Status" class="sr-only">(warning)</span>
951
+ </div>
952
+ <div class="form-group has-error has-feedback">
953
+ <label class="control-label" for="inputError2">Input with error</label>
954
+ <input type="text" class="form-control" id="inputError2" aria-describedby="inputError2Status">
955
+ <span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>
956
+ <span id="inputError2Status" class="sr-only">(error)</span>
957
+ </div>
958
+ <div class="form-group has-success has-feedback">
959
+ <div class="input-group">
960
+ <span class="input-group-addon">@</span>
961
+ <label class="control-label" for="inputGroupSuccess1">Input group with success</label>
962
+ <input type="text" class="form-control" id="inputGroupSuccess1" aria-describedby="inputGroupSuccess1Status">
963
+ </div>
964
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
965
+ <span id="inputGroupSuccess1Status" class="sr-only">(success)</span>
966
+ </div>
967
+ ~~~
968
+
969
+ #### Optional icons in horizontal and inline forms
970
+
971
+ <div class="bs-callout bs-callout-info">
972
+ <h4>Not Recommended</h4>
973
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
974
+ </div>
975
+
976
+ <div class="example">
977
+ <form class="form-inline">
978
+ <div class="form-group has-success has-feedback">
979
+ <label class="control-label" for="inputSuccess4">Input with success</label>
980
+ <input type="text" class="form-control" id="inputSuccess4" aria-describedby="inputSuccess4Status">
981
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden=" true"></span>
982
+ <span id="inputSuccess4Status" class="sr-only">(success)</span>
983
+ </div>
984
+ </form>
985
+ <br>
986
+ <form class="form-inline">
987
+ <div class="form-group has-success has-feedback">
988
+ <div class="input-group">
989
+ <span class="input-group-addon">@</span>
990
+ <label class="control-label" for="inputGroupSuccess3">Input group with success</label>
991
+ <input type="text" class="form-control" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status">
992
+ </div>
993
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
994
+ <span id="inputGroupSuccess3Status" class="sr-only">(success)</span>
995
+ </div>
996
+ </form>
997
+ </div>
998
+
999
+ ~~~ html
1000
+ <form class="form-inline">
1001
+ <div class="form-group has-success has-feedback">
1002
+ <label class="control-label" for="inputSuccess4">Input with success</label>
1003
+ <input type="text" class="form-control" id="inputSuccess4" aria-describedby="inputSuccess4Status">
1004
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1005
+ <span id="inputSuccess4Status" class="sr-only">(success)</span>
1006
+ </div>
1007
+ </form>
1008
+ <form class="form-inline">
1009
+ <div class="form-group has-success has-feedback">
1010
+ <div class="input-group">
1011
+ <span class="input-group-addon">@</span>
1012
+ <label class="control-label" for="inputGroupSuccess3">Input group with success</label>
1013
+ <input type="text" class="form-control" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status">
1014
+ </div>
1015
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1016
+ <span id="inputGroupSuccess3Status" class="sr-only">(success)</span>
1017
+ </div>
1018
+ </form>
1019
+ ~~~
1020
+
1021
+ #### Optional icons with hidden `.sr-only` labels
1022
+
1023
+ If you use the `.sr-only` class to hide a form control's `<label>` (rather than using other labelling options, such as the `aria-label` attribute), Bootstrap will automatically adjust the position of the icon once it's been added.
1024
+
1025
+ <div class="example">
1026
+ <div class="form-group has-success has-feedback">
1027
+ <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
1028
+ <input type="text" class="form-control" id="inputSuccess5" aria-describedby=" inputSuccess5Status" placeholder="Placeholder">
1029
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ></span>
1030
+ <span id="inputSuccess5Status" class="sr-only">(success)</span>
1031
+ </div>
1032
+ <div class="form-group has-success has-feedback">
1033
+ <label class="control-label sr-only" for="inputGroupSuccess4">Input group with success</label>
1034
+ <div class="input-group">
1035
+ <span class="input-group-addon">@</span>
1036
+ <input type="text" class="form-control" id="inputGroupSuccess4" aria-describedby="inputGroupSuccess4Status" placeholder="Placeholder">
1037
+ </div>
1038
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1039
+ <span id="inputGroupSuccess4Status" class="sr-only">(success)</span>
1040
+ </div>
1041
+ </div>
1042
+
1043
+ ~~~ html
1044
+ <div class="form-group has-success has-feedback">
1045
+ <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
1046
+ <input type="text" class="form-control" id="inputSuccess5" aria-describedby="inputSuccess5Status">
1047
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1048
+ <span id="inputSuccess5Status" class="sr-only">(success)</span>
1049
+ </div>
1050
+ <div class="form-group has-success has-feedback">
1051
+ <label class="control-label sr-only" for="inputGroupSuccess4">Input group with success</label>
1052
+ <div class="input-group">
1053
+ <span class="input-group-addon">@</span>
1054
+ <input type="text" class="form-control" id="inputGroupSuccess4" aria-describedby="inputGroupSuccess4Status">
1055
+ </div>
1056
+ <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
1057
+ <span id="inputGroupSuccess4Status" class="sr-only">(success)</span>
1058
+ </div>
1059
+ ~~~
1060
+
1061
+ ## Control sizing
1062
+
1063
+ Set heights using classes like `.input-lg`, and set widths using grid column classes like `.col-lg-*`.
1064
+
1065
+ ### Height sizing
1066
+
1067
+ Create taller or shorter form controls that match button sizes.
1068
+
1069
+ <div class="example">
1070
+ <form>
1071
+ <div class="controls">
1072
+ <input class="form-control input-lg" type="text" placeholder=".input-lg">
1073
+ <input type="text" class="form-control" placeholder="Default input">
1074
+ <input class="form-control input-sm" type="text" placeholder=".input-sm">
1075
+
1076
+ <select class="form-control input-lg">
1077
+ <option value="">.input-lg</option>
1078
+ </select>
1079
+ <select class="form-control">
1080
+ <option value="">Default select</option>
1081
+ </select>
1082
+ <select class="form-control input-sm">
1083
+ <option value="">.input-sm</option>
1084
+ </select>
1085
+ </div>
1086
+ </form>
1087
+ </div>
1088
+
1089
+ ~~~ html
1090
+ <input class="form-control input-lg" type="text" placeholder=".input-lg">
1091
+ <input class="form-control" type="text" placeholder="Default input">
1092
+ <input class="form-control input-sm" type="text" placeholder=".input-sm">
1093
+
1094
+ <select class="form-control input-lg">...</select>
1095
+ <select class="form-control">...</select>
1096
+ <select class="form-control input-sm">...</select>
1097
+ ~~~
1098
+
1099
+ ### Horizontal form group sizes
1100
+
1101
+ <div class="bs-callout bs-callout-info">
1102
+ <h4>Not Recommended</h4>
1103
+ <p>BookingSync UI Kit does not recommend using horizontal forms.</p>
1104
+ </div>
1105
+
1106
+ ### Column sizing
1107
+
1108
+ Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.
1109
+
1110
+ <div class="example">
1111
+ <form>
1112
+ <div class="row">
1113
+ <div class="col-xs-2">
1114
+ <input type="text" class="form-control" placeholder=".col-xs-2">
1115
+ </div>
1116
+ <div class="col-xs-3">
1117
+ <input type="text" class="form-control" placeholder=".col-xs-3">
1118
+ </div>
1119
+ <div class="col-xs-4">
1120
+ <input type="text" class="form-control" placeholder=".col-xs-4">
1121
+ </div>
1122
+ </div>
1123
+ </form>
1124
+ </div>
1125
+
1126
+ ~~~ html
1127
+ <div class="row">
1128
+ <div class="col-xs-2">
1129
+ <input type="text" class="form-control" placeholder=".col-xs-2">
1130
+ </div>
1131
+ <div class="col-xs-3">
1132
+ <input type="text" class="form-control" placeholder=".col-xs-3">
1133
+ </div>
1134
+ <div class="col-xs-4">
1135
+ <input type="text" class="form-control" placeholder=".col-xs-4">
1136
+ </div>
1137
+ </div>
1138
+ ~~~