diff --git a/src/includes/mentor/profile/edit.pug b/src/includes/mentor/profile/edit.pug index 80fee452f6e424d6e841165cc8e95dd04d3a1845..869dbce4a074e091a63aa272d543bee33b156803 100644 --- a/src/includes/mentor/profile/edit.pug +++ b/src/includes/mentor/profile/edit.pug @@ -5,12 +5,13 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( fields="account_information(last_name, first_name, mentorProfile.organisation,\ mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\ about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\ - mentorProfile.biography, mentorProfile.skills, resources),\ + mentorProfile.biography, mentorProfile.skills),\ social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username" range-mentorProfile.fields=`${endpoints.fields}` range-mentorProfile.organisation=`${endpoints.organisations}` range-mentorProfile.languages=`${endpoints.languages}` + range-mentorProfile.country=`${endpoints.countries}` label-header_about_you=`${data.AboutYou}` label-header_social_media=`${data.AboutYou}` @@ -37,7 +38,9 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( widget-mentorProfile.skills="sib-form-textarea" widget-mentorProfile.biography="sib-form-textarea" widget-username="sib-form-hidden" - widget-resources="hidden-widget" + + class-mentorProfile.country='form-label is-dark' + widget-mentorProfile.country='sib-form-auto-completion' class-mentorProfile.organisation='form-label is-dark' widget-mentorProfile.organisation='sib-form-auto-completion' diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 607582d5950efb7c8b8fdb578d52d5c2d307fa8b..506ec4bc51a859ed8b16aa85a83f0d4150a36ddb 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -93,7 +93,9 @@ function refreshList(formId, listId) { let form = document.getElementById(formId); form.addEventListener("save", event => { let list = document.getElementById(listId); + console.log(list, list.component); list.dataset.src = list.dataset.src; + list.component.resource.clearCache(); }); } @@ -582,13 +584,15 @@ jQuery(document).ready(function($) { //Retrieve the current user let userAccountDataSrc = document.getElementById("user-account-picture"); - //Add the current user as reviewer. - linkDatasetToField(userAccountDataSrc, "validation-form", "reviewer"); - linkDatasetToField(userAccountDataSrc, "improvement-dialog-form", "reviewer"); - linkDatasetToField(userAccountDataSrc, "refusal-dialog-form", "reviewer"); - linkDatasetToField(userAccountDataSrc, "change_status_request", "reviewer"); - // linkDatasetToField(userAccountDataSrc, "add-like", "sender"); - // linkDatasetToField(userAccountDataSrc, "add-dislike", "sender"); + if (userAccountDataSrc) { + //Add the current user as reviewer. + linkDatasetToField(userAccountDataSrc, "validation-form", "reviewer"); + linkDatasetToField(userAccountDataSrc, "improvement-dialog-form", "reviewer"); + linkDatasetToField(userAccountDataSrc, "refusal-dialog-form", "reviewer"); + linkDatasetToField(userAccountDataSrc, "change_status_request", "reviewer"); + // linkDatasetToField(userAccountDataSrc, "add-like", "sender"); + // linkDatasetToField(userAccountDataSrc, "add-dislike", "sender"); + } //On form submission, we sometime have to refresh a list. refreshList("resource-creation-form", "resources-history");