From 3070280d23af66822ccc431390cddb8b4a8026bb Mon Sep 17 00:00:00 2001
From: antoine37120 <ant.dupre@gmail.com>
Date: Tue, 4 Apr 2023 16:37:11 +0200
Subject: [PATCH] feature: tzcld communities edit profile

---
 src/custom-tzcld.js   | 51 ++++++++++++++++++++++++++++++++++++++++++-
 src/styles/index.scss | 31 ++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/src/custom-tzcld.js b/src/custom-tzcld.js
index 939f6ed..913a9b5 100644
--- a/src/custom-tzcld.js
+++ b/src/custom-tzcld.js
@@ -265,7 +265,56 @@ import("./utils.js").then((utils) => {
 
       ></solid-form>
       </template>
-      </solid-widget>`;
+      </solid-widget>
+      <solid-widget name="customtzcld-form-profile-locations-widget">
+      <template>
+      <solid-form
+      class="d-block rowClear"
+      data-src="\${value}"
+      data-holder
+      naked
+      fields="segment11(name), segment12(address, postal_code), segment13(city, department), phones, emails, link, segment14(twitter_link, linkedin_link)"
+      value-profile="\${value}"
+      class-segment11="segment full sm-full rowClear"
+      class-segment12="segment full sm-full rowClear"
+      class-segment13="segment full sm-full rowClear"
+      class-segment14="segment full sm-full rowClear"
+      class-name="segment margin-bottom-medium full sm-full sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-address="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-postal_code="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-city="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-department="segment margin-bottom-medium half sm-full padding-left-small padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading"
+      
+      class-link="segment margin-bottom-medium full sm-full sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-twitter_link="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading"
+      class-linkedin_link="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading"
+
+      label-name="Nom de l'adresse"
+      label-address="Adresse"
+      label-postal_code="Code postal"
+      label-city="Ville"
+      label-department="Département"
+      label-link="URL Site internet"
+      label-twitter_link="URL Twitter"
+      label-linkedin_link="URL Linkedin"
+      multiple-phones
+      widget-phones="customtzcld-form-profile-phone-widget"
+      multiple-phones-label= "Téléphone"
+      multiple-phones-add-label= "Ajouter un téléphone"
+      multiple-phones-remove-label= "Supprimer"
+      multiple-emails
+      widget-emails="customtzcld-form-profile-email-widget"
+      multiple-phones-label= "Téléphone"
+      multiple-emails-add-label= "Ajouter un E-mail"
+      multiple-emails-remove-label= "Supprimer"
+      multiple-emails-remove-class= "multiple-delete"
+      
+      widget-department="solid-form-dropdown-label"
+      range-department="${dataSrc}tzcld-departments/"
+
+    ></solid-form>
+    </template>
+    </solid-widget>`;
         }
       }
     );
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 81df668..b490ff0 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -211,6 +211,37 @@ solid-multiple-form {
     }
   }
 }
+#communities-community-edit {
+  form{
+    &>[name="profile.website"],
+    &>[name="profile.tweeter"],
+    &>[name="profile.facebook"],
+    &>[name="profile.linkedin"],
+    &>[name="profile.instagram"] {
+      label.text-uppercase {
+        text-transform: none;
+        font-size: 16px;
+      }
+    }
+    [name="phones"] {
+      [name="phone"].width-45, [name="phone_type"].width-45  {
+        width: 50%;
+      }
+      [name="phone_public"] {
+        display: none;
+      }
+    }
+    [name="emails"] {
+      [name="email"].width-45, [name="email_type"].width-45  {
+        width: 50%;
+      }
+      [name="email_public"] {
+        display: none;
+      }
+    }
+  }
+
+}
 #members-edit-profile {
   form>[name="email"] label.text-uppercase {
     text-transform: none;
-- 
GitLab