Skip to content
Snippets Groups Projects
Commit 5ac3d1ca authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Merge branch 'Set-JsDoc' of...

Merge branch 'Set-JsDoc' of git.happy-dev.fr:startinblox/applications/coop-starter/coopstarter-front into Set-JsDoc
parents af0e1380 23ffe704
No related branches found
No related tags found
1 merge request!94Little fix on redirection.
......@@ -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'
)
......
......@@ -422,7 +422,6 @@ container.block_list.flex.flex_espace
label-fields=''
multiple-fields
class="panel"
next='public-resource-detail'
paginate-by="5"
......
......@@ -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 })
);
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment