Add resume file upload (swap from URL)
This commit is contained in:
parent
7a450226d6
commit
3ebb4fb081
3 changed files with 20 additions and 24 deletions
|
|
@ -80,20 +80,7 @@ body {
|
||||||
border-bottom-color: rgba(255,255,255,0.5);
|
border-bottom-color: rgba(255,255,255,0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== Staging Banner ===== */
|
|
||||||
.staging-banner {
|
|
||||||
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
padding: 0.5rem;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 500;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===== Hero Section ===== */
|
/* ===== Hero Section ===== */
|
||||||
.hero {
|
.hero {
|
||||||
|
|
@ -293,6 +280,18 @@ body {
|
||||||
padding-bottom: 4rem;
|
padding-bottom: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.file-input {
|
||||||
|
padding: 0.5rem !important;
|
||||||
|
background: var(--white) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-hint {
|
||||||
|
display: block;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: var(--medium-gray);
|
||||||
|
margin-top: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.form-intro {
|
.form-intro {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- ===== Staging Banner ===== -->
|
<!-- ===== Staging Banner ===== -->
|
||||||
<div class="staging-banner">
|
|
||||||
⚠️ STAGING SITE — RecruitmentVenture-Staging
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ===== Header ===== -->
|
<!-- ===== Header ===== -->
|
||||||
<header class="site-header">
|
<header class="site-header">
|
||||||
|
|
@ -85,8 +82,9 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="js-resume">Resume/Portfolio URL</label>
|
<label for="js-resume">Upload Resume</label>
|
||||||
<input type="url" id="js-resume" name="resume" placeholder="https://example.com/resume.pdf">
|
<input type="file" id="js-resume" name="resume" accept=".pdf,.doc,.docx,.txt,.jpg,.png" class="file-input">
|
||||||
|
<span class="file-hint">Accepted: PDF, Word, text, images (max 10MB)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,17 @@ function getApiPath(formId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitForm(form, formId) {
|
async function submitForm(form, formId) {
|
||||||
const formData = new FormData(form);
|
|
||||||
const data = Object.fromEntries(formData.entries());
|
|
||||||
|
|
||||||
const submitBtn = form.querySelector('button[type="submit"]');
|
const submitBtn = form.querySelector('button[type="submit"]');
|
||||||
submitBtn.disabled = true;
|
submitBtn.disabled = true;
|
||||||
submitBtn.textContent = 'Submitting...';
|
submitBtn.textContent = 'Submitting...';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Use FormData (handles file uploads) - NOT JSON
|
||||||
|
const formData = new FormData(form);
|
||||||
|
|
||||||
const response = await fetch(PROXY_URL + getApiPath(formId), {
|
const response = await fetch(PROXY_URL + getApiPath(formId), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
body: formData
|
||||||
body: JSON.stringify(data)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue