Skip to content

Commit

Permalink
edit description on nall photos #2198
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeneuvrier committed Mar 27, 2024
1 parent b972007 commit 7263294
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ document.querySelectorAll('.btn-signalement-file-edit').forEach(swbtn => {
document.querySelector('#file-edit-fileid').value = target.getAttribute('data-file-id')

const selectedDocumentType = target.getAttribute('data-documentType');
if (target.getAttribute('data-description') || selectedDocumentType === 'PHOTO_VISITE') {
// if (target.getAttribute('data-description') || selectedDocumentType === 'PHOTO_VISITE') {
document.querySelector('#fileDescription').value = target.getAttribute('data-description')
document.querySelector('#fr-modal-edit-file-description').classList.remove('fr-hidden')
}else {
document.querySelector('#fileDescription').value = ''
document.querySelector('#fr-modal-edit-file-description').classList.add('fr-hidden')
}
// }else {
// document.querySelector('#fileDescription').value = ''
// document.querySelector('#fr-modal-edit-file-description').classList.remove('fr-hidden')
// }

const documentTypes = JSON.parse(target.getAttribute('data-documentType-list'));
let typeSelectBox = document.querySelector('#document-type-select');
Expand Down
12 changes: 6 additions & 6 deletions templates/back/signalement/view/edit-modals/edit-file.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@
<br>
<span class="fr-modal-file-edit-infos"></span>
</div>
</div>

<div id="fr-modal-edit-file-description" class="fr-input-group fr-hidden fr-col-12 fr-mb-2w">
<label class="fr-label" for="fileDescription">Description : </label>
<input class="fr-input" type="text" id="fileDescription" name="description">
</div>
</div>

<div class="fr-select-group">
<select class="fr-select" name="documentType" id="document-type-select">
Expand All @@ -35,6 +30,11 @@
<select class="fr-select fr-hidden" name="desordreSlug" id="desordre-slug-select">
</select>
</div>

<div id="fr-modal-edit-file-description" class="fr-input-group fr-hidden fr-col-12 fr-mb-2w">
<label class="fr-label" for="fileDescription">Description : </label>
<input class="fr-input" type="text" id="fileDescription" name="description">
</div>
</div>

<div class="fr-modal__footer">
Expand Down

0 comments on commit 7263294

Please sign in to comment.