UNPKG

causeway-standard-theme

Version:

184 lines (182 loc) 5.54 kB
<div> <a id="forms-tristate"></a> <header class="content-header"> <h1 class="title"> Tristate </h1> </header> <p> Tristate controls comprise of a surround and 3 styles, toggled by optional attributes and classes. The attribute should be added to the <code>&lt;input&gt;</code> tag, and classes should follow on from the surrounding <code>&lt;div&gt;</code> and <code>&lt;label&gt;</code>. </p> <div class="table-wrapper"> <table class="table table-striped"> <thead> <tr> <th> Style </th> <th> Attribute </th> <th> Value </th> <th> Example </th> </tr> </thead> <tfoot> <tr> <td colspan="4"> </td> </tr> </tfoot> <tbody> <tr> <td> Standard </td> <td> </td> <td> </td> <td> <form role="form"> <div class="form-group"> <div class="tristate"> <input type="hidden" class="value" value="1"> <input type="hidden" class="altvalue" value="2"> <input type="checkbox" class="form-control" id="tristate-field1a" name="tristate_field1a" value="1"> <label for="tristate-field1a"> <span class="checkbox-icon"></span> Tristate </label> </div> </div> </form> </td> </tr> <tr> <td> Standard - Label First </td> <td> </td> <td> </td> <td> <form role="form"> <div class="form-group"> <div class="tristate"> <input type="hidden" class="value" value="1"> <input type="hidden" class="altvalue" value="2"> <input type="checkbox" class="form-control" id="tristate-field2a" name="tristate_field2a" value="1"> <label for="tristate-field2a"> <span class="checkbox-icon"></span> Tristate </label> </div> </div> </form> </td> </tr> <tr> <td> Standard - Alternate Value </td> <td> class </td> <td> altstate </td> <td> <form role="form"> <div class="form-row"> <div class="form-group tristate"> <input type="hidden" class="value" value="1"> <input type="hidden" class="altvalue" value="2"> <input type="checkbox" class="form-control" id="tristate-field1b" name="tristate_field1b" value="2"> <label for="tristate-field1b" class="altstate"> <span class="checkbox-icon"></span> Tristate </label> </div> </div> </form> </td> </tr> <tr> <td> Disabled </td> <td> class <br/><br/> disabled </td> <td> disabled <br/><br/> disabled </td> <td> <form role="form"> <div class="form-row"> <div class="form-group tristate disabled"> <input type="hidden" class="value" value="1"> <input type="hidden" class="altvalue" value="2"> <input type="checkbox" disabled="disabled" class="form-control" id="tristate-field1c" name="tristate_field1c" value="1"> <label for="tristate-field1c" class="disabled"> <span class="checkbox-icon"></span> Tristate </label> </div> </div> </form> </td> </tr> <tr> <td> Invalid </td> <td> class </td> <td> invalid </td> <td> <form role="form"> <div class="form-row"> <div class="form-group tristate invalid"> <input type="hidden" class="value" value="1"> <input type="hidden" class="altvalue" value="2"> <input type="checkbox" class="form-control" id="tristate-field1d" name="tristate_field1d" value="1"> <label for="tristate-field1d"> <span class="checkbox-icon"></span> Tristate </label> </div> </div> </form> </td> </tr> </tbody> </table> </div> <pre> <code> &lt;div class=&quot;form-group tristate&quot;&gt; &lt;input type=&quot;hidden&quot; class=&quot;value&quot; value=&quot;&lt;!-- Input value goes here --&gt;&quot;&gt; &lt;input type=&quot;hidden&quot; class=&quot;altvalue&quot; value=&quot;&lt;!-- Input alternate value goes here --&gt;&quot;&gt; &lt;input type=&quot;checkbox&quot; class=&quot;form-control&quot; id=&quot;&lt;!-- Input control ID goes here --&gt;&quot; name=&quot;&lt;!-- Input control name goes here --&gt;&quot; value=&quot;&lt;!-- Input selected value goes here --&gt;&quot;&gt; &lt;label for=&quot;&lt;!-- Input control ID goes here --&gt;&quot;&gt; &lt;span class=&quot;checkbox-icon&quot;&gt;&lt;/span&gt; Tristate &lt;/label&gt; &lt;/div&gt; </code> </pre> </div>