+
+ {% set profileForm = form('profile').entry(user.id).get() %}
+ {{ profileForm.open({ 'id': 'profile-detail' })|raw }}
+
+
+
+
+ {{ profileForm.fields.identification_number.input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date(config_get('streams::datetime.date_format'))).input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.facebook_address.input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.google_address.input|raw }}
+
+
+ {% if setting_value('visiosoft.module.profile::show_education_profession') %}
+
+
+
+ {{ profileForm.fields.education.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
+
+
+
+
+
+ {{ profileForm.fields.education_part.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
+
+
+
+
+
+
+
+
+ {% endif %}
+
+
+
+ {{ profileForm.fields.register_type.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
+
+
+
+
+ {{ addBlock('profile/detail/profile-detail-form/actions')|raw }}
-
-
-
- {% set userForm = form('userProfile').entry(user.id).get() %}
- {{ userForm.open()|raw }}
-
-
-

-
-
-
{{ user.name }}
-
- {{ auth_user().last_login_at|date(config_get('streams::datetime.date_format') ~ ' - ' ~ config_get('streams::datetime.time_format')) }}
-
-
-
-
- {{ userForm.close()|raw }}
-
-
-
- {% set profileForm = form('profile').entry(user.id).get() %}
- {{ profileForm.open({ 'id': 'profile-detail' })|raw }}
-
-
- {% if setting_value('visiosoft.module.profile::upload_avatar') %}
-
- {{ profileForm.fields.file|raw }}
-
- {% endif %}
-
-
-
-
- {{ profileForm.fields.identification_number.input|raw }}
-
-
-
-
-
- {{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
-
-
-
-
-
- {{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
-
-
-
-
-
- {{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
-
-
-
-
-
- {{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date(config_get('streams::datetime.date_format'))).input|raw }}
-
-
-
-
-
- {{ profileForm.fields.facebook_address.input|raw }}
-
-
-
-
-
- {{ profileForm.fields.google_address.input|raw }}
-
-
- {% if setting_value('visiosoft.module.profile::show_education_profession') %}
-
-
-
- {{ profileForm.fields.education.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
-
-
-
-
-
- {{ profileForm.fields.education_part.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
-
-
-
-
-
-
-
-
- {% endif %}
-
-
-
- {{ profileForm.fields.register_type.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
-
-
-
-
- {{ addBlock('profile/detail/profile-detail-form/actions')|raw }}
-
- {{ profileForm.actions|raw }}
-
-
-
- {{ profileForm.close()|raw }}
-
-
- {% set passwordForm = form('updatePassword').get() %}
-
- {{ passwordForm.open()|raw }}
-
-
-
-
- {{ passwordForm.fields.old_password.input|raw }}
-
-
-
-
-
- {{ passwordForm.fields.new_password.input|raw }}
-
-
-
-
-
- {{ passwordForm.fields.re_new_password.input|raw }}
-
-
-
-
- {{ passwordForm.actions|raw }}
-
-
- {{ passwordForm.close|raw }}
- {{ addBlock('profile/detail/content')|raw }}
-
-
-
-
-
{% endblock %}
diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig b/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig
index 6feed3884..091a774ac 100644
--- a/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig
+++ b/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig
@@ -11,32 +11,44 @@
-
- {{ img('visiosoft.module.profile::images/social-media.svg').data|raw }}
- {{ trans('visiosoft.module.profile::addon.title') }}
-
- {% set marketPlace = setting_value('visiosoft.module.advs::market_place') %}
- {% if marketPlace %}
-
- {{ img('visiosoft.module.profile::images/website.svg').data|raw }}
- {{ trans('visiosoft.module.advs::addon.title') }}
+
diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/password.twig b/addons/default/visiosoft/profile-module/resources/views/profile/password.twig
new file mode 100644
index 000000000..aa71f8402
--- /dev/null
+++ b/addons/default/visiosoft/profile-module/resources/views/profile/password.twig
@@ -0,0 +1,66 @@
+{% extends "theme::layouts/default" %}
+
+{% block styles %}
+
+{% endblock %}
+
+{% block content %}
+ {% embed 'visiosoft.module.profile::profile/index' %}
+ {% block detail %}
+ {% set profile_photo = user.file %}
+ {% if profile_photo %}
+ {% set profile_photo = file(profile_photo.id).url %}
+ {% else %}
+ {% set profile_photo = img('visiosoft.module.profile::images/profile-default.png').url %}
+ {% endif %}
+
+
+
+
+
+
+
+ {% set passwordForm = form('updatePassword').get() %}
+
+ {{ passwordForm.open()|raw }}
+
+
+
+
+ {{ passwordForm.fields.old_password.input|raw }}
+
+
+
+
+
+ {{ passwordForm.fields.new_password.input|raw }}
+
+
+
+
+
+ {{ passwordForm.fields.re_new_password.input|raw }}
+
+
+
+
+ {{ passwordForm.actions|raw }}
+
+
+ {{ passwordForm.close|raw }}
+ {{ addBlock('profile/detail/content')|raw }}
+
+
+
+
+
+ {% endblock %}
+ {% endembed %}
+
+ {{ asset_script("visiosoft.module.profile::assets/js/education.js") }}
+ {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/profile.js") }}
+{% endblock %}
\ No newline at end of file
diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/profile.twig b/addons/default/visiosoft/profile-module/resources/views/profile/profile.twig
new file mode 100644
index 000000000..e2c2ee060
--- /dev/null
+++ b/addons/default/visiosoft/profile-module/resources/views/profile/profile.twig
@@ -0,0 +1,99 @@
+{% extends "theme::layouts/default" %}
+
+{% block styles %}
+
+{% endblock %}
+
+{% block content %}
+ {% embed 'visiosoft.module.profile::profile/index' %}
+ {% block detail %}
+ {% set profile_photo = user.file %}
+ {% if profile_photo %}
+ {% set profile_photo = file(profile_photo.id).url %}
+ {% else %}
+ {% set profile_photo = img('visiosoft.module.profile::images/profile-default.png').url %}
+ {% endif %}
+
+
+
+
+
+
+
+
+ {% set userForm = form('userProfile').entry(user.id).get() %}
+ {{ userForm.open()|raw }}
+
+
+

+
{{ img('visiosoft.module.profile::images/camera.svg').data|raw }}
+ {% if setting_value('visiosoft.module.profile::upload_avatar') %}
+
+ {{ userForm.fields.file|raw }}
+
+ {% endif %}
+
+
+
{{ user.name }}
+
+ {{ auth_user().last_login_at|date(config_get('streams::datetime.date_format') ~ ' - ' ~ config_get('streams::datetime.time_format')) }}
+
+
+
+
+ {{ userForm.close()|raw }}
+
+
+ {{ addBlock('profile/detail/content')|raw }}
+
+
+
+
+
+ {% endblock %}
+ {% endembed %}
+
+ {{ asset_script("visiosoft.module.profile::assets/js/education.js") }}
+ {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/profile.js") }}
+{% endblock %}
\ No newline at end of file
diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
index 89264aa4e..02b277336 100644
--- a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
+++ b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
@@ -52,10 +52,19 @@ class MyProfileController extends PublicController
$country = CountryModel::all();
- return $this->view->make('visiosoft.module.profile::profile.detail',
+ return $this->view->make('visiosoft.module.profile::profile.profile',
compact('user', 'country', 'form', 'advs_count'));
}
+ public function detail(ProfileFormBuilder $form){
+ $user = $this->userRepository->find(Auth::id());
+ $country = CountryModel::all();
+ return $this->view->make('visiosoft.module.profile::profile.detail', compact('user', 'country', 'form'));
+ }
+
+ public function password(){
+ return $this->view->make('visiosoft.module.profile::profile.password');
+ }
public function extendAds($id, $type, SettingRepositoryInterface $settings)
{
diff --git a/addons/default/visiosoft/profile-module/src/Profile/User/UserFormBuilder.php b/addons/default/visiosoft/profile-module/src/Profile/User/UserFormBuilder.php
index db48ea612..c47234ad1 100644
--- a/addons/default/visiosoft/profile-module/src/Profile/User/UserFormBuilder.php
+++ b/addons/default/visiosoft/profile-module/src/Profile/User/UserFormBuilder.php
@@ -9,6 +9,7 @@ class UserFormBuilder extends FormBuilder
protected $model = UserModel::class;
protected $fields = [
+ 'file',
'first_name' => [
'required' => true,
],
diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
index ea0367054..e057acba9 100644
--- a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
+++ b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
@@ -63,6 +63,14 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
'as' => 'profile::profile',
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@home'
],
+ 'profile/detail' => [
+ 'as' => 'profile::detail',
+ 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@detail'
+ ],
+ 'profile/password' => [
+ 'as' => 'profile::password',
+ 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@password'
+ ],
'profile/class/status/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@statusAds',
'profile/class/extendTime/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds',
'profile/message/show/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage',
diff --git a/addons/default/visiosoft/singlefile-field_type/resources/js/upload.js b/addons/default/visiosoft/singlefile-field_type/resources/js/upload.js
index e0e651d52..5b5130b88 100644
--- a/addons/default/visiosoft/singlefile-field_type/resources/js/upload.js
+++ b/addons/default/visiosoft/singlefile-field_type/resources/js/upload.js
@@ -85,6 +85,14 @@ $(function () {
uploader.find('.uploaded .modal-body').html(element.data('loading') + '...');
- uploader.find('.uploaded').load(REQUEST_ROOT_PATH + '/streams/singlefile-field_type/recent?uploaded=' + uploaded.join(','));
+ $.when(
+ $.get(REQUEST_ROOT_PATH + '/streams/singlefile-field_type/recent?uploaded=' + uploaded.join(','), function(data) {
+ uploader.find('.uploaded').html(data);
+ })
+ ).done(function() {
+ let changedPhoto = new CustomEvent('uploadedSingleField');
+
+ window.dispatchEvent(changedPhoto);
+ });
});
});
diff --git a/composer.json b/composer.json
index 89397c1d0..75a2cbb35 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,6 @@
"anomaly/private_storage_adapter-extension": "~1.1.0",
"anomaly/default_page_handler-extension": "~2.1.0",
"anomaly/user_security_check-extension": "~2.1.0",
- "visiosoft/xml_feed_widget-extension": "~2.1.0",
"anomaly/page_link_type-extension": "~2.1.0",
"anomaly/url_link_type-extension": "~2.1.0",
"anomaly/relationship-field_type": "~2.2.0",