0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Merge pull request #14191 from twbs/autocomplete-off-btns

Use autocomplete="off" in buttons plugin docs examples
This commit is contained in:
Chris Rebert 2014-07-23 17:55:12 -07:00
commit 4a98e2d765
2 changed files with 15 additions and 14 deletions

View File

@ -340,7 +340,8 @@ module.exports = function (grunt) {
reset: true,
relaxerror: [
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
'Element img is missing required attribute src.'
'Element img is missing required attribute src.',
'Attribute autocomplete not allowed on element input at this point.'
]
},
files: {

View File

@ -44,26 +44,26 @@
<div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="checkbox" checked> Option 1 (pre-checked)
<input type="checkbox" autocomplete="off" checked> Option 1 (pre-checked)
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 2
<input type="checkbox" autocomplete="off"> Option 2
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 3
<input type="checkbox" autocomplete="off"> Option 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="checkbox" checked> Option 1 (pre-checked)
<input type="checkbox" autocomplete="off" checked> Option 1 (pre-checked)
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 2
<input type="checkbox" autocomplete="off"> Option 2
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 3
<input type="checkbox" autocomplete="off"> Option 3
</label>
</div>
{% endhighlight %}
@ -77,26 +77,26 @@
<div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" checked> Option 1 (preselected)
<input type="radio" name="options" id="option1" autocomplete="off" checked> Option 1 (preselected)
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
<input type="radio" name="options" id="option2" autocomplete="off"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
<input type="radio" name="options" id="option3" autocomplete="off"> Option 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" checked> Option 1 (preselected)
<input type="radio" name="options" id="option1" autocomplete="off" checked> Option 1 (preselected)
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
<input type="radio" name="options" id="option2" autocomplete="off"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
<input type="radio" name="options" id="option3" autocomplete="off"> Option 3
</label>
</div>
{% endhighlight %}
@ -144,7 +144,7 @@ $('.btn').button()
<div class="bs-callout bs-callout-danger">
<h4>Cross-browser compatibility</h4>
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
</div>
<h4>$().button('reset')</h4>