summaryrefslogtreecommitdiffstats
path: root/templates/install.tmpl
blob: a13f219088e2864932c95044ca6ddc5ada08127e (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
{{template "base/head" .}}
<div id="gogs-body" class="container">
    <form action="/install" method="post" class="form-horizontal gogs-card" id="gogs-install-card">
        {{.CsrfTokenHtml}}
        <h3>Install Steps</h3>
        <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
        <p class="help-block text-center">GoGits need MySQL or PostgreSQL server</p>
        <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label"><strong>MySQL </strong>Host: </label>
            <div class="col-md-8">
                <input name="host" class="form-control" placeholder="Type mysql server ip or domain" value="localhost" required="required">
            </div>
        </div>
        <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">Port: </label>
            <div class="col-md-8">
                <input name="port" class="form-control" placeholder="Type mysql server port" value="3306" required="required">
            </div>
        </div>
        <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">User: </label>
            <div class="col-md-8">
                <input name="user" class="form-control" placeholder="Type mysql username" required="required">
            </div>
        </div>
        <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">Password: </label>
            <div class="col-md-8">
                <input name="passwd" type="password" class="form-control" placeholder="Type mysql password" required="required">
            </div>
        </div>
        <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">Database: </label>
            <div class="col-md-8">
                <input name="database" type="text" class="form-control" placeholder="Type mysql database name" value="gogs" required="required">
                <p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-8 col-md-offset-3">
                   <button class="btn btn-sm btn-info">Test Connection</button>
            </div>
        </div>

        <hr/>

        <p class="help-block text-center">General settings for GoGits</p>

        <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">Repository Path: </label>
            <div class="col-md-8">
                <input name="repo-path" type="text" class="form-control" placeholder="Type your repository directory" value="/var/gogs/repostiory" required="required">
                <p class="help-block">The git copy of each repository is saved in this directory.</p>
            </div>
        </div>
        <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
            <label class="col-md-3 control-label">System User: </label>
            <div class="col-md-8">
                <input name="system-user" type="text" class="form-control" placeholder="Type mysql password" value="root" required="required">
                <p class="help-block">The user has access to visit and run GoGits.</p>
            </div>
        </div>
        <hr/>
        <div class="form-group text-center">
            <a class="btn btn-danger btn-lg">Install GoGits</a>
        </div>
    </form>
</div>
{{template "base/footer" .}}