Skip to content

Commit 979d3a0

Browse files
committed
Docs: code example for file upload
1 parent 14585e5 commit 979d3a0

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

docs/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,38 @@ <h2 class="design-patterns-heading">Time fields</h2>
11911191
</div>
11921192
</div>
11931193

1194+
<h2 class="design-patterns-heading">File uploads</h2>
1195+
<p><strong>Code:</strong></p>
1196+
<pre dir="ltr"><code class="language-markup">&lt;div class="inline-file-uploader"&gt;
1197+
&lt;label for="file-upload"&gt;Upload file&lt;/label&gt;
1198+
&lt;input type="file" multiple&gt;
1199+
&lt;span class="inline-file-uploader-actions"&gt;
1200+
&lt;label for="file_example_category"&gt;Category&lt;/label&gt;
1201+
&lt;select id="file_example_category"&gt;
1202+
&lt;option value="" selected&gt;&nbsp;&lt;/option&gt;
1203+
&lt;option value="file-example-category"&gt;Example category&lt;/option&gt;
1204+
&lt;/select&gt;
1205+
&lt;/span&gt;
1206+
&lt;span class="inline-file-uploader-actions"&gt;
1207+
&lt;input type="submit" value="Upload"&gt;
1208+
&lt;/span&gt;
1209+
&lt;/div&gt;</code></pre>
1210+
<p><strong>Example:</strong></p>
1211+
<div class="inline-file-uploader">
1212+
<label for="file-upload">Upload file</label>
1213+
<input type="file" multiple>
1214+
<span class="inline-file-uploader-actions">
1215+
<label for="file_example_category">Category</label>
1216+
<select id="file_example_category">
1217+
<option value="" selected>&nbsp;</option>
1218+
<option value="file-example-category">Example category</option>
1219+
</select>
1220+
</span>
1221+
<span class="inline-file-uploader-actions">
1222+
<input type="submit" value="Upload">
1223+
</span>
1224+
</div>
1225+
11941226
<h2 class="design-patterns-heading">Checkboxes</h2>
11951227
<p><strong>Code:</strong></p>
11961228
<pre dir="ltr"><code class="language-markup">&lt;input type="checkbox" id="test_checkbox_1" name="test_checkbox_1"&gt;

docs/rtl.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,38 @@ <h2 class="design-patterns-heading">Time fields</h2>
11911191
</div>
11921192
</div>
11931193

1194+
<h2 class="design-patterns-heading">File uploads</h2>
1195+
<p><strong>Code:</strong></p>
1196+
<pre dir="ltr"><code class="language-markup">&lt;div class="inline-file-uploader"&gt;
1197+
&lt;label for="file-upload"&gt;Upload file&lt;/label&gt;
1198+
&lt;input type="file" multiple&gt;
1199+
&lt;span class="inline-file-uploader-actions"&gt;
1200+
&lt;label for="file_example_category"&gt;Category&lt;/label&gt;
1201+
&lt;select id="file_example_category"&gt;
1202+
&lt;option value="" selected&gt;&nbsp;&lt;/option&gt;
1203+
&lt;option value="file-example-category"&gt;Example category&lt;/option&gt;
1204+
&lt;/select&gt;
1205+
&lt;/span&gt;
1206+
&lt;span class="inline-file-uploader-actions"&gt;
1207+
&lt;input type="submit" value="Upload"&gt;
1208+
&lt;/span&gt;
1209+
&lt;/div&gt;</code></pre>
1210+
<p><strong>Example:</strong></p>
1211+
<div class="inline-file-uploader">
1212+
<label for="file-upload">Upload file</label>
1213+
<input type="file" multiple>
1214+
<span class="inline-file-uploader-actions">
1215+
<label for="file_example_category">Category</label>
1216+
<select id="file_example_category">
1217+
<option value="" selected>&nbsp;</option>
1218+
<option value="file-example-category">Example category</option>
1219+
</select>
1220+
</span>
1221+
<span class="inline-file-uploader-actions">
1222+
<input type="submit" value="Upload">
1223+
</span>
1224+
</div>
1225+
11941226
<h2 class="design-patterns-heading">Checkboxes</h2>
11951227
<p><strong>Code:</strong></p>
11961228
<pre dir="ltr"><code class="language-markup">&lt;input type="checkbox" id="test_checkbox_1" name="test_checkbox_1"&gt;

0 commit comments

Comments
 (0)