summaryrefslogtreecommitdiffstats
path: root/templates/org/settings.tmpl
blob: e19c027d44b0b85655927239717204ee4ee09701 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="body-nav">
    <div class="container">
        <div class="btn-group pull-left" id="dashboard-switch">
            <button type="button" class="btn btn-default">
                <img src="{{.Org.AvatarLink}}?s=28" alt="user-avatar" title="username">
                {{.Org.Name}}
            </button>
        </div>
        <ul class="nav nav-pills pull-right">
            <li><a href="/org/{{.Org.Name}}/dashboard/">News Feed</a></li>
            <li><a href="/org/{{.Org.Name}}/dashboard/issues">Issues</a></li>
            <li class="active"><a href="/org/{{.Org.Name}}/settings">Settings</a></li>
            <!-- <li><a href="/pulls">Pull Requests</a></li>
            <li><a href="/stars">Stars</a></li> -->
        </ul>
    </div>
</div>

<div id="body" class="container" data-page="org">
    <div id="user-setting-nav" class="col-md-2 repo-setting-nav">
        <ul class="list-group">
            <li class="list-group-item active"><a href="#">Options</a></li>
        </ul>
    </div>
    <div id="repo-setting-container" class="col-md-10">
        {{template "base/alert" .}}
        <div class="panel panel-default">
            <div class="panel-heading">
                Organization Options
            </div>

            <div class="panel-body">
                <form action="/org/{{.Org.Name}}/settings" method="post" class="form-horizontal">
                    {{.CsrfTokenHtml}}
                    <input type="hidden" name="action" value="update">

                    <div class="form-group{{if .Err_DisplayName}} has-error has-feedback{{end}}">
                        <label class="col-md-3 text-right" for="org-setting-name">Display Name</label>
                        <div class="col-md-9">
                            <input class="form-control" name="display_name" value="{{.Org.FullName}}" title="" id="org-setting-name"/>
                        </div>
                    </div>

                    <div class="form-group{{if .Err_Email}} has-error has-feedback{{end}}">
                        <label class="col-md-3 text-right" for="org-email">Email</label>
                        <div class="col-md-9">
                            <input class="form-control" name="email" value="{{.Org.Email}}" title="" id="org-email" type="email"/>
                        </div>
                    </div>

                    <div class="form-group{{if .Err_Description}} has-error has-feedback{{end}}">
                        <label class="col-md-3 text-right" for="org-desc">Description</label>
                        <div class="col-md-9">
                            <textarea class="form-control" name="desc" id="org-desc" rows="3">{{.Org.Description}}</textarea>
                        </div>
                    </div>

                    <div class="form-group{{if .Err_Website}} has-error has-feedback{{end}}">
                        <label class="col-md-3 text-right" for="org-site">Official Site</label>
                        <div class="col-md-9">
                            <input type="url" class="form-control" name="site" value="{{.Org.Website}}" id="org-site"/>
                        </div>
                    </div>

                    <div class="form-group{{if .Err_Location}} has-error has-feedback{{end}}">
                        <label class="col-md-3 text-right" for="org-location">Location</label>
                        <div class="col-md-9">
                            <input class="form-control" name="location" value="{{.Org.Location}}" title="" id="org-location"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-9 col-md-offset-3">
                            <button class="btn btn-primary" type="submit">Save Options</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class="panel panel-warning">
            <div class="panel-heading">
                Danger Zone
            </div>
            <div class="panel-body">
                <button type="button" class="btn btn-default pull-right" href="#delete-org-modal" data-toggle="modal">
                    Delete this organization
                </button>
                <dd>
                <dt>Delete this organization</dt>
                <dl>Once you delete this organization and all repositories in, there is no going back. Please be
                    certain.
                </dl>
                </dd>

                <div class="modal fade" id="delete-org-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post"
                              class="modal-content">
                            {{.CsrfTokenHtml}}
                            <input type="hidden" name="action" value="delete">

                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-hidden="true">&times;</button>
                                <h4 class="modal-title" id="myModalLabel">Delete organization</h4>
                            </div>

                            <div class="modal-body">
                                <div class="form-group">
                                    <label>Please enter your organization name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
                                    <input name="organization" class="form-control" type="text"
                                           placeholder="Type your organization name" required="required">
                                </div>
                            </div>

                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                                <button class="btn btn-danger btn-lg">I understand the consequences, delete this
                                    organization
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{template "base/footer" .}}