question.html erstellt
This commit is contained in:
parent
2b119f6752
commit
82870e100f
2
main.go
2
main.go
@ -23,7 +23,7 @@ func main() {
|
|||||||
mux.HandleFunc("/search/", server.DisplayResults(db))
|
mux.HandleFunc("/search/", server.DisplayResults(db))
|
||||||
mux.HandleFunc("/new-briefing/", server.DisplayForm(&i))
|
mux.HandleFunc("/new-briefing/", server.DisplayForm(&i))
|
||||||
mux.HandleFunc("/add-participant/", server.AddParticipant(&i))
|
mux.HandleFunc("/add-participant/", server.AddParticipant(&i))
|
||||||
mux.HandleFunc("/submit/", server.SubmitForm(db, &i, &j))
|
mux.HandleFunc("/submit-form/", server.SubmitForm(db, &i, &j))
|
||||||
|
|
||||||
log.Fatalln(http.ListenAndServe(":8080", mux))
|
log.Fatalln(http.ListenAndServe(":8080", mux))
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
{{ template "participant" . }}
|
{{ template "participant" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" hx-post="/submit/" hx-target="#content" hx-swap="innerHTML">
|
<button type="submit" hx-post="/submit-form/" hx-target="#content" hx-swap="innerHTML">
|
||||||
Senden
|
Senden
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
14
templates/question.html
Normal file
14
templates/question.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{ define "question" }}
|
||||||
|
<div id="question-{{ .QuestionNumber }}">
|
||||||
|
<h2>Frage {{ .QuestionNumber }}
|
||||||
|
<p>{{ .Question }}</p
|
||||||
|
<label for="participant-first-input-{{ . }}">Vorname</label>
|
||||||
|
<input type="text" name="participant-first-{{ . }}" id="participant-first-input-{{ . }}" />
|
||||||
|
|
||||||
|
<label for="participant-last-input-{{ . }}">Nachname</label>
|
||||||
|
<input type="text" name="participant-last-{{ . }}" id="participant-last-input-{{ . }}" />
|
||||||
|
|
||||||
|
<label for="participant-company-input-{{ . }}">Firma</label>
|
||||||
|
<input type="text" name="participant-company-{{ . }}" id="participant-company-input-{{ . }}" />
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
x
Reference in New Issue
Block a user