New changes.
parent
e06feff139
commit
e27b6588b2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,40 @@
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Osina</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href='{% static "dist/output.css" %}'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="hiddenContent">
|
||||
<h1 class="text-slate-800 text-2xl font-semibold text-center">Add Credential</h1>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input type="text" placeholder="Account" class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4">
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input type="password" placeholder="Password" class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4">
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input type="password" placeholder="Used for" class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4">
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center mt-6">
|
||||
<button type="submit"
|
||||
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,91 @@
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Osina</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href='{% static "dist/output.css" %}'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="hiddenContent">
|
||||
<h1 class="text-slate-800 text-2xl font-semibold text-center">Add File</h1>
|
||||
|
||||
<form>
|
||||
<p class="hidden text-blue-500 font-light" id="successMessage">
|
||||
Your file has been successfully uploaded. You can either add another file or close the modal.
|
||||
</p>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input type="text" placeholder="File Name"
|
||||
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4" required>
|
||||
</div>
|
||||
|
||||
<input type="date" id="date" name="date"
|
||||
class="w-full md:w-[300px] p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
|
||||
required>
|
||||
|
||||
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md mt-3">
|
||||
<div class="flex items-center justify-between">
|
||||
<input required name="cv" type="file" id="actual-btn" accept=".pdf,.docx" hidden required />
|
||||
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
|
||||
Document(s)</span>
|
||||
<label for="actual-btn"
|
||||
class="bg-transparent text-gray-500 border border-white py-2 h-14 cursor-pointer flex items-center"><i
|
||||
class="fa fa-upload"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center mt-6">
|
||||
<button type="submit"
|
||||
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500"
|
||||
id="addfileclose">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const successMessage = document.getElementById('successMessage');
|
||||
const addfileclose = document.getElementById('addfileclose');
|
||||
const form = document.querySelector('form');
|
||||
|
||||
addfileclose.addEventListener("click", () => {
|
||||
if (form.checkValidity()) {
|
||||
successMessage.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// Add an event listener to prevent the form submission when the Enter key is pressed
|
||||
form.addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
|
||||
<script>
|
||||
const fileInput = document.getElementById('actual-btn');
|
||||
const fileNameSpan = document.getElementById('file-name');
|
||||
|
||||
fileInput.addEventListener('change', (event) => {
|
||||
const selectedFiles = event.target.files;
|
||||
if (selectedFiles.length > 0) {
|
||||
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
|
||||
fileNameSpan.textContent = fileNames;
|
||||
} else {
|
||||
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue