File size: 1,650 Bytes
995d55d
 
 
 
 
e075d72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
995d55d
 
 
 
e075d72
 
995d55d
 
 
 
 
e075d72
995d55d
 
e075d72
 
 
 
 
 
 
 
 
995d55d
e075d72
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Upload JSON</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        h1 {
            color: #333;
        }
        form {
            display: flex;
            flex-direction: column;
        }
        label, input {
            margin-bottom: 10px;
        }
        input[type="submit"] {
            width: 150px;
            padding: 10px;
            background-color: #007BFF;
            color: white;
            border: none;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <h1>Upload JSON Data</h1>
    <form id="json-upload-form" enctype="multipart/form-data" method="post" action="/j_upload_json">
        <input type="file" name="file" accept=".json" required>
        <br>
        <label for="verify_phone">Verify Phone Number:</label>
        <input type="checkbox" id="verify_phone" name="verify_phone" value="1">
        <br>
        <label for="add_curator">Add Curator:</label>
        <input type="checkbox" id="add_curator" name="add_curator" value="1">
        <br>
        <input type="submit" value="Upload JSON">
    </form>
    <script>
        document.getElementById('json-upload-form').onsubmit = function() {
            var fileInput = document.querySelector('input[type="file"]');
            if (!fileInput.files.length) {
                alert('Please select a JSON file.');
                return false;
            }
        };
    </script>
</body>
</html>