Spaces:
Sleeping
Sleeping
Update templates/braintumor.html
Browse files- templates/braintumor.html +21 -1
templates/braintumor.html
CHANGED
@@ -141,7 +141,7 @@
|
|
141 |
</div>
|
142 |
|
143 |
<div class="container">
|
144 |
-
<form action="resultbt" class="main-form needs-validation" method="POST" enctype="multipart/form-data">
|
145 |
<div class="row">
|
146 |
<div class="col-md-6">
|
147 |
<div class="form-group">
|
@@ -205,6 +205,26 @@
|
|
205 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
|
206 |
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
|
207 |
crossorigin="anonymous"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
</body>
|
209 |
|
210 |
</html>
|
|
|
141 |
</div>
|
142 |
|
143 |
<div class="container">
|
144 |
+
<form action="resultbt" class="main-form needs-validation" method="POST" enctype="multipart/form-data" novalidate>
|
145 |
<div class="row">
|
146 |
<div class="col-md-6">
|
147 |
<div class="form-group">
|
|
|
205 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
|
206 |
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
|
207 |
crossorigin="anonymous"></script>
|
208 |
+
|
209 |
+
<!-- Enable Bootstrap validation -->
|
210 |
+
<script>
|
211 |
+
(function () {
|
212 |
+
'use strict'
|
213 |
+
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
214 |
+
var forms = document.querySelectorAll('.needs-validation')
|
215 |
+
// Loop over them and prevent submission
|
216 |
+
Array.prototype.slice.call(forms)
|
217 |
+
.forEach(function (form) {
|
218 |
+
form.addEventListener('submit', function (event) {
|
219 |
+
if (!form.checkValidity()) {
|
220 |
+
event.preventDefault()
|
221 |
+
event.stopPropagation()
|
222 |
+
}
|
223 |
+
form.classList.add('was-validated')
|
224 |
+
}, false)
|
225 |
+
})
|
226 |
+
})()
|
227 |
+
</script>
|
228 |
</body>
|
229 |
|
230 |
</html>
|