Fixes #1 automatic upload issue

This commit is contained in:
Chris Smith
2025-02-23 18:16:53 +01:00
parent 741078206b
commit 1408f84924
2 changed files with 10 additions and 7 deletions

View File

@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixes
* Automatic upload checkbox on upload form #1
### Added ### Added
* "Today So Far" summary on the success page * "Today So Far" summary on the success page

View File

@@ -43,7 +43,7 @@ $this->registerJS(
emojiIndex = (emojiIndex + 1) % foodEmojis.length; // Cycle through emojis emojiIndex = (emojiIndex + 1) % foodEmojis.length; // Cycle through emojis
}, 1100); // Adjust the interval (in milliseconds) for the desired speed }, 1100); // Adjust the interval (in milliseconds) for the desired speed
$('#mealform-picture').on('change', function(ev) { $('#file-input').on('change', function(ev) {
if (localStorage.getItem('autoUpload') === 'true') { // Check localStorage if (localStorage.getItem('autoUpload') === 'true') { // Check localStorage
$('#submitButton').text('Processing...'); $('#submitButton').text('Processing...');
$('#submitButton').attr('disabled', true); $('#submitButton').attr('disabled', true);
@@ -115,7 +115,6 @@ $this->registerCssFile('@web/css/upload.css');
</div> </div>
<div class="d-grid gap-2 d-md-block"> <div class="d-grid gap-2 d-md-block">
<?= Html::submitButton('Save meal!', ['id' => 'submitButton', 'class' => 'btn btn-success']) ?> <?= Html::submitButton('Save meal!', ['id' => 'submitButton', 'class' => 'btn btn-success']) ?>
</div> </div>
<?php <?php