This commit is contained in:
Константин Лебединский
2026-04-30 14:26:09 +05:00
parent e6b85f3944
commit 2b429f0b08
3 changed files with 24 additions and 5 deletions
+8 -3
View File
@@ -25,7 +25,9 @@
</a>
</div>
<div class="list-row__side">
<button type="button" class="btn btn-ghost btn-start-pass" data-test-id="{{ t.id }}">Продолжить</button>
<button type="button" class="btn btn-ghost btn-start-pass" data-test-id="{{ t.id }}">
{{ 'Продолжить' if t.has_in_progress_attempt else 'Пройти' }}
</button>
</div>
</li>
{% endfor %}
@@ -49,7 +51,9 @@
</a>
</div>
<div class="list-row__side">
<button type="button" class="btn btn-ghost btn-start-pass" data-test-id="{{ t.id }}">Продолжить</button>
<button type="button" class="btn btn-ghost btn-start-pass" data-test-id="{{ t.id }}">
{{ 'Продолжить' if t.has_in_progress_attempt else 'Пройти' }}
</button>
</div>
</li>
{% endfor %}
@@ -199,7 +203,8 @@
const testId = btn.dataset.testId;
if (!testId) return;
btn.disabled = true;
btn.textContent = 'Продолжить…';
const oldText = (btn.textContent || '').trim() || 'Пройти';
btn.textContent = `${oldText}`;
try {
const r = await fetch(`/api/tests/${testId}/attempts/start`, {
method: 'POST',