fix: обязательная фотография в форме отправки; модалка редактирования шире и в две колонки; поддержка .jfif в прикреплении

This commit is contained in:
dev
2026-09-12 17:19:53 +03:00
parent 854f2d4650
commit b263a735ac
2 changed files with 31 additions and 35 deletions
+7 -1
View File
@@ -146,12 +146,18 @@ function capture() {
form.addEventListener('submit', async (e) => {
e.preventDefault();
if (!capturedBlob) {
toast.textContent = 'Сначала сделайте фотографию';
toast.classList.add('show', 'error');
setTimeout(() => toast.classList.remove('show', 'error'), 3200);
return;
}
const btn = document.getElementById('submitBtn');
btn.disabled = true;
btn.textContent = 'Отправка...';
const fd = new FormData();
if (capturedBlob) fd.append('photo', capturedBlob, 'photo.jpg');
fd.append('photo', capturedBlob, 'photo.jpg');
selectedFiles.forEach(f => fd.append('files', f, f.name));
fd.append('student_name', studentName || document.getElementById('nameInput').value);
fd.append('group_id', groupInput.value);