Skip to content

LUT-29886 Add warning message #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ createEntry.labelChooseGalleryImage=Image gallery
createEntry.labelIllustrationPicture=Illustration picture
createEntry.labelIllustrationPictureHelp=Upload an image in JPG or PNG format.

createEntry.warning.upload.inprogress=Upload in progress. Please wait...

createEntry.defaultTodayDate=Default date set to current day
createEntry.labelDisableQuestion=Disable question
createEntry.labelDisableQuestionHelp=If checked, the question will no longer be visible when filling a form in BO or FO. If responses have already been entered in this question, the answers will still be visible in the answer summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,8 @@ createEntry.labelChooseGalleryImage=Galerie image
createEntry.labelIllustrationPicture=Image d'illustration
createEntry.labelIllustrationPictureHelp=Charger une image au format JPG ou PNG.

createEntry.warning.upload.inprogress=Upload en cours. Merci d'attendre...

createEntry.defaultTodayDate=Date par d\u00e9faut \u00e0 la date du jour
createEntry.labelDisableQuestion=D\u00e9sactiver la question
createEntry.labelDisableQuestionHelp=Si coch\u00e9e, la question ne sera plus visible \u00e0 la saisie en BO ou en FO. Si des r\u00e9ponses ont d\u00e9j\u00e0 \u00e9t\u00e9 saisie dans cette question, les r\u00e9ponses seront toujours visibles dans le r\u00e9sum\u00e9 de la r\u00e9ponse.
Expand Down
26 changes: 25 additions & 1 deletion webapp/WEB-INF/templates/skin/plugins/forms/step_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,28 @@
<#if form.countResponses>#i18n{forms.createEntry.manageField.labelFieldNumber}: ${form.currentNumberResponse}</#if>
${stepContent!}
${formBottomBreadcrumb!}
</form>
</form>
<div id="upload-info-message" class="alert alert-warning text-center d-none" role="alert">
#i18n{forms.createEntry.warning.upload.inprogress}
</div>
<script>
let isUploading = false;

$(document).on('fileuploadstart', function () {
isUploading = true;

});

$(document).on('fileuploadstop', function () {
isUploading = false;
$('#upload-info-message').addClass('d-none');
});

$('#form-validate').on('submit', function(e) {
if (isUploading) {
e.preventDefault();
$('#upload-info-message').removeClass('d-none');
}
});

</script>