From c51afba71a8d4614f74709d5e9c432c2cff3fcf7 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Thu, 1 Dec 2016 23:23:28 +0100 Subject: Add Team Description to the Team Settings (#4652) * draft * Add Team Description to the Team Settings * add tooltips for team description * made changes per PM review * add message when there is no description set in the team * squash --- model/team.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'model/team.go') diff --git a/model/team.go b/model/team.go index d54a809f4..3f05ce83a 100644 --- a/model/team.go +++ b/model/team.go @@ -24,6 +24,7 @@ type Team struct { DeleteAt int64 `json:"delete_at"` DisplayName string `json:"display_name"` Name string `json:"name"` + Description string `json:"description"` Email string `json:"email"` Type string `json:"type"` CompanyName string `json:"company_name"` @@ -130,6 +131,10 @@ func (o *Team) IsValid() *AppError { return NewLocAppError("Team.IsValid", "model.team.is_valid.url.app_error", nil, "id="+o.Id) } + if len(o.Description) > 255 { + return NewLocAppError("Team.IsValid", "model.team.is_valid.description.app_error", nil, "id="+o.Id) + } + if IsReservedTeamName(o.Name) { return NewLocAppError("Team.IsValid", "model.team.is_valid.reserved.app_error", nil, "id="+o.Id) } -- cgit v1.2.3-1-g7c22