summaryrefslogtreecommitdiffstats
path: root/templates/repo/hook_edit.tmpl
blob: c3fe217e37ae3f071644b60ba7b0f3bba2cb1d4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
<div id="body" class="container">
    {{template "repo/setting_nav" .}}
    <div id="repo-setting-container" class="col-md-10">
        {{template "base/alert" .}}
        <form id="repo-hooks-edit-form" action="{{.RepoLink}}/settings/hooks/{{.Webhook.Id}}" method="post">
            {{.CsrfTokenHtml}}
            <div class="panel panel-default">
                <div class="panel-heading">
                    Manage Webhook
                </div>

                <div class="panel-body">
                    <div class="col-md-7">
                        <p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
                        <hr/>
                        <div class="form-group">
                            <label for="payload-url">Payload URL</label>
                            <input id="payload-url" name="url" class="form-control" type="url" required="required" value="{{.Webhook.Url}}" />
                        </div>

                        <div class="form-group">
                            <label for="payload-version">Content type</label>
                            <select id="content-type" name="content_type" class="form-control">
                                <option value="1">application/json</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="payload-secret">Secret</label>
                            <input id="payload-secret" name="secret" class="form-control" type="text" value="{{.Webhook.Secret}}" />
                        </div>
                        <hr/>
                        <div class="form-group">
                            <label>Which events would you like to trigger this webhook?</label>
                            <div class="radio">
                                <label>
                                    <input class="form-control" name="push_only" type="radio" {{if .Webhook.HookEvent.PushOnly}}checked {{end}}name="trigger"/> Just the <i>push</i> event.
                                </label>
                            </div>
                        </div>
                        <hr/>
                        <div class="form-group">
                            <label>
                                <input type="checkbox" name="active" {{if .Webhook.IsActive}}checked{{end}}/>&nbsp;&nbsp;Active
                            </label>
                            <p class="help-block">We will deliver event details when this hook is triggered.</p>
                        </div>
                    </div>
                </div>

                <div class="panel-footer">
                    <button class="btn btn-primary">Update Webhook</button>&nbsp;&nbsp;
                    <a type="button" href="{{.RepoLink}}/settings/hooks?remove={{.Webhook.Id}}" class="btn btn-danger">Delete Webhook</a>
                </div>
            </div>
        </form>
        <div class="panel panel-default">
        	  <div class="panel-heading">
        			<h3 class="panel-title">Recent Deliveries</h3>
        	  </div>
              
        	  <div class="panel-body">
        			Coming soon
        	  </div>
        </div>
    </div>
</div>
{{template "base/footer" .}}