New Sign in

fierj

Public

Tiny personal git forge

← fierj / templates / patch_new.html
{{template "head" .}}
{{define "title"}}new patch - {{.Repo}} - fierj{{end}}
{{template "repo-header" .}}
{{template "repo-tabs" .}}

<div class="thread-new-form">
    <h2>New Patch</h2>
    <form method="POST" action="/{{.Repo}}/patches/new" enctype="multipart/form-data">
        <input type="hidden" name="csrf_token" value="{{.CSRF}}">
        <div class="form-group">
            <label for="title">Title</label>
            <input type="text" id="title" name="title" placeholder="Brief description of the change" required>
        </div>
        <div class="form-group">
            <label for="body">Description</label>
            <textarea id="body" name="body" rows="4" placeholder="What does this change do?"></textarea>
        </div>

        {{if .FreeBranches}}
        <div class="form-group">
            <label for="branch">From branch (internal)</label>
            <select id="branch" name="branch">
                <option value="">— select branch or upload patch file —</option>
                {{range .FreeBranches}}
                <option value="{{.}}">{{.}}</option>
                {{end}}
            </select>
        </div>
        <p style="color: var(--text-secondary); font-size: 0.85rem; margin: var(--space-sm) 0;">— or —</p>
        {{end}}

        <div class="form-group">
            <label for="patch_file">Upload .patch file (external)</label>
            <input type="file" id="patch_file" name="patch_file" accept=".patch,.diff">
        </div>

        <button type="submit" class="btn btn-primary">Submit patch</button>
    </form>
</div>
{{template "foot" .}}