Front update

This commit is contained in:
Piotr Kopycki 2022-04-11 12:20:29 +02:00
parent 40164544b6
commit c1d087c192
5 changed files with 44 additions and 28 deletions

View File

@ -476,7 +476,7 @@ background-color:#FF0B7E
} }
.editContainerLine { .editContainerLine {
padding: 10px 0px 10px 0px; padding: 0px 0px 0px 0px;
} }
.editContainerSection { .editContainerSection {
@ -485,4 +485,8 @@ background-color:#FF0B7E
.editContainerSection h2 { .editContainerSection h2 {
display: inline; display: inline;
}
span {
margin-right: 10px;
} }

View File

@ -18,8 +18,8 @@
</select> </select>
<br> <br>
<br> <br>
<label for="password">Hasło: </label> <label for="password">Hasło (opcjonalne): </label>
<input id="password" type="text" name="password" value=""> - Jeśli test ma nie posiadać hasła pozostaw puste pole <input id="password" type="text" name="password" value="">
<br> <br>
<br> <br>
<label for="category">Kategoria: </label> <label for="category">Kategoria: </label>

View File

@ -82,27 +82,37 @@
<div class="card-body test_body"> <div class="card-body test_body">
<div class="editContainerSection"> <div class="editContainerSection">
<div class="editContainerLine"> <div class="editContainerLine">
<label for="name"><h2>Nazwa:</h2></label> <span><label for="name"><h3>Nazwa:</h3></label></span>
<input id="name" type="text" name="name" value="{{ test.name }}"> <span><input id="name" type="text" name="name" value="{{ test.name }}"></span>
<button class="defaultButton"> <span><button class="defaultButton">
<a href='' onclick="this.href='editName?name='+document.getElementById('name').value">Zmien nazwe</a> <a href='' onclick="this.href='editName?name='+document.getElementById('name').value">Zapisz</a>
</button> </button></span>
</div> </div>
<label for="actual_visible">Aktualna widzialność: {% if test.visible %}Publiczny{% else %}Prywatny{% endif %}</label><br> <div class="editContainerLine">
<label for="visible">Widzialność: </label> <!-- <span><label>Aktualna widzialność: {% if test.visible %}Publiczny{% else %}Prywatny{% endif %}</label></span><br>-->
<select name="visible" id="visible"> <span><label for="visible"><h3>Widzialność: </h3></label></span>
<option value="public">Publiczny</option> <span><select name="visible" id="visible">
{% if test.visible %}
<option selected="selected" value="public" >Publiczny</option>
<option value="private">Prywatny</option> <option value="private">Prywatny</option>
</select> {% endif %}
<button class="defaultButton"> {% if not test.visible %}
<a href='' onclick="this.href='editVisible?visible='+document.getElementById('visible').value">Zmien widzialność testu</a> <option value="public" >Publiczny</option>
</button> <option selected="selected" value="private">Prywatny</option>
{% endif %}
<label for="password"><h2>Hasło:</h2></label> </select></span>
<input id="password" type="text" name="password" value=""> <span><button class="defaultButton">
<button class="defaultButton"> <a href='' onclick="this.href='editVisible?visible='+document.getElementById('visible').value">Zapisz</a>
<a href='' onclick="this.href='editPassword?password='+document.getElementById('password').value">Zmien hasło</a> </button></span>
</button> </div>
<div class="editContainerLine">
<span><label for="password"><h3>Hasło:</h3></label></span>
<span><input id="password" type="text" name="password" value=""></span>
<span><button class="defaultButton">
<a href='' onclick="this.href='editPassword?password='+document.getElementById('password').value">Zapisz</a>
</button></span>
</div>
<label><h3>Pytania:</h3></label>
</div> </div>
<form method="post" novalidate> <form method="post" novalidate>
{% for question in test.questions.all %} {% for question in test.questions.all %}
@ -124,7 +134,7 @@
<a href="/tests/{{test.id}}/add-question">Dodaj pytanie</a> <a href="/tests/{{test.id}}/add-question">Dodaj pytanie</a>
</button> </button>
<button class="defaultButton"> <button class="defaultButton">
<a href="/tests/{{test.id}}/remove-question">Usuwanie pytań</a> <a href="/tests/{{test.id}}/remove-question">Usuń pytania</a>
</button> </button>
</div> </div>
</form> </form>

View File

@ -8,6 +8,7 @@
<div class="mainTestContainer"> <div class="mainTestContainer">
<div class="mainTestName"> <div class="mainTestName">
{{test.name}} {{test.name}}
<i class="fa-solid fa-lock"></i>
</div> </div>
<div class="mainTestMeta"> <div class="mainTestMeta">
<div class="left">Kategoria: {{test.category}}</div> <div class="left">Kategoria: {{test.category}}</div>

View File

@ -27,11 +27,12 @@
<h5 class="resultText">Maksymalny wynik: {{ max }}</h5> <h5 class="resultText">Maksymalny wynik: {{ max }}</h5>
<h5 class="resultText">Wynik procentowy: {{ percentage }}%</h5> <h5 class="resultText">Wynik procentowy: {{ percentage }}%</h5>
<button class="defaultButton"><a href="{% url 'home' %}">Strona główna</a></button> <button class="defaultButton"><a href="{% url 'home' %}">Strona główna</a></button>
{% if password == "" %} {% if password == "" %}
Udostępnij: <br>
{% post_to_facebook object_or_url "Post to Facebook!" %} <h5>Udostępnij:</h5>
{% post_to_linkedin object_or_url %} {% post_to_facebook object_or_url %}
{% endif %} {% post_to_linkedin object_or_url %}
{% endif %}
</div> </div>
</div> </div>