File tree Expand file tree Collapse file tree 3 files changed +36
-14
lines changed
jobsdoor360-website/src/main/ejs/main-files/myaccount/cv_upload Expand file tree Collapse file tree 3 files changed +36
-14
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22<html lang =" en" >
33 <head >
4- <title >CV Upload</title >
5- <link rel =" stylesheet" href =" /staticfiles/mainfiles/myaccount/cv_upload/style.css" >
4+ <title >Cv upload</title >
5+ <link
6+ rel =" stylesheet"
7+ href =" /staticfiles/mainfiles/myaccount/cv_upload/style.css"
8+ />
69 <% - include (' ../../../partials/head.ejs' ) %>
7- <link rel =" stylesheet" href =" https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css" >
10+ <link
11+ rel =" stylesheet"
12+ type =" text/css"
13+ href =" https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"
14+ />
815 </head >
916 <body >
1017 <% - include (' ../../../partials/navbar.ejs' ) %>
11- <div class =" d-flex justify-content-center align-items-center flex-column gap-4" style =" margin-block : 100px " >
18+ <div
19+ class =" d-flex justify-content-center align-items-center flex-column gap-4"
20+ style =" margin-block : 100px "
21+ >
1222 <h2 >UPLOAD YOUR RESUME</h2 >
13- <form class =" d-flex flex-column justify-content-center gap-3" onsubmit = " return false; " >
23+ <form action = " " class =" d-flex flex-column justify-content-center gap-3" >
1424 <div class =" d-flex justify-content-center flex-column" >
1525 <input
1626 id =" cv"
1727 type =" file"
1828 class =" form-control cv"
19- accept =" .pdf,.doc,.docx "
29+ accept =" cv/* "
2030 required
2131 />
2232 <span class =" form-text" ></span >
3343 </form >
3444 </div >
3545 <% - include (' ../../../partials/footer.ejs' ) %>
36-
37- <!-- Firebase -->
38- <script type =" module" src =" /staticfiles/mainfiles/myaccount/cv_upload/script.js" ></script >
39- <script src =" https://cdn.jsdelivr.net/npm/toastify-js" ></script >
46+ <script
47+ type =" module"
48+ src =" /staticfiles/mainfiles/myaccount/cv_upload/script.js"
49+ ></script >
50+ <script
51+ type =" text/javascript"
52+ src =" https://cdn.jsdelivr.net/npm/toastify-js"
53+ ></script >
4054 </body >
4155</html >
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ onAuthStateChanged(auth, (user) => {
3131 userEmail = user . email ;
3232 } else {
3333 console . log ( "No user is signed in" ) ;
34- // Redirect to login with return URL (FULL URL for better redirect)
34+ // Redirect to login with full return URL
3535 window . location . href = `/login/?redirect_url=${ encodeURIComponent ( window . location . href ) } ` ;
3636 }
3737} ) ;
@@ -51,7 +51,11 @@ async function saveCVToDatabase() {
5151 const file = fileInput . files [ 0 ] ;
5252
5353 if ( ! file ) {
54- Toastify ( { text : "Please select a file" , duration : 3000 , style : { background : "red" } } ) . showToast ( ) ;
54+ Toastify ( {
55+ text : "Please select a file" ,
56+ duration : 3000 ,
57+ style : { background : "red" }
58+ } ) . showToast ( ) ;
5559 return ;
5660 }
5761
@@ -89,7 +93,11 @@ async function saveCVToDatabase() {
8993
9094 } catch ( err ) {
9195 console . error ( "Upload failed:" , err ) ;
92- Toastify ( { text : "Upload failed" , duration : 3000 , style : { background : "red" } } ) . showToast ( ) ;
96+ Toastify ( {
97+ text : "Upload failed" ,
98+ duration : 3000 ,
99+ style : { background : "red" }
100+ } ) . showToast ( ) ;
93101 }
94102
95103 uploadButton . disabled = false ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ signupForm.addEventListener("submit", async (e) => {
4848 await sendEmailVerification ( auth . currentUser ) ;
4949
5050 window . location . href = "/resend_email_verification/" ;
51- } catch ( error ) { .
51+ } catch ( error ) {
5252 alert ( "Error signing up: " + error . message ) ;
5353 } finally {
5454 signupButton . innerHTML = "Sign Up" ;
You can’t perform that action at this time.
0 commit comments