2021-05-24 08:15:54 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Portal za oddajanje besedil</title>
|
2021-11-26 12:50:32 +00:00
|
|
|
<link rel="stylesheet" href="/static/css/header.css" type="text/css">
|
|
|
|
<link rel="stylesheet" href="/static/css/form.css" type="text/css">
|
|
|
|
<link rel="stylesheet" href="/static/css/simple-grid.css" type="text/css">
|
|
|
|
<link rel="stylesheet" href="/static/css/contracts.css" type="text/css">
|
2021-05-24 08:15:54 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-11-26 12:50:32 +00:00
|
|
|
<header>
|
|
|
|
<div class="logo"><a href="/"><img src="/static/image/logo-white.svg"/></a></div>
|
|
|
|
<div class="menu-items">
|
|
|
|
<a href="../logout">Odjava</a>
|
|
|
|
{% if is_institution_coordinator %}
|
|
|
|
<a href="../manage-institution">Upravljaj z institucijo</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if is_admin %}
|
|
|
|
<a href="../admin">Administracijski meni</a>
|
|
|
|
{% endif %}
|
|
|
|
<a href="mailto:email@example.com">Pomoč</a>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="container" style="margin-top:8rem;">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h1 class="title">Koprus SOLAR</h1>
|
|
|
|
<p class="subtitle">Zbiranje besedil za korpus Šolar poteka po naslednjem postopku, ki prinaša tudi točke za napredovanje.</p>
|
|
|
|
|
|
|
|
<div class="tab-nav">
|
|
|
|
<a href="/oddaja">Oddaja</a>
|
|
|
|
<a href="/zgodovina">Zgodovina</a>
|
|
|
|
<a href="/pogodbe" class="active">Pogodbe</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h2>Oddaj pogodbo</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if show_upload_form %}
|
|
|
|
<form action="" method="POST" id="form-pogodbe" enctype="multipart/form-data">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="form-wrapper">
|
2021-12-06 18:31:48 +00:00
|
|
|
<input type="radio" id="sola" name="tip-pogodbe" value="sola" {% if enable_upload_school_contract %}{%else%}disabled{%endif%}>
|
2021-11-26 12:50:32 +00:00
|
|
|
<label for="sola">Pogodba s šolo</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="form-wrapper">
|
2021-12-06 18:31:48 +00:00
|
|
|
<input type="radio" id="ucenci-starsi" name="tip-pogodbe" value="ucenci-starsi">
|
2021-11-26 12:50:32 +00:00
|
|
|
<label for="ucenci-starsi">Pogodba z učenci / starši</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="form-wrapper">
|
|
|
|
<div id="dropzone-previews" class="dropzone-previews"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="form-wrapper">
|
|
|
|
<label for="my-dropzone">Datoteka</label>
|
|
|
|
<div id="my-dropzone" class="dropzone"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<p>lalala</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<button class="btn" id="btn-submit" type="submit">Oddaj pogodbo</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h2>Oddane pogodbe</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if contract_school %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="contract-item">
|
|
|
|
<img src="/static/image/contract.png" alt="contract" class="contract-item-icon"/>
|
|
|
|
<div class="contract-item-title">Pogodba s šolo</div>
|
|
|
|
<div class="contract-item-date">DODANO: {{contract_school.timestamp.strftime('%d. %m. %Y')}}</div>
|
|
|
|
<a href="../pogodbe-institucije/{{ contract_school.file_contract }}.pdf" class="contract-item-download">Prenesi</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% for item in contracts_students %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<div class="contract-item">
|
|
|
|
<img src="/static/image/contract.svg" alt="contract" class="contract-item-icon"/>
|
|
|
|
<div class="contract-item-title">Pogodba o prenosu lastništva</div>
|
|
|
|
<div class="contract-item-date">DODANO: {{item.timestamp.strftime('%d. %m. %Y')}}</div>
|
|
|
|
<a href="../pogodbe-ucencistarsi/{{ item.file_contract }}.pdf" class="contract-item-download">Prenesi</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h2>Sodelujoči</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
{% for collaborator in collaborators %}
|
|
|
|
<div class="collaborators-item">
|
|
|
|
<div class="collaborators-item-name">{{collaborator.name}}</div>
|
|
|
|
{% if collaborator.id in cooperation_history %}
|
|
|
|
{% if cooperation_history[collaborator.id]["coordinator"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Vodenje:</b> {% for item in cooperation_history[collaborator.id]["coordinator"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if cooperation_history[collaborator.id]["mentor"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Mentorstvo:</b> {% for item in cooperation_history[collaborator.id]["mentor"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if cooperation_history[collaborator.id]["other"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Drugo:</b> {% for item in cooperation_history[collaborator.id]["other"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
2021-10-12 09:11:37 +00:00
|
|
|
<a href="../logout">Odjavi se</a>
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if is_institution_coordinator %}
|
2021-10-12 09:11:37 +00:00
|
|
|
<br><a href="../manage-institution">Upravljaj z institucijo</a>
|
2021-08-22 17:07:19 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if is_admin %}
|
2021-10-12 09:11:37 +00:00
|
|
|
<br><a href="../admin">Administracijski meni</a>
|
2021-08-22 17:07:19 +00:00
|
|
|
{% endif %}
|
2021-09-02 12:40:54 +00:00
|
|
|
<br><a href="mailto:email@example.com">Pomoč</a>
|
2021-05-24 08:15:54 +00:00
|
|
|
<div class="bg"></div>
|
|
|
|
<div id="main-window">
|
|
|
|
<div id="rect1">
|
2021-11-26 12:50:32 +00:00
|
|
|
|
2021-09-16 15:25:20 +00:00
|
|
|
{% with messages = get_flashed_messages() %}
|
|
|
|
{% if messages %}
|
|
|
|
<div class="message-notification">
|
|
|
|
{{ messages[0] }}
|
|
|
|
</div>
|
|
|
|
<div id="contract-container" style="height: 250px;">
|
|
|
|
{% else %}
|
2021-08-22 17:07:19 +00:00
|
|
|
<div id="contract-container">
|
2021-09-16 15:25:20 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
|
2021-05-24 08:15:54 +00:00
|
|
|
{% if contract_school %}
|
2021-09-02 12:40:54 +00:00
|
|
|
<div class="contract-item">
|
|
|
|
<img src="/static/image/contract.png" alt="contract" class="contract-item-icon"/>
|
2021-06-08 06:00:18 +00:00
|
|
|
<div class="contract-item-title">Pogodba s šolo</div>
|
2021-09-02 12:40:54 +00:00
|
|
|
<div class="contract-item-data">{{contract_school.original_filename}}</div>
|
|
|
|
<div class="contract-item-data">DODANO: {{contract_school.timestamp}}</div>
|
2021-10-12 09:11:37 +00:00
|
|
|
<a href="../pogodbe-institucije/{{ contract_school.file_contract }}.pdf" class="contract-item-button">Prenesi</a>
|
2021-06-08 06:00:18 +00:00
|
|
|
</div>
|
|
|
|
</br>
|
2021-05-24 08:15:54 +00:00
|
|
|
{% endif %}
|
|
|
|
{% for item in contracts_students %}
|
|
|
|
<div class="contract-item">
|
2021-09-02 12:40:54 +00:00
|
|
|
<img src="/static/image/contract.png" alt="contract" class="contract-item-icon"/>
|
|
|
|
<div class="contract-item-title" style="font-size: 12px;">{{item.original_filename}}</div>
|
|
|
|
<div class="contract-item-data">Pogodba o prenosu lastništva</div>
|
|
|
|
<div class="contract-item-data">DODANO: {{item.timestamp}}</div>
|
2021-10-12 09:11:37 +00:00
|
|
|
<a href="../pogodbe-ucencistarsi/{{ item.file_contract }}.pdf" class="contract-item-button">Prenesi</a>
|
2021-05-24 08:15:54 +00:00
|
|
|
</div>
|
|
|
|
</br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-06-08 06:00:18 +00:00
|
|
|
</br>
|
|
|
|
</br>
|
2021-05-24 08:15:54 +00:00
|
|
|
{% if show_upload_form %}
|
2021-06-08 06:00:18 +00:00
|
|
|
<div style="padding: 20px; position: absolute; top: 500px; width: 89%;">
|
|
|
|
<div class="section-desc">Oddaj pogodbo</div>
|
2021-10-12 09:11:37 +00:00
|
|
|
<form action="../pogodbe" method="post" enctype="multipart/form-data">
|
2021-06-08 06:00:18 +00:00
|
|
|
{% if enable_upload_school_contract %}
|
|
|
|
<div style="display:flex; flex-direction: row; justify-content: left; align-items: center">
|
|
|
|
<label style="width: 80%; text-align: right;" for="sola">Pogodba s šolo</label>
|
|
|
|
<input style="width: 20%;" type="radio" id="sola" name="tip-pogodbe" value="sola">
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div style="display:flex; flex-direction: row; justify-content: left; align-items: center">
|
|
|
|
<label style="width: 80%; text-align: right;" for="sola">Pogodba s šolo</label>
|
|
|
|
<input style="width: 20%;"type="radio" id="sola" name="tip-pogodbe" value="sola" disabled>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div style="display:flex; flex-direction: row; justify-content: left; align-items: center">
|
|
|
|
<label style="width: 80%; text-align: right;" for="ucenci-starsi">Pogodba z učenci / starši</label>
|
|
|
|
<input style="width: 20%;" type="radio" id="ucenci-starsi" name="tip-pogodbe" value="ucenci-starsi" checked>
|
|
|
|
</div>
|
2021-09-16 15:25:20 +00:00
|
|
|
<input style="font-size: 10px;" type="file" id="file-contract" name="file[]" multiple="">
|
2021-06-08 06:00:18 +00:00
|
|
|
<button style="float: right;" type="submit">Oddaj pogodbo</button>
|
2021-05-24 08:15:54 +00:00
|
|
|
</form>
|
2021-06-08 06:00:18 +00:00
|
|
|
</div>
|
2021-05-24 08:15:54 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div id="rect2" class="mock-side">
|
2021-08-22 17:07:19 +00:00
|
|
|
<div id="collaborators-container">
|
|
|
|
<div class="container-title">Sodelujoči</div>
|
|
|
|
<div style="overflow-y: auto;">
|
2021-09-02 12:40:54 +00:00
|
|
|
{% for collaborator in collaborators %}
|
2021-08-22 17:07:19 +00:00
|
|
|
<div class="collaborators-item">
|
2021-09-02 12:40:54 +00:00
|
|
|
<div class="collaborators-item-name">{{collaborator.name}}</div>
|
2021-09-16 15:25:20 +00:00
|
|
|
{% if collaborator.id in cooperation_history %}
|
|
|
|
{% if cooperation_history[collaborator.id]["coordinator"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Vodenje:</b> {% for item in cooperation_history[collaborator.id]["coordinator"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if cooperation_history[collaborator.id]["mentor"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Mentorstvo:</b> {% for item in cooperation_history[collaborator.id]["mentor"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if cooperation_history[collaborator.id]["other"]|length > 0 %}
|
|
|
|
<div class="collaborators-item-years"><b>Drugo:</b> {% for item in cooperation_history[collaborator.id]["other"] %}
|
|
|
|
{% if loop.index != 1 %}, {% endif %}
|
|
|
|
{{item[0]}}
|
|
|
|
{% endfor %}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2021-08-22 17:07:19 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="awards-container">
|
2021-09-02 12:40:54 +00:00
|
|
|
<div class="container-title">Sodelovanje v letih</div>
|
|
|
|
<div style="overflow-y: auto; margin: auto; width: 100%; height: 200px;">
|
2021-09-16 15:25:20 +00:00
|
|
|
{% if cooperation_history.keys()|length > 0 %}
|
|
|
|
{% if user_id in cooperation_history %}
|
|
|
|
{% for item in cooperation_history[user_id]['coordinator'] %}
|
|
|
|
<div style="border-bottom: 2px solid #c4c4c4; min-height: 50px; margin-bottom: 10px;">
|
|
|
|
<img src="/static/image/star.png" alt="star" style="float: left; width: 40px;"/>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">
|
|
|
|
{{item[1]}}
|
|
|
|
</div>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;">
|
|
|
|
{{item[0]}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% for item in cooperation_history[user_id]['mentor'] %}
|
|
|
|
<div style="border-bottom: 2px solid #c4c4c4; min-height: 50px; margin-bottom: 10px;">
|
|
|
|
<img src="/static/image/star.png" alt="star" style="float: left; width: 40px;"/>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">
|
|
|
|
{{item[1]}}
|
|
|
|
</div>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;">
|
|
|
|
{{item[0]}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% for item in cooperation_history[user_id]['other'] %}
|
|
|
|
<div style="border-bottom: 2px solid #c4c4c4; min-height: 50px; margin-bottom: 10px;">
|
|
|
|
<img src="/static/image/star.png" alt="star" style="float: left; width: 40px;"/>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">
|
|
|
|
{{item[1]}}
|
|
|
|
</div>
|
|
|
|
<div class="collaborators-item-name"
|
|
|
|
style="float: right; width: 250px; text-align: left; margin-left: 20px;">
|
|
|
|
{{item[0]}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2021-09-02 12:40:54 +00:00
|
|
|
</div>
|
2021-08-22 17:07:19 +00:00
|
|
|
</div>
|
2021-05-24 08:15:54 +00:00
|
|
|
</div>
|
2021-11-26 12:50:32 +00:00
|
|
|
</div>-->
|
2021-05-24 08:15:54 +00:00
|
|
|
</body>
|
2021-11-26 12:50:32 +00:00
|
|
|
<!--{{ dropzone.load_js() }}-->
|
|
|
|
<script src="/static/dropzone.js"></script>
|
|
|
|
<script>
|
|
|
|
/////////////////////////
|
|
|
|
// Dropzone //
|
|
|
|
/////////////////////////
|
|
|
|
var btnSubmit = document.getElementById("btn-submit");
|
|
|
|
var errorMessage = document.getElementById("error-message");
|
|
|
|
var form = document.forms["form-pogodbe"];
|
|
|
|
|
|
|
|
|
|
|
|
function isEmptyOrSpaces(str){
|
|
|
|
return str == null || str.match(/^ *$/) !== null;
|
|
|
|
}
|
|
|
|
|
|
|
|
function showError(str) {
|
|
|
|
errorMessage.querySelector("p").textContent = str;
|
|
|
|
errorMessage.style.display = "block";
|
|
|
|
window.scroll({
|
|
|
|
top: 0,
|
|
|
|
behavior: 'smooth'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dropzone.options.myDropzone = { // The camelized version of the ID of the form element
|
|
|
|
url: "../pogodbe",
|
|
|
|
autoProcessQueue: false,
|
|
|
|
uploadMultiple: false,
|
|
|
|
parallelUploads: 20,
|
|
|
|
paramName: "file[]", // The name that will be used to transfer the file
|
|
|
|
maxFilesize: 1000, // MB
|
|
|
|
timeout: 5000000, // milliseconds
|
|
|
|
acceptedFiles: ".txt, .csv, .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .mkv",
|
|
|
|
maxFiles: 20,
|
|
|
|
previewsContainer: "#dropzone-previews",
|
|
|
|
dictDefaultMessage: "Kliknite ali odložite datoteke sem.",
|
|
|
|
dictFallbackMessage: "Vaš brskalnik ne podpira izbiranje datotek z odlaganjem (\"drag & drop\").",
|
|
|
|
dictInvalidFileType: "Datoteka je napačnega formata.",
|
|
|
|
dictFileTooBig: "Datoteke je prevelika {{filesize}}. Največja dovoljena velikost: {{maxFilesize}}MiB.",
|
|
|
|
dictResponseError: "Napaka strežnika: {{statusCode}}",
|
|
|
|
dictMaxFilesExceeded: "Ne morete naložiti več datotek.",
|
|
|
|
dictCancelUpload: "Prekini prenos",
|
|
|
|
dictRemoveFile: "Odstrani datoteko",
|
|
|
|
dictCancelUploadConfirmation: "Ali res želite odstraniti to datoteko?",
|
|
|
|
dictUploadCanceled: "Prenos prekinjen",
|
|
|
|
|
|
|
|
// The setting up of the dropzone
|
|
|
|
init: function() {
|
|
|
|
var dz = this;
|
|
|
|
|
|
|
|
/*btnSubmit.addEventListener("click", function(e) {
|
|
|
|
// Make sure that the form isn't actually being sent.
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
|
|
|
|
// Check form validity.
|
|
|
|
var program = form["program"].value;
|
|
|
|
var predmet = form["predmet"].value;
|
|
|
|
var predmetCustom = form["predmet-custom"].value;
|
|
|
|
var letnik = form["letnik"].value;
|
|
|
|
var vrsta = form["vrsta"].value;
|
|
|
|
var vrstaCustom = form["vrsta-custom"].value;
|
|
|
|
var solskoLeto = form["solsko-leto"].value;
|
|
|
|
var jezikovniPopravki = form["jezikovni-popravki"].value;
|
|
|
|
|
|
|
|
/*if (predmet.startsWith("drug") && isEmptyOrSpaces(predmetCustom)) {
|
|
|
|
showError("Polje za predmet ne more biti prazno!");
|
|
|
|
} else if (vrsta === "delo-v-razredu" && isEmptyOrSpaces(vrstaCustom)) {
|
|
|
|
showError("Polje za vrsto besedila ne more biti prazno!");
|
|
|
|
} else if (dataConfirmNotification.style.display == "none") {
|
|
|
|
dataConfirmNotification.style.display = "inherit";
|
|
|
|
btnSubmit.style.display = "none";
|
|
|
|
} else {*/
|
|
|
|
|
|
|
|
// Hand off data to dropzone
|
|
|
|
/*dz.processQueue();
|
|
|
|
|
|
|
|
// Clear fields and hide popup agian
|
|
|
|
dataConfirmNotification.style.display = "none";
|
|
|
|
btnSubmit.textContent = "Oddaj";
|
|
|
|
form.reset();*/
|
|
|
|
//}
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
// First change the button to actually tell dropzone to process the queue.
|
|
|
|
btnSubmit.addEventListener("click", function(e) {
|
|
|
|
// Make sure that the form isn't actually being sent.
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
// Hand off data to dropzone
|
|
|
|
|
|
|
|
dz.processQueue();
|
|
|
|
console.log(dz.files);
|
|
|
|
console.log(form["tip-pogodbe"].value);
|
|
|
|
//form.submit();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.on("sending", function(file, xhr, formData) {
|
|
|
|
//alert("lalalala");
|
|
|
|
formData.append("tip-pogodbe", form["tip-pogodbe"].value);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
uploadprogress: function(file, progress, bytesSent) {
|
|
|
|
if (file.previewElement) {
|
|
|
|
console.log(progress);
|
|
|
|
var progressElement = file.previewElement.querySelector("[data-dz-uploadprogress]");
|
|
|
|
progressElement.style.width = progress + "%";
|
|
|
|
//progressElement.querySelector(".progress-text").textContent = progress + "%";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
2021-05-24 08:15:54 +00:00
|
|
|
</html>
|