1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-28 23:59:53 +02:00

fix forms examples and allow for inputs in labels

This commit is contained in:
Mark Otto
2012-01-25 21:28:24 -08:00
parent b6b19866ac
commit 94ea3b62f0
5 changed files with 126 additions and 103 deletions

View File

@@ -939,63 +939,65 @@
<div class="row">
<div class="span8">
<form class="form-horizontal">
<legend>Controls Bootstrap supports</legend>
<div class="control-group">
<label class="control-label" for="input01">Text input</label>
<div class="controls">
<input type="text" class="xlarge" name="input01">
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
<fieldset>
<legend>Controls Bootstrap supports</legend>
<div class="control-group">
<label class="control-label" for="input01">Text input</label>
<div class="controls">
<input type="text" class="xlarge" name="input01">
<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="optionsCheckbox">Checkbox</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="optionsCheckbox" value="option1">
Option one is this and that&mdash;be sure to include why its great
</label>
<div class="control-group">
<label class="control-label" for="optionsCheckbox">Checkbox</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="optionsCheckbox" value="option1">
Option one is this and that&mdash;be sure to include why its great
</label>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="select01">Select list</label>
<div class="controls">
<select name="select01">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<div class="control-group">
<label class="control-label" for="select01">Select list</label>
<div class="controls">
<select name="select01">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="multiSelect">Multi-select</label>
<div class="controls">
<select multiple="multiple" name="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<div class="control-group">
<label class="control-label" for="multiSelect">Multi-select</label>
<div class="controls">
<select multiple="multiple" name="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">File input</label>
<div class="controls">
<input class="input-file" id="fileInput" name="fileInput" type="file">
<div class="control-group">
<label class="control-label" for="fileInput">File input</label>
<div class="controls">
<input class="input-file" id="fileInput" name="fileInput" type="file">
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="textarea">Textarea</label>
<div class="controls">
<textarea class="input-xlarge" name="textarea" id="textarea" rows="3"></textarea>
<div class="control-group">
<label class="control-label" for="textarea">Textarea</label>
<div class="controls">
<textarea class="input-xlarge" name="textarea" id="textarea" rows="3"></textarea>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn primary">Save changes</button>
<button type="reset" class="btn">Cancel</button>
</div>
<div class="form-actions">
<button type="submit" class="btn primary">Save changes</button>
<button type="reset" class="btn">Cancel</button>
</div>
</fieldset>
</form>
</div>
<div class="span4">

View File

@@ -875,63 +875,65 @@
<div class="row">
<div class="span8">
<form class="form-horizontal">
<legend>{{_i}}Controls Bootstrap supports{{/i}}</legend>
<div class="control-group">
<label class="control-label" for="input01">{{_i}}Text input{{/i}}</label>
<div class="controls">
<input type="text" class="xlarge" name="input01">
<p class="help-block">{{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}</p>
<fieldset>
<legend>{{_i}}Controls Bootstrap supports{{/i}}</legend>
<div class="control-group">
<label class="control-label" for="input01">{{_i}}Text input{{/i}}</label>
<div class="controls">
<input type="text" class="xlarge" name="input01">
<p class="help-block">{{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}</p>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="optionsCheckbox">{{_i}}Checkbox{{/i}}</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="optionsCheckbox" value="option1">
{{_i}}Option one is this and that&mdash;be sure to include why its great{{/i}}
</label>
<div class="control-group">
<label class="control-label" for="optionsCheckbox">{{_i}}Checkbox{{/i}}</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="optionsCheckbox" value="option1">
{{_i}}Option one is this and that&mdash;be sure to include why its great{{/i}}
</label>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="select01">{{_i}}Select list{{/i}}</label>
<div class="controls">
<select name="select01">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<div class="control-group">
<label class="control-label" for="select01">{{_i}}Select list{{/i}}</label>
<div class="controls">
<select name="select01">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="multiSelect">{{_i}}Multi-select{{/i}}</label>
<div class="controls">
<select multiple="multiple" name="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<div class="control-group">
<label class="control-label" for="multiSelect">{{_i}}Multi-select{{/i}}</label>
<div class="controls">
<select multiple="multiple" name="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">{{_i}}File input{{/i}}</label>
<div class="controls">
<input class="input-file" id="fileInput" name="fileInput" type="file">
<div class="control-group">
<label class="control-label" for="fileInput">{{_i}}File input{{/i}}</label>
<div class="controls">
<input class="input-file" id="fileInput" name="fileInput" type="file">
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="textarea">{{_i}}Textarea{{/i}}</label>
<div class="controls">
<textarea class="input-xlarge" name="textarea" id="textarea" rows="3"></textarea>
<div class="control-group">
<label class="control-label" for="textarea">{{_i}}Textarea{{/i}}</label>
<div class="controls">
<textarea class="input-xlarge" name="textarea" id="textarea" rows="3"></textarea>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn primary">{{_i}}Save changes{{/i}}</button>
<button type="reset" class="btn">{{_i}}Cancel{{/i}}</button>
</div>
<div class="form-actions">
<button type="submit" class="btn primary">{{_i}}Save changes{{/i}}</button>
<button type="reset" class="btn">{{_i}}Cancel{{/i}}</button>
</div>
</fieldset>
</form>
</div>
<div class="span4">