From 42d952e180ac8696b18ecdc66cd46bf1ef5c5ab0 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Mon, 22 Aug 2022 17:58:51 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20=D0=BC=D0=BE=D0=B6=D0=B5=D1=82?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8E=20=D0=BE=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=B5?= =?UTF-8?q?=D1=82=D0=B5=D0=BD=D1=86=D0=B8=D1=8F=D1=85,=20=D1=80=D0=B5?= =?UTF-8?q?=D1=81=D1=83=D1=80=D1=81=D0=B0=D1=85=20=D0=B8=20=D0=B8=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D1=80=D0=B5=D1=81=D0=B0=D1=85=20#9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_ru-RU.ini | 3 +++ routers/web/user/setting/profile.go | 3 +++ services/forms/user_form.go | 3 +++ templates/user/settings/profile.tmpl | 12 ++++++++++++ 4 files changed, 21 insertions(+) diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index 7a3a9bb10d..b056d84c5e 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -494,6 +494,9 @@ follow=Подписаться unfollow=Отписаться heatmap.loading=Загрузка тепловой карты… user_bio=О себе +user_competences=Компетенции +user_resources=Ресурсы +user_interests=Интересы disabled_public_activity=Этот пользователь отключил публичную видимость активности. form.name_reserved=Имя пользователя '%s' зарезервировано. diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go index ddc5a7c47d..255318a8c9 100644 --- a/routers/web/user/setting/profile.go +++ b/routers/web/user/setting/profile.go @@ -121,6 +121,9 @@ func ProfilePost(ctx *context.Context) { ctx.User.Location = form.Location ctx.User.LocationCoordinate = form.LocationCoordinate ctx.User.Description = form.Description + ctx.User.Competences = form.Competences + ctx.User.Resources = form.Resources + ctx.User.Interests = form.Interests ctx.User.KeepActivityPrivate = form.KeepActivityPrivate ctx.User.Visibility = form.Visibility if err := user_model.UpdateUserSetting(ctx.User); err != nil { diff --git a/services/forms/user_form.go b/services/forms/user_form.go index 1ea967ca1b..00d9cba093 100644 --- a/services/forms/user_form.go +++ b/services/forms/user_form.go @@ -247,6 +247,9 @@ type UpdateProfileForm struct { Location string `binding:"MaxSize(50)"` LocationCoordinate string `binding:"MaxSize(255)"` Description string `binding:"MaxSize(1024)"` + Competences string `binding:"MaxSize(1024)"` + Resources string `binding:"MaxSize(1024)"` + Interests string `binding:"MaxSize(1024)"` Visibility structs.VisibleType KeepActivityPrivate bool } diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 18f5ed4b5c..8123c8670a 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -38,6 +38,18 @@ +
+ + +
+
+ + +
+
+ + +