diff --git a/CHANGELOG.md b/CHANGELOG.md index 039dc80..f7cfbf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixes + +* Automatic upload checkbox on upload form #1 + ### Added * "Today So Far" summary on the success page diff --git a/frontend/views/meal/upload.php b/frontend/views/meal/upload.php index 2b62168..c5eee53 100644 --- a/frontend/views/meal/upload.php +++ b/frontend/views/meal/upload.php @@ -43,7 +43,7 @@ $this->registerJS( emojiIndex = (emojiIndex + 1) % foodEmojis.length; // Cycle through emojis }, 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 $('#submitButton').text('Processing...'); $('#submitButton').attr('disabled', true); @@ -100,11 +100,11 @@ $this->registerCssFile('@web/css/upload.css'); ->field($model, 'type') ->radioList($model->getTypeList(), [ 'class' => 'btn-group d-flex justify-content-center', - 'item' => function ($index, $label, $name, $checked, $value) { - $return = ''; - $return .= ''; - return $return; - }, + 'item' => function ($index, $label, $name, $checked, $value) { + $return = ''; + $return .= ''; + return $return; + }, ]) ->label(false); ?> @@ -115,7 +115,6 @@ $this->registerCssFile('@web/css/upload.css');
'submitButton', 'class' => 'btn btn-success']) ?> -