forgejo/templates/install.tmpl

199 lines
8.7 KiB
Cheetah
Raw Normal View History

2014-03-25 08:51:42 +00:00
{{template "base/head" .}}
2014-03-25 10:44:37 +00:00
<div id="body" class="container">
<form action="/install" method="post" class="form-horizontal card" id="install-card">
2014-03-25 08:51:42 +00:00
{{.CsrfTokenHtml}}
2014-03-27 20:31:32 +00:00
<h3>Install Steps For First-time Run</h3>
2014-03-27 12:39:18 +00:00
2014-03-25 08:51:42 +00:00
<div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
2014-03-27 20:31:32 +00:00
<p class="help-block text-center">Gogs requires MySQL or PostgreSQL based on your choice</p>
2014-03-27 12:39:18 +00:00
<div class="form-group">
<label class="col-md-3 control-label">Database Type: </label>
2014-03-25 08:51:42 +00:00
<div class="col-md-8">
2014-03-27 12:39:18 +00:00
<select name="database" id="install-database" class="form-control">
<option value="mysql">MySQL</option>
<option value="pgsql">PostgreSQL</option>
<option value="sqlite">SQLite</option>
</select>
2014-03-25 08:51:42 +00:00
</div>
</div>
2014-03-27 12:39:18 +00:00
<div class="server-sql">
<div class="form-group">
<label class="col-md-3 control-label">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>
2014-03-25 08:51:42 +00:00
</div>
2014-03-27 12:39:18 +00:00
<div class="form-group">
<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>
2014-03-25 08:51:42 +00:00
</div>
2014-03-27 12:39:18 +00:00
<div class="form-group">
<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">
<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>
2014-03-27 20:31:32 +00:00
2014-03-27 12:39:18 +00:00
<div class="form-group">
2014-03-27 20:31:32 +00:00
<label class="col-md-3 control-label">Database Name: </label>
2014-03-27 12:39:18 +00:00
<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>
2014-03-27 20:31:32 +00:00
2014-03-27 12:39:18 +00:00
<div class="form-group pgsql-setting hide">
2014-03-27 20:31:32 +00:00
<label class="col-md-3 control-label">SSL Mode: </label>
2014-03-27 12:39:18 +00:00
<div class="col-md-8">
2014-03-27 20:31:32 +00:00
<select name="ssl_mode" class="form-control">
<option value="disable">Disable</option>
<option value="require">Require</option>
<option value="verify-full">Verify Full</option>
</select>
2014-03-27 12:39:18 +00:00
</div>
2014-03-25 08:51:42 +00:00
</div>
</div>
2014-03-27 12:39:18 +00:00
<div class="sqlite-setting hide">
<div class="form-group">
<label class="col-md-3 control-label">Path: </label>
<div class="col-md-8">
<input name="path" class="form-control" placeholder="Type sqlite file path" value="xxx/file.db">
<p class="help-block">The file path of SQLite database.</p>
</div>
2014-03-25 08:51:42 +00:00
</div>
</div>
2014-03-27 20:31:32 +00:00
<!-- <div class="form-group">
2014-03-25 08:51:42 +00:00
<div class="col-md-8 col-md-offset-3">
2014-03-27 12:39:18 +00:00
<button class="btn btn-sm btn-info">Test Connection</button>
2014-03-25 08:51:42 +00:00
</div>
2014-03-27 20:31:32 +00:00
</div> -->
2014-03-25 08:51:42 +00:00
<hr/>
2014-03-27 20:31:32 +00:00
<p class="help-block text-center">General Settings of Gogs</p>
2014-03-25 08:51:42 +00:00
2014-03-27 12:39:18 +00:00
<div class="form-group">
2014-03-25 08:51:42 +00:00
<label class="col-md-3 control-label">Repository Path: </label>
2014-03-27 12:39:18 +00:00
2014-03-25 08:51:42 +00:00
<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">
2014-03-27 12:39:18 +00:00
2014-03-25 08:51:42 +00:00
<p class="help-block">The git copy of each repository is saved in this directory.</p>
</div>
</div>
2014-03-27 12:39:18 +00:00
<div class="form-group">
<label class="col-md-3 control-label">Run User: </label>
2014-03-25 08:51:42 +00:00
<div class="col-md-8">
<input name="system-user" type="text" class="form-control" placeholder="Type mysql password" value="root" required="required">
2014-03-27 20:31:32 +00:00
<p class="help-block">The user has access to visit and run Gogs.</p>
2014-03-25 08:51:42 +00:00
</div>
</div>
2014-03-27 12:39:18 +00:00
<hr/>
<p class="help-block text-center">Admin Account Settings</p>
<div class="form-group">
<label class="col-md-3 control-label">Username: </label>
<div class="col-md-8">
<input name="repo-path" type="text" class="form-control" placeholder="Type admin user name" value="admin" required="required">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
<div class="col-md-8">
<input name="system-user" type="password" class="form-control" placeholder="Type admin user password" required="required">
</div>
</div>
2014-03-25 08:51:42 +00:00
<hr/>
2014-03-27 12:39:18 +00:00
2014-03-25 08:51:42 +00:00
<div class="form-group text-center">
2014-03-27 20:31:32 +00:00
<button class="btn btn-danger btn-lg">Install Gogs</button>
2014-03-27 12:39:18 +00:00
<button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal">
Advanced Options
</button>
2014-03-25 08:51:42 +00:00
</div>
2014-03-27 12:39:18 +00:00
<div class="modal fade" id="advance-options-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header"><h4 class="modal-title">Advanced Options</h4></div>
<div class="modal-body">
<p class="help-block text-center">Email Service Settings</p>
<div class="form-group">
<label class="col-md-3 control-label">SMTP Host: </label>
<div class="col-md-8">
<input name="repo-path" type="text" class="form-control" placeholder="Type admin user name">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Email: </label>
<div class="col-md-8">
<input name="repo-path" type="text" class="form-control" placeholder="Type admin user name">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
<div class="col-md-8">
<input name="system-user" type="password" class="form-control" placeholder="Type admin user password">
</div>
</div>
<hr/>
<p class="text-center help-block">Notification Settings</p>
<div class="form-group">
2014-03-27 20:31:32 +00:00
<div class="col-md-offset-3 col-md-7">
<div class="checkbox">
<label>
<input name="system-user" type="checkbox">
<strong>Enable Register Confirmation</strong>
</label>
</div>
2014-03-27 12:39:18 +00:00
</div>
</div>
2014-03-27 20:31:32 +00:00
<div class="form-group">
<div class="col-md-offset-3 col-md-7">
<div class="checkbox">
<label>
<input name="system-user" type="checkbox">
<strong>Enable Mail Notification</strong>
</label>
</div>
2014-03-27 12:39:18 +00:00
</div>
</div>
</div>
2014-03-27 20:31:32 +00:00
2014-03-27 12:39:18 +00:00
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Confirm</button>
</div>
</div>
</div>
</div>
2014-03-25 08:51:42 +00:00
</form>
</div>
{{template "base/footer" .}}