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.

110 lines
7.4 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="admin-wrapper">
  4. <div id="setting-wrapper" class="main-wrapper">
  5. <div id="admin-setting" class="container clear">
  6. {{template "admin/nav" .}}
  7. <div class="grid-4-5 left">
  8. <div class="setting-content">
  9. {{template "ng/base/alert" .}}
  10. <div id="setting-content">
  11. <div class="panel panel-radius">
  12. <div class="panel-header">
  13. <strong>{{.i18n.Tr "admin.auths.new"}}</strong>
  14. </div>
  15. <form class="form form-align panel-body" id="repo-setting-form" action="{{AppSubUrl}}/admin/auths/new" method="post">
  16. {{.CsrfTokenHtml}}
  17. <div class="field">
  18. <label class="req">{{.i18n.Tr "admin.auths.auth_type"}}</label>
  19. <select id="auth-type" name="type">
  20. {{range $key, $val := .LoginTypes}}
  21. <option value="{{$key}}">{{$val}}</option>
  22. {{end}}
  23. </select>
  24. </div>
  25. <div class="field">
  26. <label class="req" for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
  27. <input class="ipt ipt-large ipt-radius {{if .Err_AuthName}}ipt-error{{end}}" id="name" name="name" value="{{.name}}" required />
  28. </div>
  29. <div class="ldap">
  30. <div class="field">
  31. <label class="req" for="domain">{{.i18n.Tr "admin.auths.domain"}}</label>
  32. <input class="ipt ipt-large ipt-radius {{if .Err_Domain}}ipt-error{{end}}" id="domain" name="domain" value="{{.domain}}" />
  33. </div>
  34. <div class="field">
  35. <label class="req" for="host">{{.i18n.Tr "admin.auths.host"}}</label>
  36. <input class="ipt ipt-large ipt-radius {{if .Err_Host}}ipt-error{{end}}" id="host" name="host" value="{{.host}}" />
  37. </div>
  38. <div class="field">
  39. <label class="req" for="port">{{.i18n.Tr "admin.auths.port"}}</label>
  40. <input class="ipt ipt-large ipt-radius {{if .Err_Port}}ipt-error{{end}}" id="port" name="port" value="{{.port}}" />
  41. </div>
  42. <div class="field">
  43. <label class="req" for="base_dn">{{.i18n.Tr "admin.auths.base_dn"}}</label>
  44. <input class="ipt ipt-large ipt-radius {{if .Err_BaseDN}}ipt-error{{end}}" id="base_dn" name="base_dn" value="{{.base_dn}}" />
  45. </div>
  46. <div class="field">
  47. <label class="req" for="attributes">{{.i18n.Tr "admin.auths.attributes"}}</label>
  48. <input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attributes" name="attributes" value="{{.attributes}}" />
  49. </div>
  50. <div class="field">
  51. <label class="req" for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
  52. <input class="ipt ipt-large ipt-radius {{if .Err_Filter}}ipt-error{{end}}" id="filter" name="filter" value="{{.filter}}" />
  53. </div>
  54. <div class="field">
  55. <label class="req" for="ms_ad_sa">{{.i18n.Tr "admin.auths.ms_ad_sa"}}</label>
  56. <input class="ipt ipt-large ipt-radius {{if .Err_MsAdSA}}ipt-error{{end}}" id="ms_ad_sa" name="ms_ad_sa" value="{{.ms_ad_sa}}" />
  57. </div>
  58. </div>
  59. <div class="smtp hidden">
  60. <div class="field">
  61. <label class="req">{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
  62. <select name="smtpauth">
  63. {{range .SMTPAuths}}
  64. <option value="{{.}}">{{.}}</option>
  65. {{end}}
  66. </select>
  67. </div>
  68. <div class="field">
  69. <label class="req" for="smtphost">{{.i18n.Tr "admin.auths.smtphost"}}</label>
  70. <input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtphost" name="smtphost" value="{{.smtphost}}" />
  71. </div>
  72. <div class="field">
  73. <label class="req" for="smtpport">{{.i18n.Tr "admin.auths.smtpport"}}</label>
  74. <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtpport" name="smtpport" value="{{.smtpport}}" />
  75. </div>
  76. </div>
  77. <div class="field">
  78. <div class="smtp hidden">
  79. <label></label>
  80. <input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
  81. <strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong>
  82. <br>
  83. </div>
  84. <label></label>
  85. <input name="allowautoregister" type="checkbox" {{if .allowautoregister}}checked{{end}}>
  86. <strong>{{.i18n.Tr "admin.auths.enable_auto_register"}}</strong>
  87. </div>
  88. <div class="field">
  89. <label></label>
  90. <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "admin.auths.new"}}</button>
  91. </div>
  92. </form>
  93. </div>
  94. <br>
  95. <div class="panel panel-radius">
  96. <div class="panel-header">
  97. {{.i18n.Tr "admin.auths.tips"}}
  98. </div>
  99. <div class="panel-body admin-panel">
  100. <h5>GMail Setting:</h5>
  101. <p>Host: smtp.gmail.com, Post: 587, Enable TLS Encryption: true</p>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. {{template "ng/base/footer" .}}