mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
milestone: create page
This commit is contained in:
@@ -117,9 +117,9 @@ func (f *CreateIssueForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
|
||||
// \/ \/ \/ \/ \/
|
||||
|
||||
type CreateMilestoneForm struct {
|
||||
Title string `form:"title" binding:"Required;MaxSize(50)"`
|
||||
Content string `form:"content"`
|
||||
Deadline string `form:"due_date"`
|
||||
Title string `binding:"Required;MaxSize(50)"`
|
||||
Content string
|
||||
Deadline string
|
||||
}
|
||||
|
||||
func (f *CreateMilestoneForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
File diff suppressed because one or more lines are too long
@@ -134,6 +134,7 @@ var (
|
||||
|
||||
// I18n settings.
|
||||
Langs, Names []string
|
||||
dateLangs map[string]string
|
||||
|
||||
// Other settings.
|
||||
ShowFooterBranding bool
|
||||
@@ -148,6 +149,14 @@ var (
|
||||
HasRobotsTxt bool
|
||||
)
|
||||
|
||||
func DateLang(lang string) string {
|
||||
name, ok := dateLangs[lang]
|
||||
if ok {
|
||||
return name
|
||||
}
|
||||
return "en"
|
||||
}
|
||||
|
||||
func init() {
|
||||
IsWindows = runtime.GOOS == "windows"
|
||||
log.NewLogger(0, "console", `{"level": 0}`)
|
||||
@@ -353,6 +362,7 @@ func NewConfigContext() {
|
||||
|
||||
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")
|
||||
Names = Cfg.Section("i18n").Key("NAMES").Strings(",")
|
||||
dateLangs = Cfg.Section("i18n.datelang").KeysHash()
|
||||
|
||||
ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool()
|
||||
|
||||
|
Reference in New Issue
Block a user