diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index 9f54911f20c29cd2d3eabcdb8fd9c9780c13215b..3355c5619cc386231f3c9cc62a826b246559527d 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -116,7 +116,7 @@ include ../../components/widgets widget-name='cs-display-property' label-detail='' widget-detail='sib-action' - action-detail='mentor-resource-detail' + action-detail='entrepreneur-resource-detail' ) diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug index c986393472edd63c6ebfd7a8bbc6c0ab257f7867..f25db5e55c1de8f8e79836086a5292d73d2e4ab4 100644 --- a/src/includes/public/resources/list.pug +++ b/src/includes/public/resources/list.pug @@ -414,7 +414,7 @@ container.block_list.flex.flex_espace label-fields='' multiple-fields class="panel" - next='entrepreneur-resource-detail' + next='public-resource-detail' paginate-by="5" ) diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 50d88c65dd70320e86ee3b1b0d174da5e298e9de..3774bc0f77e8c659328c4fdd9aa566bf1c9dfb7f 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -66,19 +66,19 @@ function loadFile(event) { /** * Fill datas to a form. - * @param {HTMLElment} detail - Element with the datas to retrieve. + * @param {HTMLElment} element - Element with the datas to retrieve. * @param {string} targetFormName - Id of the form to fill. - * @param {string} inputName - Name of the input to fill. + * @param {string} inputName - Name of the input to fill in the form. */ -function linkDatasetToField(detail, targetFormName, inputName) { +function linkDatasetToField(element, targetFormName, inputName) { let targetForm = document.getElementById(targetFormName); targetForm.addEventListener("populate", event => { let resourceField = targetForm.querySelector(`input[name="${inputName}"]`); if (resourceField) { - resourceField.value = JSON.stringify({ "@id": detail.dataset.src }); + resourceField.value = JSON.stringify({ "@id": element.dataset.src }); resourceField.setAttribute( "value", - JSON.stringify({ "@id": detail.dataset.src }) + JSON.stringify({ "@id": element.dataset.src }) ); } });