-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
index.html
86 lines (77 loc) · 2.86 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
<title>BS Custom File Input test</title>
</head>
<body>
<div class="container mt-1">
<div class="row">
<h1>BS Custom File Input tests</h1>
<div class="col-sm-12 mt-2">
<button class="btn btn-primary" onClick="bsCustomFileInput.destroy()">
Destroy all
</button>
</div>
<div class="col-sm-12 mt-5">
<h3>Examples</h3>
<div class="input-group mt-3">
<div class="custom-file">
<input id="inputGroupFile01" type="file" class="custom-file-input">
<label class="custom-file-label" for="inputGroupFile01">Choose file</label>
</div>
</div>
<div class="input-group mt-3">
<div class="custom-file">
<input id="inputGroupFile02" type="file" multiple class="custom-file-input">
<label class="custom-file-label" for="inputGroupFile02">Choose several files</label>
</div>
</div>
</div>
<div class="col-sm-12 mt-5">
<h3>Example with form</h3>
<form class="mt-3">
<div class="form-group row">
<div class="col-sm-10">
<button id="btnResetForm" class="btn btn-primary">
Reset form
</button>
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<div class="input-group mt-3">
<div class="custom-file">
<input id="inputGroupFile03" type="file" class="custom-file-input">
<label class="custom-file-label" for="inputGroupFile03">Choose file</label>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="col-sm-12 mt-5">
<h3>Example with label containing a child</h3>
<div class="custom-file mt-2">
<input id="inputGroupFile04" type="file" multiple class="custom-file-input" multiple>
<label class="custom-file-label" for="inputGroupFile04">
<span class="d-inline-block text-truncate w-75">Choose several files</span>
</label>
</div>
</div>
</div>
<script src="./coverage/bs-custom-file-input.js"></script>
<script>
bsCustomFileInput.init()
var btn = document.getElementById('btnResetForm')
var form = document.querySelector('form')
btn.addEventListener('click', function () {
form.reset()
})
</script>
</body>
</html>