mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-04-21 06:13:34 +00:00
Added js for type buttons
This commit is contained in:
parent
9cc2fe24ec
commit
292bd93b32
@ -1,3 +0,0 @@
|
|||||||
POSTGRES_USER=
|
|
||||||
POSTGRES_PASSWORD=
|
|
||||||
POSTGRES_DB=
|
|
@ -14,26 +14,30 @@
|
|||||||
<button class="btn btn-outline-success my-2 my-sm-0 ml-2" type="submit">Search</button>
|
<button class="btn btn-outline-success my-2 my-sm-0 ml-2" type="submit">Search</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% if type == "all" %}
|
|
||||||
<input id="all" name="type" type="radio" value="all" checked>
|
|
||||||
{% else %}
|
|
||||||
<input id="all" name="type" type="radio" value="all">
|
<input id="all" name="type" type="radio" value="all">
|
||||||
{% endif %}
|
|
||||||
<label for="all" style="margin-right: 1.5rem;">All</label>
|
<label for="all" style="margin-right: 1.5rem;">All</label>
|
||||||
{% if type == "watched" %}
|
|
||||||
<input id="watched" name="type" type="radio" value="watched" checked>
|
|
||||||
{% else %}
|
|
||||||
<input id="watched" name="type" type="radio" value="watched">
|
<input id="watched" name="type" type="radio" value="watched">
|
||||||
{% endif %}
|
|
||||||
<label for="watched" style="margin-right: 1.5rem;">Watched</label>
|
<label for="watched" style="margin-right: 1.5rem;">Watched</label>
|
||||||
{% if type == "unwatched" %}
|
|
||||||
<input id="unwatched" name="type" type="radio" value="unwatched" checked>
|
|
||||||
{% else %}
|
|
||||||
<input id="unwatched" name="type" type="radio" value="unwatched">
|
<input id="unwatched" name="type" type="radio" value="unwatched">
|
||||||
{% endif %}
|
|
||||||
<label for="unwatched">Unwatched</label>
|
<label for="unwatched">Unwatched</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
switch ("{{type}}") {
|
||||||
|
case 'all':
|
||||||
|
document.getElementById('all').checked = true;
|
||||||
|
break;
|
||||||
|
case 'watched':
|
||||||
|
document.getElementById('watched').checked = true;
|
||||||
|
break;
|
||||||
|
case 'unwatched':
|
||||||
|
document.getElementById('unwatched').checked = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user