Skip to content

Commit

Permalink
✔️ Сборка #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Keks committed Mar 27, 2024
1 parent 32bffe8 commit 47d88d4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions 11/js/uploadForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ function closeButton() {
document.addEventListener('keydown', onEscKeyDown);

inputFile.value = '';
imgUploadForm.reset();
document.querySelector('.scale__control--value').value = `${100}%`;
document.querySelector('.img-upload__preview').style.transform = '';
document.querySelector('.effect-level__slider').noUiSlider.set(100);
document.querySelector('.img-upload__preview').style.filter = 'none';
document.querySelector('.img-upload__effect-level').classList.add('hidden');
};
}

cancelButton.addEventListener('click', () => {
formOverlay.classList.add('hidden');
Expand Down Expand Up @@ -134,15 +135,6 @@ commentInput.addEventListener('keydown', (evt) => {
}
});

submitButton.disabled = true;

imgUploadForm.submit();
imgUploadForm.reset();
scaleControlValue.value = '100%';
imgPreview.style.transform = 'scale(1)';
imgPreview.style.filter = 'none';
submitButton.disabled = false;

const successTemplate = document.querySelector('#success').content;
const successMessage = successTemplate.querySelector('.success').cloneNode(true);
const errorTemplate = document.querySelector('#error').content;
Expand Down

0 comments on commit 47d88d4

Please sign in to comment.