Browse Source

Добавлена возможность редактирования компетенций и ресурсов сообщества #9

pull/100/head
Artur Galyamov 2 years ago
parent
commit
265e8e6337
  1. 2
      options/locale/locale_ru-RU.ini
  2. 2
      routers/web/org/setting.go
  3. 2
      services/forms/org.go
  4. 8
      templates/org/settings/options.tmpl

2
options/locale/locale_ru-RU.ini

@ -2204,6 +2204,8 @@ lower_repositories=Проекты
create_new_team=Создание команды
create_team=Создать команду
org_desc=Описание
org_competences=Компетенции
org_resources=Ресурсы
team_name=Название команды
team_desc=Описание
team_name_helper=Названия команд должны быть короткими и запоминающимися.

2
routers/web/org/setting.go

@ -98,6 +98,8 @@ func SettingsPost(ctx *context.Context) {
org.FullName = form.FullName
org.Description = form.Description
org.Competences = form.Competences
org.Resources = form.Resources
org.Website = form.Website
org.Location = form.Location
org.LocationCoordinate = form.LocationCoordinate

2
services/forms/org.go

@ -40,6 +40,8 @@ type UpdateOrgSettingForm struct {
Name string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
FullName string `binding:"MaxSize(100)"`
Description string `binding:"MaxSize(1024)"`
Competences string `binding:"MaxSize(1024)"`
Resources string `binding:"MaxSize(1024)"`
Website string `binding:"ValidUrl;MaxSize(255)"`
Location string `binding:"MaxSize(50)"`
LocationCoordinate string `binding:"MaxSize(255)"`

8
templates/org/settings/options.tmpl

@ -27,6 +27,14 @@
<label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
<textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
</div>
<div class="field {{if .Err_Competences}}error{{end}}">
<label for="competences">{{$.i18n.Tr "org.org_competences"}}</label>
<textarea id="competences" name="competences" rows="2">{{.Org.Competences}}</textarea>
</div>
<div class="field {{if .Err_Resources}}error{{end}}">
<label for="resources">{{$.i18n.Tr "org.org_resources"}}</label>
<textarea id="resources" name="resources" rows="2">{{.Org.Resources}}</textarea>
</div>
<div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.i18n.Tr "org.settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.Org.Website}}">

Loading…
Cancel
Save