You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.6 KiB

  1. {{template "base/head" .}}
  2. <div id="gogs-body" class="container">
  3. <form action="/install" method="post" class="form-horizontal gogs-card" id="gogs-install-card">
  4. {{.CsrfTokenHtml}}
  5. <h3>Install Steps</h3>
  6. <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
  7. <p class="help-block text-center">GoGits need MySQL or PostgreSQL server</p>
  8. <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
  9. <label class="col-md-3 control-label"><strong>MySQL </strong>Host: </label>
  10. <div class="col-md-8">
  11. <input name="host" class="form-control" placeholder="Type mysql server ip or domain" value="localhost" required="required">
  12. </div>
  13. </div>
  14. <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
  15. <label class="col-md-3 control-label">Port: </label>
  16. <div class="col-md-8">
  17. <input name="port" class="form-control" placeholder="Type mysql server port" value="3306" required="required">
  18. </div>
  19. </div>
  20. <div class="form-group {{if .Err_User}}has-error has-feedback{{end}}">
  21. <label class="col-md-3 control-label">User: </label>
  22. <div class="col-md-8">
  23. <input name="user" class="form-control" placeholder="Type mysql username" required="required">
  24. </div>
  25. </div>
  26. <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
  27. <label class="col-md-3 control-label">Password: </label>
  28. <div class="col-md-8">
  29. <input name="passwd" type="password" class="form-control" placeholder="Type mysql password" required="required">
  30. </div>
  31. </div>
  32. <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
  33. <label class="col-md-3 control-label">Database: </label>
  34. <div class="col-md-8">
  35. <input name="database" type="text" class="form-control" placeholder="Type mysql database name" value="gogs" required="required">
  36. <p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <div class="col-md-8 col-md-offset-3">
  41. <button class="btn btn-sm btn-info">Test Connection</button>
  42. </div>
  43. </div>
  44. <hr/>
  45. <p class="help-block text-center">General settings for GoGits</p>
  46. <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
  47. <label class="col-md-3 control-label">Repository Path: </label>
  48. <div class="col-md-8">
  49. <input name="repo-path" type="text" class="form-control" placeholder="Type your repository directory" value="/var/gogs/repostiory" required="required">
  50. <p class="help-block">The git copy of each repository is saved in this directory.</p>
  51. </div>
  52. </div>
  53. <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
  54. <label class="col-md-3 control-label">System User: </label>
  55. <div class="col-md-8">
  56. <input name="system-user" type="text" class="form-control" placeholder="Type mysql password" value="root" required="required">
  57. <p class="help-block">The user has access to visit and run GoGits.</p>
  58. </div>
  59. </div>
  60. <hr/>
  61. <div class="form-group text-center">
  62. <a class="btn btn-danger btn-lg">Install GoGits</a>
  63. </div>
  64. </form>
  65. </div>
  66. {{template "base/footer" .}}