Add button to add 5 minutes to session start time

This commit is contained in:
2020-11-03 01:08:39 +01:00
parent b8cffe7b48
commit 1d79676f51
5 changed files with 40 additions and 4 deletions

View File

@ -14,7 +14,7 @@
function toggle_category(id) {
// Find out whether the button is in active (play) or inactive (paused) state
let toggled_class = "category_button_toggled";
let cl = document.getElementById("button-" + id).classList;
let cl = document.getElementById("toggle-button-" + id).classList;
let active = cl.contains(toggled_class);
// Get the corresponding route to activate/inactivate the category
@ -49,9 +49,14 @@
style="background-color: {{this.1.color}}"
></div>
<span class="category_name">{{this.1.name}}</span>
{{#if this.1.started}}
<form action="/category/{{this.0}}/bump_session/minutes/5", method="post">
<button style="height: 100%; color: green;" type="submit">+5</button>
</form>
{{/if}}
<div class="category_button_container">
<button
id="button-{{this.0}}"
id="toggle-button-{{this.0}}"
onClick="toggle_category('{{this.0}}')"
{{#if this.1.started}}
class="category_button category_button_toggled"