DmitrMakeev
commited on
Commit
•
e075d72
1
Parent(s):
438a226
Update j_upl_json.html
Browse files- j_upl_json.html +40 -4
j_upl_json.html
CHANGED
@@ -3,19 +3,55 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<title>Upload JSON</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
</head>
|
7 |
<body>
|
8 |
<h1>Upload JSON Data</h1>
|
9 |
<form id="json-upload-form" enctype="multipart/form-data" method="post" action="/j_upload_json">
|
10 |
-
<input type="file" name="file" accept=".json">
|
11 |
-
<br
|
12 |
<label for="verify_phone">Verify Phone Number:</label>
|
13 |
<input type="checkbox" id="verify_phone" name="verify_phone" value="1">
|
14 |
<br>
|
15 |
<label for="add_curator">Add Curator:</label>
|
16 |
<input type="checkbox" id="add_curator" name="add_curator" value="1">
|
17 |
-
<br
|
18 |
<input type="submit" value="Upload JSON">
|
19 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</body>
|
21 |
-
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<title>Upload JSON</title>
|
6 |
+
<style>
|
7 |
+
body {
|
8 |
+
font-family: Arial, sans-serif;
|
9 |
+
margin: 20px;
|
10 |
+
}
|
11 |
+
h1 {
|
12 |
+
color: #333;
|
13 |
+
}
|
14 |
+
form {
|
15 |
+
display: flex;
|
16 |
+
flex-direction: column;
|
17 |
+
}
|
18 |
+
label, input {
|
19 |
+
margin-bottom: 10px;
|
20 |
+
}
|
21 |
+
input[type="submit"] {
|
22 |
+
width: 150px;
|
23 |
+
padding: 10px;
|
24 |
+
background-color: #007BFF;
|
25 |
+
color: white;
|
26 |
+
border: none;
|
27 |
+
cursor: pointer;
|
28 |
+
}
|
29 |
+
input[type="submit"]:hover {
|
30 |
+
background-color: #0056b3;
|
31 |
+
}
|
32 |
+
</style>
|
33 |
</head>
|
34 |
<body>
|
35 |
<h1>Upload JSON Data</h1>
|
36 |
<form id="json-upload-form" enctype="multipart/form-data" method="post" action="/j_upload_json">
|
37 |
+
<input type="file" name="file" accept=".json" required>
|
38 |
+
<br>
|
39 |
<label for="verify_phone">Verify Phone Number:</label>
|
40 |
<input type="checkbox" id="verify_phone" name="verify_phone" value="1">
|
41 |
<br>
|
42 |
<label for="add_curator">Add Curator:</label>
|
43 |
<input type="checkbox" id="add_curator" name="add_curator" value="1">
|
44 |
+
<br>
|
45 |
<input type="submit" value="Upload JSON">
|
46 |
</form>
|
47 |
+
<script>
|
48 |
+
document.getElementById('json-upload-form').onsubmit = function() {
|
49 |
+
var fileInput = document.querySelector('input[type="file"]');
|
50 |
+
if (!fileInput.files.length) {
|
51 |
+
alert('Please select a JSON file.');
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
};
|
55 |
+
</script>
|
56 |
</body>
|
57 |
+
</html>
|