model changes, user institution history, style changes, forgot passowrd functionality, etc.

This commit is contained in:
msinkec
2021-09-02 14:40:54 +02:00
parent 7da73f7d6a
commit 788f3bc3eb
25 changed files with 551 additions and 176 deletions

View File

@@ -19,12 +19,13 @@
</head>
<body>
<a href="/solar/logout">Odjavi se</a>
{% if is_institution_moderator %}
{% if is_institution_coordinator %}
<br><a href="/solar/manage-institution">Upravljaj z institucijo</a>
{% endif %}
{% if is_admin %}
<br><a href="/solar/admin">Administracijski meni</a>
{% endif %}
<br><a href="mailto:email@example.com">Pomoč</a>
<div class="bg"></div>
<div id="main-window">
<div id="rect1">
@@ -41,6 +42,13 @@
<button id="button-pogodbe" class="selection-tab-button">POGODBE</button>
</div>
{% if not institution %}
<div class="warning">Niste član nobene institucije!</div>
{% elif not institution_contract %}
<div class="warning">Pogodba s šolo še ni naložena!</div>
{% endif %}
<div id="data-confirm-notification" class="message-notification" style="display: none;">Prosimo, preverite in potrdite vnešene podatke.</div>
<label for="program">PROGRAM</label>
<select id="program" name="program">
<option value="OS" selected="selected">Osnovnošolski (OŠ)</option>
@@ -109,7 +117,8 @@
<button id="button-submit" type="submit">Oddaj</button>
</div>
<div class="dropzone-previews"></div>
<div class="dropzone-previews">
</div>
</form>
</div>
@@ -236,6 +245,7 @@ zagotovili vse potrebne informacije v skladu s predpisi o varstvu osebnih podatk
var btnPogodbe = document.getElementById("button-pogodbe");
var elemTermsPopup = document.getElementById("popup-terms");
var termsScrollbox = document.getElementById("popup-terms-text");
var dataConfirmNotification = document.getElementById("data-confirm-notification");
var scrollboxTriggered = false;
var form = document.forms["my-dropzone"];
@@ -307,6 +317,9 @@ zagotovili vse potrebne informacije v skladu s predpisi o varstvu osebnih podatk
alert("Polje za predmet ne more biti prazno!");
} else if (vrsta === "delo-v-razredu" && isEmptyOrSpaces(vrstaCustom)) {
alert("Polje za vrsto besedila ne more biti prazno!");
} else if (dataConfirmNotification.style.display == "none") {
dataConfirmNotification.style.display = "inherit";
btnSubmit.textContent = "Potrdi";
} else {
// Then make terms popup visible
btnSubmit.disabled = true;
@@ -325,6 +338,8 @@ zagotovili vse potrebne informacije v skladu s predpisi o varstvu osebnih podatk
// Clear fields and hide popup agian
btnSubmit.disabled = false;
elemTermsPopup.style.display = "none";
dataConfirmNotification.style.display = "none";
btnSubmit.textContent = "Oddaj";
form.reset();
scrollboxTriggered = false;
});