Skip to content
Snippets Groups Projects
Commit cefb7ffa authored by Ophestra's avatar Ophestra
Browse files

insert placeholders

parent b4dd8606
No related branches found
No related tags found
No related merge requests found
......@@ -9,20 +9,19 @@
<div class="col-lg-6 col-xs-12 form-area">
<div class="form-container">
<div class="section-title title-style-three mb-20">
{{range .}}
<h2>{{.Name}} <span>FORMU</span></h2>
<h2>{{.tournament.Title}} <span>FORMU</span></h2>
</div>
<div class="contact-form">
<form action="#">
<div class="row">
{{if .Team}}
<div class="col-md-12">
<input name="teamName" type="text" placeholder="Takım Adınız">
</div>
<div class="col-md-6">
<input type="text" placeholder="Takım Kaptanınız">
</div>
{{end}}
{{/* {{if .Team}}*/}}
{{/* <div class="col-md-12">*/}}
{{/* <input name="teamName" type="text" placeholder="Takım Adınız">*/}}
{{/* </div>*/}}
{{/* <div class="col-md-6">*/}}
{{/* <input type="text" placeholder="Takım Kaptanınız">*/}}
{{/* </div>*/}}
{{/* {{end}}*/}}
<div class="col-md-6">
<input type="text" placeholder="Adınız">
</div>
......@@ -38,7 +37,6 @@
{{/* {{ end }}*/}}
</div>
{{end}}
<button>Gönder</button>
</form>
</div>
......
......@@ -36,26 +36,26 @@ func registerRoutes() {
// TODO: consume user stuff here
var t *tournament
if id, err := uuid.Parse(context.Param("id")); err != nil {
if config.System.Verbose {
log.Printf("error parsing UUID %s: %s", context.Param("id"), err)
}
context.Redirect(http.StatusTemporaryRedirect, "/")
t := contextTournament(context)
if t == nil {
return
} else {
if t, _, err = getTournament(id); err != nil {
if config.System.Verbose {
log.Printf("error fetching form %s: %s", id.String(), err)
}
context.Redirect(http.StatusTemporaryRedirect, "/")
return
}
}
populateTournament(t)
authText, authRef := getAuthButton(user)
sy, sm, sd := t.StartTime.Date()
dy, dm, dd := t.Deadline.Date()
context.HTML(http.StatusOK, "form.tmpl", gin.H{
"tournament": t,
"auth_text": authText,
"auth_ref": authRef,
"tournament": tournamentPayload{
Title: t.Attributes["title"],
StartTimeString: fmt.Sprintf("%d-%.2d-%.2d", sy, sm, sd),
DeadlineString: fmt.Sprintf("%d-%.2d-%.2d", dy, dm, dd),
TeamSizeString: t.Attributes["size"],
Prize: t.Attributes["prize"],
},
})
})
......@@ -67,6 +67,7 @@ func registerRoutes() {
}
// TODO: handle form submit
context.String(http.StatusOK, "TODO")
})
router.GET("/admin", func(context *gin.Context) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment