Receipts and the company logo open in the Picture window: an expense's receipt on its form and quick look, the company logo in Admin Settings Company details and the setup wizard, and the setup account step's avatar; pictureField gains a free crop (shapes free, a frame with corner and edge handles), Trim the edges for logos, an accept option with PDF passthrough for receipts, submit to save the quick look's receipt as soon as it is used, tall and logo boxes and pictureFile for a PDF; a PNG stays PNG where WebP is not taken so a logo keeps its transparency; setup.js loses its image preview and checks and the setup preview CSS is gone; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-16 15:11:45 -05:00
parent eee720ff77
commit ad4899a9ae
11 changed files with 599 additions and 227 deletions

View File

@@ -71,13 +71,10 @@ $first_error = array_key_first($user_errors);
<div class="col-12">
<label class="form-label" for="setupUserAvatar">Avatar</label>
<div class="d-flex gap-3 align-items-center">
<div class="itflow-setup-preview is-round" data-setup-preview="setupUserAvatar"><i class="fas fa-user"></i></div>
<?= pictureField('file', '', userAvatar(0, $user_form['name'] ?? '', '', 'lg'), userAvatar(0, $user_form['name'] ?? '', '', 'lg'),
['round' => true, 'title' => 'Your picture', 'class' => 'itflow-contact-avatar itflow-contact-avatar-lg', 'name' => 'name', 'id' => 'setupUserAvatar']) ?>
<div class="flex-grow-1 min-w-0">
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
<input type="file" class="form-control<?= setupFieldInvalid($user_errors, 'file') ?>" id="setupUserAvatar" name="file" accept="image/jpeg,image/png,image/gif,image/webp" data-setup-image="JPG, PNG, GIF or WebP" data-setup-image-max="<?= SETUP_IMAGE_MAX_BYTES ?>">
</div>
<?= setupFieldError($user_errors, 'file') ?: '<div class="form-text">Optional - JPG, PNG, GIF or WebP, up to 5 MB.</div>' ?>
<?= setupFieldError($user_errors, 'file') ?: '<div class="form-text mt-0">Optional - click it to add a picture.</div>' ?>
</div>
</div>
</div>