From 373dfa54f88c78b4d864b8afd00cff0e06a86887 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Thu, 28 Jul 2022 18:48:25 +0500 Subject: [PATCH 1/3] =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D1=82=D0=BE=D1=80=20=D0=BC=D0=BE=D0=B6=D0=B5?= =?UTF-8?q?=D1=82=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BF=D0=BE=D0=BB=D0=B5=20"=D0=9E?= =?UTF-8?q?=20=D1=81=D0=B5=D0=B1=D0=B5"=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/web/admin/users.go | 1 + services/forms/admin.go | 1 + templates/admin/user/edit.tmpl | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go index 8aaa654a39..4b94fe9e10 100644 --- a/routers/web/admin/users.go +++ b/routers/web/admin/users.go @@ -371,6 +371,7 @@ func EditUserPost(ctx *context.Context) { emailChanged := !strings.EqualFold(u.Email, form.Email) u.Email = form.Email u.Website = form.Website + u.Description = form.Description u.Location = form.Location u.LocationCoordinate = form.LocationCoordinate u.MaxRepoCreation = form.MaxRepoCreation diff --git a/services/forms/admin.go b/services/forms/admin.go index 435e5d4c15..38dcf9f219 100644 --- a/services/forms/admin.go +++ b/services/forms/admin.go @@ -41,6 +41,7 @@ type AdminEditUserForm struct { Email string `binding:"Required;Email;MaxSize(254)"` Password string `binding:"MaxSize(255)"` Website string `binding:"ValidUrl;MaxSize(255)"` + Description string Location string `binding:"MaxSize(50)"` LocationCoordinate string `binding:"MaxSize(255)"` MaxRepoCreation int diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index f88e2bbc56..531101a2a9 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -73,6 +73,12 @@

{{.i18n.Tr "admin.users.password_helper"}}

+
+ + +
From 052d2440bdb81068e55f2d4aecf8b395483047ff Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Thu, 28 Jul 2022 19:04:59 +0500 Subject: [PATCH 2/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0,=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F=D0=BB=D0=B8=D1=81?= =?UTF-8?q?=D1=8C=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B1=D0=B5=D0=BB=D1=8B=20=D0=B2=D0=BD=D0=B0=D1=87=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/forms/admin.go | 2 +- templates/admin/user/edit.tmpl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/services/forms/admin.go b/services/forms/admin.go index 38dcf9f219..8a4aaaed50 100644 --- a/services/forms/admin.go +++ b/services/forms/admin.go @@ -41,7 +41,7 @@ type AdminEditUserForm struct { Email string `binding:"Required;Email;MaxSize(254)"` Password string `binding:"MaxSize(255)"` Website string `binding:"ValidUrl;MaxSize(255)"` - Description string + Description string `binding:"MaxSize(1024)"` Location string `binding:"MaxSize(50)"` LocationCoordinate string `binding:"MaxSize(255)"` MaxRepoCreation int diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 531101a2a9..7487baf947 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -75,9 +75,7 @@
- +
From 2b36ec27962fdc833892055d99878edd4ee509e2 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Thu, 28 Jul 2022 19:43:03 +0500 Subject: [PATCH 3/3] =?UTF-8?q?=D0=A3=D0=B2=D0=B5=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=20=D0=9E=20=D1=81?= =?UTF-8?q?=D0=B5=D0=B1=D0=B5=20#4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/user/user.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/models/user/user.go b/models/user/user.go index 9312a4e5b5..ac70c242b5 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -89,17 +89,17 @@ type User struct { // is to change his/her password after registration. MustChangePassword bool `xorm:"NOT NULL DEFAULT false"` - LoginType auth.Type - LoginSource int64 `xorm:"NOT NULL DEFAULT 0"` - LoginName string - Type UserType - Location string + LoginType auth.Type + LoginSource int64 `xorm:"NOT NULL DEFAULT 0"` + LoginName string + Type UserType + Location string LocationCoordinate string - Website string - Rands string `xorm:"VARCHAR(32)"` - Salt string `xorm:"VARCHAR(32)"` - Language string `xorm:"VARCHAR(5)"` - Description string + Website string + Rands string `xorm:"VARCHAR(32)"` + Salt string `xorm:"VARCHAR(32)"` + Language string `xorm:"VARCHAR(5)"` + Description string `xorm:"TEXT"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`