From fdcb15ef2256861af7e99c808aa158570b98d10f Mon Sep 17 00:00:00 2001 From: Diatrex Date: Thu, 22 Apr 2021 18:01:26 +0300 Subject: [PATCH] #3553 Ad post contact - Options Design --- .../resources/css/new-create-new.scss | 185 ++++++++++++++++++ .../resources/images/create/contact-edit.svg | 3 + .../resources/images/create/safe-cart.svg | 19 ++ .../resources/js/editContactInformation.js | 15 +- .../resources/views/new-ad/new-create.twig | 119 +++++++---- .../views/new-ad/partials/contact-info.twig | 82 ++++---- 6 files changed, 331 insertions(+), 92 deletions(-) create mode 100644 addons/default/visiosoft/advs-module/resources/css/new-create-new.scss create mode 100644 addons/default/visiosoft/advs-module/resources/images/create/contact-edit.svg create mode 100644 addons/default/visiosoft/advs-module/resources/images/create/safe-cart.svg diff --git a/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss b/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss new file mode 100644 index 000000000..5aaa0782b --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss @@ -0,0 +1,185 @@ +#pageTitle { + margin: 4rem 0; + + h1 { + font-weight: 700; + } + + h2 { + color: #707070; + font-size: 24px; + font-weight: 400; + } +} + +#contactInfo { + background-color: #FBFBFD; + padding: 2.4rem 4rem 4.3rem; + + h3 { + color: #6E5DDB; + font-size: 26px; + margin-bottom: 2rem; + } + + #reachInfo { + font-family: Poppins; + margin-bottom: 2rem; + + p { + color: #4A4A4A; + font-size: 14px; + font-weight: 500; + } + + div { + label { + color: #505050; + font-size: 18px; + font-weight: 400; + } + } + } + + #contactSummary { + font-family: Poppins; + margin-bottom: 2rem; + + label { + font-size: 14px; + color: #4A4A4A; + width: 32.4%; + font-weight: 500; + + input { + box-shadow: 0 1px 2px rgba(0, 0, 0, .04); + font-size: 17px; + padding: 1.1rem 1.5rem; + color: #707070; + } + } + } + + #editContact { + button { + color: #0075FF; + background: none; + font-size: 18px; + + svg { + height: 1.08rem; + width: auto; + } + + span { + margin-left: .75rem; + } + } + } +} + +#mainInfo { + background-color: #FBFBFD; + padding: 2.4rem 4rem 4.3rem; + + h3 { + color: #6E5DDB; + font-size: 26px; + margin-bottom: 2rem; + } + + label { + font-family: Poppins; + font-size: 14px; + color: #4A4A4A; + font-weight: 500; + + input { + box-shadow: 0 1px 2px rgba(0, 0, 0, .04); + font-size: 17px; + padding: 1.1rem 1.5rem; + color: #707070; + } + } + + #stockInput { + & > label { + width: 47.5%; + + &:not(.d-none) + div { + top: .6rem; + } + + &.d-none + div { + margin-bottom: .5rem; + } + } + + div { + width: 47.5%; + position: relative; + + svg { + width: 2.2rem; + height: auto; + } + + label { + position: relative; + top: .25rem; + font-weight: 400; + font-size: 16px; + } + } + } + + #priceInput { + & > div { + ::placeholder { + color: #B9C0CF; + opacity: 1; + } + + :-ms-input-placeholder { + color: #B9C0CF; + } + + ::-ms-input-placeholder { + color: #B9C0CF; + } + + input, select { + box-shadow: 0 1px 2px rgba(0, 0, 0, .04); + font-size: 17px; + padding: 1.1rem 1.5rem; + color: #707070; + } + + &:first-child { + width: 47.5%; + + input { + &:first-child { + width: 83%; + } + + &:last-child { + width: 17%; + } + } + } + + &:last-child { + width: 50.75%; + + input { + width: 83%; + } + + select { + width: 17%; + } + } + } + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/images/create/contact-edit.svg b/addons/default/visiosoft/advs-module/resources/images/create/contact-edit.svg new file mode 100644 index 000000000..3364c1de2 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/images/create/contact-edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/addons/default/visiosoft/advs-module/resources/images/create/safe-cart.svg b/addons/default/visiosoft/advs-module/resources/images/create/safe-cart.svg new file mode 100644 index 000000000..f1b119b11 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/images/create/safe-cart.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js index 7b852843d..2eb662a00 100644 --- a/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js +++ b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js @@ -11,14 +11,21 @@ $('.formEditInfo').on('submit', function (e) { $.ajax({ type: 'POST', - data: form.serialize() + "&action=update", + data: { + action: 'update', + first_name: $('input[name=first_name]', form).val(), + last_name: $('input[name=last_name]', form).val(), + gsm_phone: $('#gsm_phone', form).val(), + office_phone: $('#office_phone', form).val(), + land_phone: $('#land_phone', form).val(), + }, url: '/ajax/update-user-info', success: function (response) { if (response.status == "success") { var profile = response.data; - $('.infoName').html(profile.first_name + " " + profile.last_name); - $('.infoGsmPhone').html(profile.gsm_phone); - $('.infoOfficePhone').html(profile.office_phone); + $('.infoName').val(profile.first_name + " " + profile.last_name); + $('.infoGsmPhone').val(profile.gsm_phone); + $('.infoOfficePhone').val(profile.office_phone); $('.infoLandPhone').html(profile.land_phone); $('#editMyInfo').modal('hide'); diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig index d203ab172..a854c891e 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig @@ -1,7 +1,15 @@ {% extends layout('new-create') %} +{% block styles %} + +{% endblock %} + {% block content %}
+ {% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}
@@ -17,6 +25,12 @@ + +
+

