1
1
mirror of https://github.com/go-gitea/gitea synced 2024-09-27 06:44:06 +00:00

Rename boardtype -> templatetype on template and form

This commit is contained in:
Lunny Xiao 2024-03-31 21:58:38 +08:00
parent 311a82ff72
commit f3554db10a
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
4 changed files with 8 additions and 18 deletions

View File

@ -174,7 +174,7 @@ func NewProjectPost(ctx *context.Context) {
Title: form.Title,
Description: form.Content,
CreatorID: ctx.Doer.ID,
TemplateType: form.BoardType,
TemplateType: form.TemplateType,
CardType: form.CardType,
}

View File

@ -154,7 +154,7 @@ func NewProjectPost(ctx *context.Context) {
Title: form.Title,
Description: form.Content,
CreatorID: ctx.Doer.ID,
TemplateType: form.BoardType,
TemplateType: form.TemplateType,
CardType: form.CardType,
Type: project_model.TypeRepository,
}); err != nil {

View File

@ -506,20 +506,10 @@ func (i IssueLockForm) HasValidReason() bool {
// CreateProjectForm form for creating a project
type CreateProjectForm struct {
Title string `binding:"Required;MaxSize(100)"`
Content string
BoardType project_model.TemplateType // NOTE: don't change the name except you know what you are doing
CardType project_model.CardType
}
// UserCreateProjectForm is a from for creating an individual or organization
// form.
type UserCreateProjectForm struct {
Title string `binding:"Required;MaxSize(100)"`
Content string
BoardType project_model.TemplateType
CardType project_model.CardType
UID int64 `binding:"Required"`
Title string `binding:"Required;MaxSize(100)"`
Content string
TemplateType project_model.TemplateType // NOTE: don't change the name except you know what you are doing
CardType project_model.CardType
}
// EditProjectColumnForm is a form for editing a project column

View File

@ -25,11 +25,11 @@
<div class="field">
<label>{{ctx.Locale.Tr "repo.projects.template.desc"}}</label>
<div class="ui selection dropdown">
<input type="hidden" name="board_type" value="{{.type}}">
<input type="hidden" name="template_type" value="{{.type}}">
<div class="default text">{{ctx.Locale.Tr "repo.projects.template.desc_helper"}}</div>
<div class="menu">
{{range $element := .TemplateConfigs}}
<div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{ctx.Locale.Tr $element.Translation}}</div>
<div class="item" data-id="{{$element.TemplateType}}" data-value="{{$element.TemplateType}}">{{ctx.Locale.Tr $element.Translation}}</div>
{{end}}
</div>
</div>