]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #12697: Document readonly inputs
authorMark Otto <otto@github.com>
Tue, 4 Mar 2014 23:16:38 +0000 (15:16 -0800)
committerMark Otto <otto@github.com>
Tue, 4 Mar 2014 23:16:38 +0000 (15:16 -0800)
docs/_includes/nav-css.html
docs/css.html

index bd2112b30f31d1827a398c083171918fa45c8b59..1ff3fe804d200e06f315b8f06fedd44b573cd5ce 100644 (file)
@@ -67,6 +67,7 @@
     <li><a href="#forms-controls-static">Static control</a></li>
     <li><a href="#forms-control-focus">Focus state</a></li>
     <li><a href="#forms-control-disabled">Disabled state</a></li>
+    <li><a href="#forms-control-readonly">Readonly state</a></li>
     <li><a href="#forms-control-validation">Validation states</a></li>
     <li><a href="#forms-control-sizes">Control sizing</a></li>
     <li><a href="#forms-help-text">Help text</a></li>
index 614b7405020247a9af4de77988f927536211d83e..9af1eeffc406330a446f616c6a4be6046d6c7fd2 100644 (file)
@@ -1878,7 +1878,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
 
 
   <h2 id="forms-control-disabled">Disabled inputs</h2>
-  <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
+  <p>Add the <code>disabled</code> boolean attribute on an input to prevent user input and trigger a slightly different look.</p>
   <div class="bs-example">
     <form role="form">
       <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
@@ -1947,6 +1947,18 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
 {% endhighlight %}
 
 
+  <h2 id="forms-control-readonly">Readonly inputs</h2>
+  <p>Add the <code>readonly</code> boolean attribute on an input to prevent user input and style the input as disabled.</p>
+  <div class="bs-example">
+    <form role="form">
+      <input class="form-control" type="text" placeholder="Readonly input here…" readonly>
+    </form>
+  </div><!-- /.bs-example -->
+{% highlight html %}
+<input class="form-control" type="text" placeholder="Readonly input here…" readonly>
+{% endhighlight %}
+
+
   <h2 id="forms-control-validation">Validation states</h2>
   <p>Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and <code>.help-block</code> within that element will receive the validation styles.</p>