From f5e7be99c15030b78be9da7a39d3512e769c9179 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Tue, 13 Apr 2021 23:48:28 +0200 Subject: [PATCH] patch: profile-edit + profile - rework on addresses --- src/locales/en.json | 4 +- src/locales/es.json | 4 +- src/locales/fr.json | 4 +- src/styles/admin-circles/_index.scss | 32 ++++++++-- .../communities/page-community-edit.pug | 61 +++++++++++-------- .../communities/page-community-profile.pug | 2 +- 6 files changed, 71 insertions(+), 36 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 2476aa4..f5a5e7c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -174,8 +174,8 @@ "labelPicture1": "Picture 1", "labelPicture2": "Picture 2", "labelPicture3": "Picture 3", - "labelAddressLine1": "Address Line 1", - "labelAddressLine2": "Address Line 2", + "labelAddressLine1": "New address line 1", + "labelAddressLine2": "New address line 2", "labelLogo": "Community Logo", "subTitle": "Pictures", "subTitle1": "Address", diff --git a/src/locales/es.json b/src/locales/es.json index bdd5020..c61ea85 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -174,8 +174,8 @@ "labelPicture1": "Foto 1", "labelPicture2": "Foto 2", "labelPicture3": "Foto 3", - "labelAddressLine1": "Línea de dirección 1", - "labelAddressLine2": "Línea de dirección 2", + "labelAddressLine1": "Nueva línea de dirección 1", + "labelAddressLine2": "Nueva línea de dirección 2", "labelLogo": "Logotipo comunitario", "subTitle": "Foto", "subTitle1": "Dirección", diff --git a/src/locales/fr.json b/src/locales/fr.json index 22571ba..433cbf3 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -172,8 +172,8 @@ "labelPicture1": "Photo 1", "labelPicture2": "Photo 2", "labelPicture3": "Photo 3", - "labelAddressLine1": "Adresse ligne 1", - "labelAddressLine2": "Adresse ligne 2", + "labelAddressLine1": "Nouvelle adresse ligne 1", + "labelAddressLine2": "Nouvelle adresse ligne 2", "labelLogo": "Logo de la communauté", "subTitle": "Photos", "subTitle1": "Adresse", diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 695e3dc..7ac883d 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -125,16 +125,19 @@ .community-profile solid-multiple { - &::before { + [name="address_line1"]::before { font-family: 'material-design-icons'; content: "\F34E"; position: relative; top: 2px; + color: var(--color-third); + font-size: 20px; + margin-right: 10px; } [name="address_line2"] { display: block; - margin-left: 33px; + margin-left: 30px; } } @@ -225,9 +228,7 @@ position: relative; button { - position: absolute; - top: 86px; - right: 0; + margin-top: 10px; color: #636363; font-weight: bold; line-height: 19px; @@ -241,6 +242,27 @@ } } + .edit-address { + + form { + display: table-row; + } + + .segment.table-cell { + display: table-cell; + border-bottom: 1px solid #C9C8C8; + border-right: 1px solid #C9C8C8; + height: 60px; + padding: 10px; + vertical-align: middle; + width: 250px; + } + + input[type='submit'] { + display: none; + } + } + @media (max-width: 768px) { .tabs { diff --git a/src/views/partials/communities/page-community-edit.pug b/src/views/partials/communities/page-community-edit.pug index 57cca4a..3ac610b 100644 --- a/src/views/partials/communities/page-community-edit.pug +++ b/src/views/partials/communities/page-community-edit.pug @@ -35,11 +35,11 @@ div.bg-color-white label-profile.linkedin="" label-profile.instagram="" - class-profile.shortDescription="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - class-profile.description="segment margin-bottom-medium full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.shortDescription="segment margin-bottom-medium full text-small text-semibold text-uppercase text-color-heading" + class-profile.description="segment margin-bottom-medium full text-small text-semibold text-uppercase text-color-heading" class-segment="segment full" - class-logo="edit-img edit-logo segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-logo="edit-img edit-logo segment margin-bottom-medium full sm-padding-none text-small text-semibold text-uppercase text-color-heading" class-profile.website="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none" class-profile.email="segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none" class-profile.phone="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" @@ -93,27 +93,15 @@ div.bg-color-white h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans="communities.edit.subTitle1") - solid-form.form( - bind-resources - nested-field="addresses" - fields="address_line1, address_line2" - - label-address_line1="" - label-address_line2="" - - class-address_line1="segment half sm-full sm-margin-bottom-xsmall padding-right-small text-small text-semibold text-uppercase text-color-heading" - class-address_line2="segment half sm-full sm-margin-bottom-xsmall padding-left-small text-small text-semibold text-uppercase text-color-heading" - - widget-community="solid-form-hidden" - widget-address_line1="solid-form-label-text" - widget-address_line2="solid-form-label-text" - - submit-button="" - submit-widget="button" - - data-trans="label-address_line1=communities.edit.labelAddressLine1;label-address_line2=communities.edit.labelAddressLine2" - ) - + solid-widget(name=`hubl-communities-edit-delete-button`) + template + solid-delete( + class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered' + data-src="${src}" + data-label='' + data-trans='' + ) + .segment.table-wrapper.margin-top-medium .table div.table-header.bg-color-third.text-color-heading @@ -142,5 +130,30 @@ div.bg-color-white widget-remove='hubl-circle-edit-members-delete' ) + solid-form.form.table-body.edit-address( + bind-resources + nested-field="addresses" + fields="segment1(address_line1), segment2(address_line2), segment3(deleteButton)" + + placeholder-address_line1="" + placeholder-address_line2="" + + class-segment1='segment table-cell third' + class-segment2='segment table-cell third' + class-segment3='segment table-cell third text-center' + + class-address_line1="segment full text-small" + class-address_line2="segment full text-small" + + widget-community="solid-form-hidden" + widget-address_line1="solid-form-placeholder-text" + widget-address_line2="solid-form-placeholder-text" + + action-deleteButton="" + widget-deleteButton=`hubl-communities-edit-delete-button` + + data-trans="placeholder-address_line1=communities.edit.labelAddressLine1;placeholder-address_line2=communities.edit.labelAddressLine2" + ) + solid-ac-checker(no-permission="acl:Write", bind-resources) span(data-trans="communities.edit.noPermission") diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 66399d4..59dcc9b 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -30,7 +30,7 @@ div.community-profile.padding-medium.sm-padding-none class-segment7="segment lg-hidden sm-full" class-segment8="segment two-third sm-full padding-bottom-large padding-bottom-xxsmall sm-text-left" - class-addresses="segment block margin-bottom-xsmall icon icon-third icon-large icon-margin-right-xsmall" + class-addresses="segment block margin-bottom-xsmall" class-members="segment block margin-bottom-xsmall" class-profile.website="segment block" class-profile.email="segment block"