psy4 / j_upl_json.html
DmitrMakeev's picture
Update j_upl_json.html
e075d72 verified
raw
history blame
1.65 kB
<!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>