From b539c0478dffb45c89d394336086961f93bd5002 Mon Sep 17 00:00:00 2001
From: Alice <alice.poggioli@hotmail.fr>
Date: Fri, 13 Sep 2019 14:57:59 +0200
Subject: [PATCH] Bug: Refresh the user data on validation of the form creation
 profile.

---
 src/includes/entrepreneur/profile/create.pug | 2 +-
 src/includes/entrepreneur/profile/detail.pug | 4 ++--
 src/includes/mentor/profile/create.pug       | 2 +-
 src/includes/mentor/profile/detail.pug       | 6 +++---
 src/scripts/coopstarter.js                   | 5 +++++
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/includes/entrepreneur/profile/create.pug b/src/includes/entrepreneur/profile/create.pug
index 8eb14484..ce0cb42c 100644
--- a/src/includes/entrepreneur/profile/create.pug
+++ b/src/includes/entrepreneur/profile/create.pug
@@ -10,7 +10,7 @@ figure.logo.img_log
 
 h2.title_create Complete your entrepreneur account
 
-sib-form.block_log.block_creat_count(
+sib-form#entrepreneur_profile_creation.block_log.block_creat_count(
     bind-user
     fields="last_name, first_name, entrepreneur_profile.organisation, username"
     
diff --git a/src/includes/entrepreneur/profile/detail.pug b/src/includes/entrepreneur/profile/detail.pug
index a597bd0c..72c63291 100644
--- a/src/includes/entrepreneur/profile/detail.pug
+++ b/src/includes/entrepreneur/profile/detail.pug
@@ -23,7 +23,7 @@ div.block_list.flex
         sib-link(next='entrepreneur-account-edit')
             button.button_edit Edit
 
-        sib-display(
+        sib-display#entrepreneur_info(
             bind-user
             fields='name, entrepreneur_profile.organisation.name, registered_on'
             widget-name='cs-display-property'
@@ -31,7 +31,7 @@ div.block_list.flex
             widget-entrepreneur_profile.registered_on='cs-display-property'
         )
 
-        sib-display(
+        sib-display#entrepreneur_contact(
             bind-user
             fields='email'
             label-email='Email:'
diff --git a/src/includes/mentor/profile/create.pug b/src/includes/mentor/profile/create.pug
index 96049e4f..17f7c8f7 100644
--- a/src/includes/mentor/profile/create.pug
+++ b/src/includes/mentor/profile/create.pug
@@ -10,7 +10,7 @@ figure.logo.img_log
 
 h2.title_create Complete your mentor account
 
-sib-form.block_log.block_creat_count(
+sib-form#mentor_profile_creation.block_log.block_creat_count(
     bind-user
     fields="account_information(last_name, first_name, mentor_profile.organisation,\
             mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\
diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug
index 00a95bf8..92892b7d 100644
--- a/src/includes/mentor/profile/detail.pug
+++ b/src/includes/mentor/profile/detail.pug
@@ -27,7 +27,7 @@ div.block_list.flex
         sib-link(next='mentor-account-edit')
             button.button_edit Edit
 
-        sib-display(
+        sib-display#mentor_info(
             bind-user
             fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country, registered_on'
             widget-account.picture='cs-profile-picture'
@@ -45,7 +45,7 @@ div.block_list.flex
             bind-user
         )
 
-        sib-display(
+        sib-display#mentor_complementary(
             bind-user
             fields='biography_label, mentor_profile.biography, skills_label, mentor_profile.skills'
             widget-biography_label='cs-display-label'
@@ -56,7 +56,7 @@ div.block_list.flex
             widget-mentor_profile.biography='cs-display-property'
         )
 
-        sib-display(
+        sib-display#mentor_contact(
             bind-user
             fields='email, mentor_profile.phone, mentor_profile.linkedin, mentor_profile.twitter'
             label-email='Email:'
diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js
index b343d81f..295fe98d 100644
--- a/src/scripts/coopstarter.js
+++ b/src/scripts/coopstarter.js
@@ -49,6 +49,11 @@ jQuery(document).ready(function($) {
   refreshList("validation-form", "pending-resources");
   refreshList("refusal-dialog-form", "pending-resources");
   refreshList("improvement-dialog-form", "pending-resources");
+  refreshList("entrepreneur_profile_creation", "entrepreneur_info");
+  refreshList("entrepreneur_profile_creation", "entrepreneur_contact");
+  refreshList("mentor_profile_creation", "mentor_info");
+  refreshList("mentor_profile_creation", "mentor_complementary");
+  refreshList("mentor_profile_creation", "mentor_contact");
 
   const logoutButtons = document.getElementsByClassName("logout-button");
   for (var i = 0; i < logoutButtons.length; i++) {
-- 
GitLab