Listing Details

+

Create the ad flawlessly by entering detailed information about your ad.

+
+
@@ -48,38 +62,74 @@ {% include 'visiosoft.module.advs::new-ad/partials/contact-info' %} -
{{ trans('visiosoft.module.advs::field.ad_info') }}
-
-
- {% set fields = form.fields.base().pluck('field_name').all() %} -
-
- {% for field in form.fields.translations('name') %} - {{ field.render({'form': form})|raw }} - {% endfor %} -
-
+
+

{{ trans('visiosoft.module.advs::field.ad_info') }}

-
- {{ form.fields.slug|raw }} -
-
+ {% if setting_value('visiosoft.module.advs::market_place') %} {{ addBlock('new-ad/fields', {'adv': adv})|raw }} {% endif %} -
- -
- {{ form.fields.standard_price.setAttributes({ - 'required' :true - }).input|raw }} + +
+
+ +
+ + +
+
+ +
+ {{ form.fields.standard_price.setAttributes({ + 'class': 'mt-3 border-0', + 'required': true, + }).input|raw }} + + + + + + {% for currency in config_get('streams::currencies.enabled') %} + + {% endfor %} + + +
+
+
+
+ + +
+ + + + + {% set standardPriceValue = form.fields.standard_price.value|split('.') %}
{% endif %} -
- -
{% if not setting_value('visiosoft.module.advs::hide_options_field') %} @@ -275,6 +309,5 @@ {{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }} {{ asset_add("scripts.js", "streams::js/form/form.js") }} {{ asset_add("scripts.js", "streams::js/form/translations.js") }} - {{ asset_add("styles.css", "visiosoft.module.advs::css/new-create.css") }} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/contact-info.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/contact-info.twig index f0f40442e..123d4d6c2 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/contact-info.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/contact-info.twig @@ -1,47 +1,39 @@ -
{{ trans('visiosoft.module.advs::field.contact_info') }}
-
-
-
-
- -
-
- {{ getProfileDetail(auth_user().id).first_name }} - {{ getProfileDetail(auth_user().id).last_name }} -
+
+

{{ trans('visiosoft.module.advs::field.contact_info') }}

+
+

Size nasıl ulaşılsın?

+
+ +
-
-
- -
-
- {{ getProfileDetail(auth_user().id).gsm_phone }} -
-
-
-
- -
-
- {{ getProfileDetail(auth_user().id).office_phone }} -
-
-
-
- -
-
- {{ getProfileDetail(auth_user().id).land_phone }} -
-
-

- - - {{ trans('visiosoft.module.advs::field.update_my_contact_info') }} - -

-
\ No newline at end of file +
+ + + +
+
+ +
+