UI: fixes based on Actionable Feedback from devtalk and frontend changes #40
@ -22,7 +22,7 @@ function appendImageUploadForm() {
|
|||||||
<div class="details flex-grow-1">
|
<div class="details flex-grow-1">
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<label for="${formsetPrefix}-${i}-caption">Caption</label>
|
<label for="${formsetPrefix}-${i}-caption">Caption</label>
|
||||||
<input class="form-control" id="${formsetPrefix}-${i}-caption" type="text" maxlength="255" name="${formsetPrefix}-${i}-caption" placeholder="Describe the preview">
|
<input class="js-input-img-caption form-control" id="${formsetPrefix}-${i}-caption" type="text" maxlength="255" name="${formsetPrefix}-${i}-caption" placeholder="Describe the preview">
|
||||||
</div>
|
</div>
|
||||||
<div class="align-items-center d-flex justify-content-between">
|
<div class="align-items-center d-flex justify-content-between">
|
||||||
<input accept="image/*" class="form-control js-input-img" id="id_${formsetPrefix}-${i}-source" type="file" name="${formsetPrefix}-${i}-source">
|
<input accept="image/*" class="form-control js-input-img" id="id_${formsetPrefix}-${i}-source" type="file" name="${formsetPrefix}-${i}-source">
|
||||||
@ -96,6 +96,9 @@ function resetImgUploadForm() {
|
|||||||
// Find the input image
|
// Find the input image
|
||||||
const inputImg = rowParent.querySelector('.js-input-img');
|
const inputImg = rowParent.querySelector('.js-input-img');
|
||||||
|
|
||||||
|
// Find the input image caption
|
||||||
|
const inputImgCaption = rowParent.querySelector('.js-input-img-caption');
|
||||||
|
|
||||||
// Find the input image thumbnail
|
// Find the input image thumbnail
|
||||||
const inputImgThumbnail = rowParent.querySelector('.js-input-img-thumbnail');
|
const inputImgThumbnail = rowParent.querySelector('.js-input-img-thumbnail');
|
||||||
|
|
||||||
@ -105,6 +108,9 @@ function resetImgUploadForm() {
|
|||||||
// Reset the selected image (if any)
|
// Reset the selected image (if any)
|
||||||
inputImg.value = ''; // Clear the input value
|
inputImg.value = ''; // Clear the input value
|
||||||
|
|
||||||
|
// Reset the selected image caption
|
||||||
|
inputImgCaption.value='';
|
||||||
|
|
||||||
// Reset the selected image thumbnail
|
// Reset the selected image thumbnail
|
||||||
inputImgThumbnail.removeAttribute('style');
|
inputImgThumbnail.removeAttribute('style');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user