diff --git a/addons/default/visiosoft/advs-module/resources/css/new-create.css b/addons/default/visiosoft/advs-module/resources/css/new-create.css new file mode 100644 index 000000000..a61a3beef --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/new-create.css @@ -0,0 +1,3 @@ +.editContact { + font-size: 13px; +} \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js new file mode 100644 index 000000000..a7ef1b429 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js @@ -0,0 +1,36 @@ +// phoneMask("input[name='gsm_phone'],input[name='office_phone'],input[name='land_phone']") +$('.formEditInfo').on('submit', function (e) { + e.preventDefault(); + var form = $(this); + + crud(form.serialize() + "&action=update", '/ajax/update-user-info', 'POST', function (callback) { + if (callback.status == "success") { + var profile = callback.data; + $('.infoName').html(profile.first_name + " " + profile.last_name); + $('.infoGsmPhone').html(profile.gsm_phone); + $('.infoOfficePhone').html(profile.office_phone); + $('.infoLandPhone').html(profile.land_phone); + $('#editMyInfo').modal('hide'); + } + }) +}) + +$('.editInformationUser').on('click', function () { + $('#editMyInfo').modal('show'); + crud({}, '/ajax/update-user-info', 'POST', function (callback) { + if (callback.status == "success") { + var profile = callback.data; + intlTelInput(document.querySelector("input[name='gsm_phone']"), { + setNumber: profile.gsm_phone + }) + intlTelInput(document.querySelector("input[name='office_phone']"), { + setNumber: profile.office_phone + }) + intlTelInput(document.querySelector("input[name='land_phone']"), { + setNumber: profile.land_phone + }) + $('input[name="first_name"]').val(profile.first_name) + $('input[name="last_name"]').val(profile.last_name) + } + }) +}) \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index bad7dd0ab..45487d61b 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -280,5 +280,9 @@ return [ 'views' => 'Views', // Detail page - "no_street_view" => "No street view image in this location" + "no_street_view" => "No street view image in this location", + 'edit_my_contact_info' => 'Edit My Contact Information', + 'update_my_contact_info' => 'update my contact info', + 'contact_info' => 'Contact information', + 'ad_info' => 'İlan Bilgileri', ]; 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 7f3807edb..43413da49 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 @@ -38,6 +38,59 @@