causeway-standard-theme
Version:
184 lines (182 loc) • 5.54 kB
HTML
<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><input></code> tag, and classes should follow on from the surrounding <code><div></code> and <code><label></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>
<div class="form-group tristate">
<input type="hidden" class="value" value="<!-- Input value goes here -->">
<input type="hidden" class="altvalue" value="<!-- Input alternate value goes here -->">
<input type="checkbox" class="form-control" id="<!-- Input control ID goes here -->" name="<!-- Input control name goes here -->" value="<!-- Input selected value goes here -->">
<label for="<!-- Input control ID goes here -->">
<span class="checkbox-icon"></span>
Tristate
</label>
</div>
</code>
</pre>
</div>