From 2c0c1246be79ef37785c84c87e4fece132955697 Mon Sep 17 00:00:00 2001 From: ArturBaybulatov Date: Mon, 19 Sep 2016 14:41:52 +0300 Subject: [PATCH] Fixes --- users/templates/contractor_profile.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index a6d41c0..491e118 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -474,7 +474,7 @@ {% thumbnail diplom.img "210x334" crop="center" as im %}
- +
@@ -514,7 +514,7 @@ {% thumbnail cro.img "210x334" crop="center" as im %}
- +
@@ -968,6 +968,15 @@ $("#resume-success").html(""); var formData = new FormData(); formData.append('resume_file', e.target.files[0]); + + var file = e.target.files[0] + var allowedExts = ['.pdf','.doc','.docx','.xml','.odt','.uot','.dot','.rtf','.txt','.uop','.pptx','.odp','.html'] + + if (!_.includes(path.extname(file.name), allowedExts)) { + alert('Файл не подходит. Выберите документ') + return + } + $.ajax({ url:'/api/contractorresume/{{ contractor.contractor_resume.pk }}/', method:'PUT',