| 1 | {{ define "page" -}} |
| 2 | <section class="shithub-repo-page"> |
| 3 | {{ template "repo-header" . }} |
| 4 | <section class="shithub-issue-new"> |
| 5 | <header class="shithub-issues-head"> |
| 6 | <h1> |
| 7 | <a href="/{{ .Owner }}/{{ .Repo.Name }}/issues">Issues</a> |
| 8 | <span class="shithub-code-sep">/</span> |
| 9 | New |
| 10 | </h1> |
| 11 | </header> |
| 12 | |
| 13 | {{ if .Error }}<div class="shithub-error" role="alert">{{ .Error }}</div>{{ end }} |
| 14 | |
| 15 | <form method="post" action="/{{ .Owner }}/{{ .Repo.Name }}/issues" class="shithub-issue-form"> |
| 16 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 17 | <label class="shithub-form-row"> |
| 18 | <span>Title</span> |
| 19 | <input type="text" name="title" maxlength="256" required value="{{ .FormTitle }}" autofocus> |
| 20 | </label> |
| 21 | <label class="shithub-form-row"> |
| 22 | <span>Body (Markdown)</span> |
| 23 | <textarea name="body" rows="14" maxlength="65535">{{ .FormBody }}</textarea> |
| 24 | </label> |
| 25 | <div class="shithub-form-actions"> |
| 26 | <a href="/{{ .Owner }}/{{ .Repo.Name }}/issues" class="shithub-button">Cancel</a> |
| 27 | <button type="submit" class="shithub-button shithub-button-primary">Submit new issue</button> |
| 28 | </div> |
| 29 | </form> |
| 30 | </section> |
| 31 | </section> |
| 32 | {{- end }} |