front - dodanie komentarza

This commit is contained in:
Jędrzej Klepacki 2021-01-02 16:11:05 +01:00
parent 8eac1970a1
commit 0b37ac8be5

View File

@ -31,16 +31,35 @@
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-10 col-md-8 col-lg-6">
<label for="name">Ocena: <span id="demo"></span></label>
<input type="range" style="width: 500px;" id="myRange" name="volume" min="0" max="5" step="1" color="Blue">
<label for="name">Ocena: <span id="demo"></span> <strong><span id="opinion"></span></strong></label>
<input type="range" style="width: 500px;" id="myRange" name="volume" min="1" max="5" step="1" color="Blue" value='0'>
<script>
var slider = document.getElementById("myRange");
var output = document.getElementById("demo");
var output2 = document.getElementById("opinion");
var text;
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
if (this.value == 1 ) {
text = "<span style=\"color:red\">- Bardzo Negatywnie!</span>";
} else if (this.value == 2) {
text = "<span style=\"color:orange\">- Negatywnie!";
} else if (this.value == 3) {
text = "<span style=\"color:black\">- Średnio";
} else if (this.value == 4) {
text = "<span style=\"color:blue\">- Pozytywnie";
} else {
text = "<span style=\"color:green\">- Bardzo pozytywnie!";
}
output.innerHTML = this.value
output2.innerHTML = text;
}
</script>
</div>
</div>
@ -49,8 +68,8 @@
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-10 col-md-8 col-lg-6">
<label for="name">Hasło: <span>*</span></label>
<input type="password" class="form-control" id="name" aria-describedby="name" placeholder="" name="password">
<label for="name">Komentarz <span>*</span></label>
<textarea class="form-control" id="order" rows="3" name="script"></textarea>
</div>
</div>
</div>
@ -58,21 +77,11 @@
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-10 col-md-8 col-lg-6">
<input type="submit" class="btn btn-primary update_btn" value="Logowanie">
<input type="submit" class="btn btn-primary update_btn" value="Dodaj Komentarz">
</div>
</div>
</div>
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-10 col-md-8 col-lg-6">
<label for="name">Jeśli nie masz konta możesz je utworzyć tutaj:</label> <br>
<a href="create_user"><button type="button" class="btn btn-primary update_btn">REJESTRACJA</button></a>
</div>
</div>
</div>
</form>
</div>
</div>