causeway-standard-theme
Version:
178 lines (169 loc) • 5.32 kB
HTML
<div>
<a id="forms-image"></a>
<header class="content-header">
<h1 class="title">
Image
</h1>
</header>
<p>
Image controls comprise of a surround and 4 styles, toggled by optional attributes and classes. The attribute should be added to the <code><button></code> tag, and classes should follow on from the surrounding <code><div></code>.
</p>
<p>
The control contains an <code><img></code> tag to display either a relevant placeholder or a preview of the currently uploaded file.
</p>
<p>
Currently, 2 placeholder images have been included, namely <code>image_placeholder.png</code> and <code>image_placeholderb.png</code>
</p>
<div class="table-wrapper">
<table class="table table-striped">
<thead>
<tr>
<th>
Style
</th>
<th>
Attribute
</th>
<th>
Value
</th>
<th>
Standard 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-row">
<div class="form-group image-input">
<input type="file" class="form-control file-input-image sr-only" id="image-field1a" name="image_field1a">
<div class="image-display-wrapper">
<img class="image-input-image" alt="" src="/images/image_placeholder.png" />
</div>
<label for="image-field1a" class="btn btn-icon btn-default btn-file-choose">
<span class="fa fa-search"></span>
</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 image-input disabled">
<input type="file" disabled="disabled" class="form-control file-input-image sr-only" id="image-field1b" name="image_field1b">
<div class="image-display-wrapper">
<img class="image-input-image" alt="" src="/images/image_placeholderb.png" />
</div>
<label for="image-field1b" class="btn btn-icon btn-default btn-file-choose" disabled="disabled">
<span class="fa fa-search"></span>
</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 image-input invalid">
<input type="file" class="form-control file-input-image sr-only" id="image-field1c" name="image_field1c">
<div class="image-display-wrapper">
<img class="image-input-image" alt="" src="/images/image_placeholder.png" />
</div>
<label for="image-field1c" class="btn btn-icon btn-default btn-file-choose">
<span class="fa fa-search"></span>
</label>
</div>
</div>
</form>
</td>
</tr>
<tr>
<td>
Read Only
</td>
<td>
class
<br/><br/>
readonly
</td>
<td>
readonly
<br/><br/>
readonly
</td>
<td>
<form role="form">
<div class="form-row">
<div class="form-group image-input form-group-last readonly">
<input type="file" class="form-control file-input-image sr-only" id="image-field1d" name="image_field1d">
<div class="image-display-wrapper">
<img class="image-input-image" alt="" src="/images/image_placeholder.png" />
</div>
</div>
</div>
</form>
</td>
</tr>
</tbody>
</table>
</div>
<pre>
<code>
<form role="form">
<div class="form-row">
<div class="form-group image-input">
<input type="file" class="form-control file-input-image sr-only" id="image-field1a" name="image_field1a">
<div class="image-display-wrapper">
<img class="image-input-image" alt="" src="images/image_placeholder.png" />
</div>
<label for="image-field1a" class="btn btn-icon btn-default btn-file-choose">
<span class="glyphicon glyphicon-search"></span>
</label>
</div>
</div>
</form>
</code>
</pre>
</div>