mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-16 12:05:30 +09:00
UI: install - new version
This commit is contained in:
1 parent
5dd3dd71a0
commit
5cf3732339
17 files changed
+212
-196
No files matched your search
@@ -60,6 +60,7 @@ db_helper = Please use INNODB engine with utf8_general_ci charset for MySQL.
|
||||
ssl_mode = SSL Mode
|
||||
path = Path
|
||||
sqlite_helper = The file path of SQLite3 database.
|
||||
err_empty_sqlite_path = SQLite3 database path cannot be empty.
|
||||
|
||||
general_title = Application General Settings
|
||||
repo_path = Repository Root Path
|
||||
@@ -72,13 +73,16 @@ http_port = HTTP Port
|
||||
http_port_helper = Port number which application will listen on.
|
||||
app_url = Application URL
|
||||
app_url_helper = This affects HTTP/HTTPS clone URL and somewhere in e-mail.
|
||||
email_title = E-mail Service Settings (Optional)
|
||||
|
||||
optional_title = Optional Settings
|
||||
email_title = E-mail Service Settings
|
||||
smtp_host = SMTP Host
|
||||
mailer_user = Sender E-mail
|
||||
mailer_password = Sender Password
|
||||
notify_title = Notification Settings (Optional)
|
||||
notify_title = Notification Settings
|
||||
register_confirm = Enable Register Confirmation
|
||||
mail_notify = Enable Mail Notification
|
||||
admin_setting_desc = You do not have to create an admin account right now, user whoever ID=1 will gain admin access automatically.
|
||||
admin_title = Admin Account Settings
|
||||
admin_name = Username
|
||||
admin_password = Password
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.6.1.0707 Beta"
|
||||
const APP_VER = "0.6.1.0708 Beta"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
@@ -208,7 +208,14 @@ func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaro
|
||||
|
||||
if errs[0].FieldNames[0] == field.Name {
|
||||
data["Err_"+field.Name] = true
|
||||
trName := l.Tr("form." + field.Name)
|
||||
|
||||
trName := field.Tag.Get("locale")
|
||||
if len(trName) == 0 {
|
||||
trName = l.Tr("form." + field.Name)
|
||||
} else {
|
||||
trName = l.Tr(trName)
|
||||
}
|
||||
|
||||
switch errs[0].Classification {
|
||||
case binding.ERR_REQUIRED:
|
||||
data["ErrorMsg"] = trName + l.Tr("form.require_error")
|
||||
|
||||
+11
-11
@@ -17,22 +17,22 @@ type InstallForm struct {
|
||||
DbUser string
|
||||
DbPasswd string
|
||||
DbName string
|
||||
SSLMode string
|
||||
SSLMode string `form:"ssl_mode"`
|
||||
DbPath string
|
||||
RepoRootPath string `binding:"Required"`
|
||||
RunUser string `binding:"Required"`
|
||||
Domain string `binding:"Required"`
|
||||
HTTPPort string `binding:"Required"`
|
||||
HTTPPort string `form:"http_port" binding:"Required"`
|
||||
AppUrl string `binding:"Required"`
|
||||
SMTPHost string
|
||||
SMTPEmail string
|
||||
SMTPPasswd string
|
||||
RegisterConfirm string
|
||||
MailNotify string
|
||||
AdminName string `binding:"Required;AlphaDashDot;MaxSize(30)"`
|
||||
AdminPasswd string `binding:"Required;MinSize(6);MaxSize(255)"`
|
||||
AdminConfirmPasswd string `binding:"Required;MinSize(6);MaxSize(255)"`
|
||||
AdminEmail string `binding:"Required;Email;MaxSize(50)"`
|
||||
SMTPHost string `form:"smtp_host"`
|
||||
SMTPEmail string `form:"smtp_user" binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.mailer_user"`
|
||||
SMTPPasswd string `form:"smtp_passwd"`
|
||||
RegisterConfirm bool
|
||||
MailNotify bool
|
||||
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
|
||||
AdminPasswd string `binding:"OmitEmpty;MinSize(6);MaxSize(255)" locale:"install.admin_password"`
|
||||
AdminConfirmPasswd string
|
||||
AdminEmail string `binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.admin_email"`
|
||||
}
|
||||
|
||||
func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
||||
@@ -581,7 +581,7 @@ func conf_locale_locale_de_de_ini() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _conf_locale_locale_en_us_ini = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\xdd\x72\xdc\x38\xb2\xe6\x3d\x9f\x82\xdd\x1b\x5e\x77\x47\xc8\xe5\x98\x99\x88\x8d\x8d\x0e\xdb\x1d\x6a\xf9\x77\x8e\x65\xe9\x58\xf2\xcc\x9e\x75\x38\x38\xac\x22\x55\xc5\x23\x16\x59\x43\xb2\x54\xad\xb9\xda\xd7\xd8\xd7\xdb\x27\xd9\xfc\xf2\x07\x3f\x24\x4b\xb6\xe7\x6c\xec\xb9\x91\x40\x20\x01\x24\x12\x89\x44\x66\x22\x81\xca\x77\xbb\xac\x28\xfb\x55\xfa\x3c\x3d\x4d\x77\x79\xd5\xd4\x65\xdf\xa7\x7d\x59\xdf\x3c\xd9\xb4\xfd\x50\x16\xe9\x9b\x6a\xa0\xef\xee\xae\x5a\x95\x49\xb2\x69\xb7\x25\x81\xbe\xa5\x7f\x49\x91\xf7\x9b\x65\x9b\x77\x05\x65\xbc\xb4\x74\x52\xfe\xbe\xab\xdb\x0e\x40\xaf\x24\x95\x6c\xca\x7a\x87\x3a\xf4\x2f\xe9\xab\x75\x93\x55\x0d\x7d\x5e\x51\x2a\x7d\xd7\x24\x7d\xbb\xaa\xf2\x3a\x0b\x0a\x38\xc3\xca\x7f\x49\xff\xd8\x14\xe9\xd5\x50\xee\xd2\x67\xfd\x36\xaf\xeb\x17\x79\xcf\x55\x86\x32\xcd\x57\xab\x76\xdf\x0c\xcf\x9e\x4a\x81\x34\xde\xee\x07\x6b\xfd\x62\x3f\x48\xde\x7e\x67\x59\x9f\x76\x49\x57\xae\x2b\x1a\x58\x47\x59\x1f\x35\x99\x1c\xca\x65\x5f\x0d\x40\xfa\xaf\x92\x4a\xee\xca\xae\xaf\x5a\xe0\xf3\x17\x49\x25\xbb\x7c\x0d\x80\x4b\xfa\x97\x0c\xe5\x76\x57\xe7\x5c\xe1\x5a\x93\x49\x9d\x37\xeb\xbd\xc0\xbc\xd7\x64\x92\xec\x89\x72\x4d\xce\x34\xfb\xa4\xc9\xa4\xdc\xe6\x55\x0d\xfa\x3c\x41\x82\xda\xed\xfb\x43\xcb\x54\xbc\xd4\x24\xe1\x98\x0d\xf7\xbb\x92\x51\x7c\x72\x4d\xa9\x64\x95\xef\x86\xd5\x26\xa7\x9c\x33\x49\x25\x04\xb4\x6b\x09\xd7\xb6\xbb\x67\x38\xfb\x48\xda\x6e\x9d\x37\xd5\x3f\xf2\x41\xf0\xbf\x08\x3e\x93\x6d\xd5\x75\x2d\x86\x7e\xce\x89\xa4\x29\x0f\x19\xda\xa1\x9c\x0f\xe5\x21\x6c\x05\x25\xdb\x6a\xdd\xc9\x28\x51\x78\xce\x5f\x68\x05\x65\x37\x6d\x77\xab\x05\xaf\x91\x1c\x55\x25\x24\xb4\x34\xee\x3f\x6f\x88\x2e\x5a\x7a\xce\x1f\x11\x40\x9f\xe4\xc5\xb6\x6a\xb2\x5d\xde\x94\xa0\xd1\x29\xbe\x88\x2e\xf4\x95\xe8\x74\x67\x7d\x39\x0c\x55\xb3\xee\x51\x2c\x59\xe9\x95\x66\x25\x41\x99\xcb\x03\x3e\x7d\x76\x53\x96\x85\x60\xd4\xa7\xaf\x29\x9d\xec\xf6\x75\x4d\x63\xff\xfb\xbe\xec\x07\xc0\x5f\xd2\x37\x8d\x42\xbe\x93\xaa\xef\x29\x41\xd9\xef\x38\x91\xd0\x04\x34\x2b\x46\xe9\x8c\x13\x49\xf2\xb9\x2f\xf3\x6e\xb5\xf9\x92\xc8\x7f\xee\x11\x89\xc5\x62\x71\x74\x6a\xc0\x0e\xca\x0a\xd2\x83\x75\x90\xac\xda\x02\x1f\x67\xf4\x8f\x9a\xae\x9a\x7e\x20\x96\xfe\x92\x68\x02\x60\x92\x12\x32\x0e\xd5\x50\x97\x3e\x93\xd7\x47\x8f\x79\x48\x5f\x57\x5d\x3f\x3c\x19\x2a\x62\xb9\x8f\xfb\x26\xc1\xf8\x88\x9d\xb3\x62\x69\xab\xfc\x4d\x4b\xd4\xe1\xec\x8e\xc6\x77\x7e\x7f\xf5\xaf\xef\x4f\xd2\x4b\x5a\xea\xeb\xae\xa4\x74\x4a\x6d\xd0\x3f\xaa\xf3\xa7\x45\x42\xb5\xac\xa7\x97\xf9\x90\x2f\xf3\xbe\xf4\x64\x45\xa1\xf0\xa8\x2b\x63\x4e\x85\xd8\x60\x11\xd1\x0f\xd1\x78\xe7\xf8\x9c\xda\xd0\xd5\xe1\xda\xf8\x80\x25\x42\xf9\x90\x1a\x5c\xf9\xb2\x2e\x91\x4f\x4d\xa5\xef\x3e\x7c\xb8\x78\xf9\x5b\x5a\x36\xeb\xaa\x29\xd3\x43\x35\x6c\xd2\xfd\x70\xf3\xdf\xb3\x75\xd9\x94\x1d\x09\x91\x55\x95\xd2\xca\xe8\x88\x09\x52\x62\x4f\x19\xdc\x22\xe9\xfb\x3a\xdb\x0a\x79\xaf\xae\xde\xa7\xe7\x20\xf1\x2e\x1f\x36\x8c\xc8\xb0\x49\xfa\xbf\xd7\x20\x91\xeb\xf0\x7a\x53\xa6\x37\x15\x8d\x9a\x81\xda\x1b\xa3\x47\x5a\x28\x8e\x8b\x24\xb1\x1e\x8d\x3c\xa7\xbb\x5d\x5d\xad\x64\xc9\xbd\x91\x32\x4f\x29\x70\x43\xa6\x3d\x7a\x66\x48\x3f\xb6\xed\x20\x18\x38\x00\x8f\xc4\x29\xcd\x2a\x24\x6f\x57\x6e\x5b\x5a\x81\x8e\xa1\x2a\x9a\xb4\x43\x45\x85\xcb\x32\xed\xf3\x3b\xe2\xe9\xa1\x4d\x87\x4d\xd5\xa7\x05\x4d\xe8\x0a\x0d\x13\xfb\xed\x49\xe6\x09\xe9\x89\x09\x84\xfc\x96\x17\x8f\x93\xa1\xb6\x7b\x9a\xb1\x0d\x35\x06\x89\x0a\xf1\x4f\x4d\xce\xe1\x99\xe6\x24\x8a\xa9\x1d\xe6\x21\xe2\x8e\x96\xe4\x17\x24\xcc\x4b\x4e\xe8\x77\xd8\x3e\x61\x95\xdf\xdc\x10\x56\x3d\x51\xfe\x6d\xba\xaa\x5b\x9a\xb6\x4f\x1f\xdf\x53\xe5\xcd\x30\xec\xb2\x5d\xdb\x31\xab\x5c\x5f\x5f\x12\x0b\x76\x83\xcf\x0d\xa6\x1f\x30\xcd\x7e\xbb\xa4\xaf\xc3\xa6\xa2\x85\x96\x07\xb4\x66\x52\xd4\x10\xe2\x4d\xda\x36\x8b\x04\xdb\xd9\xbe\xab\x47\x33\x42\x5d\x5a\xc9\x11\xf4\x80\xc2\x53\xfc\xb9\xf2\x58\xf2\x70\x7b\xda\xe9\x0e\x9b\x92\x36\x34\x1a\x6a\xc9\x12\x7b\x21\x12\xdc\xcd\xbd\xc8\x71\x9a\x6e\xde\x23\xdd\xb4\xa7\x3f\x5d\xec\xd0\x7b\x5e\xff\x9c\xf4\x5b\x1a\x97\x2e\x8c\xab\x73\x1a\x2d\xaf\x0e\x54\xa3\x09\xd1\x99\xba\x2a\x9b\x82\x12\xba\x2b\x68\x59\xb0\x68\xb4\xdc\xad\x9d\xa6\x1d\xaa\x9b\x7b\x87\xc5\x07\x7c\xda\x80\xe7\x70\xb0\x7d\x2f\x5b\xb5\xcd\x4d\xd5\x6d\x81\x79\x93\x2f\xa9\xb2\x6d\x83\x24\x7d\xb8\xc4\x44\x35\x8d\x51\x3a\xf1\xa0\xe7\x18\x69\xd8\x95\xca\x6b\xb7\x0e\x58\x5e\x4f\xc4\xb2\x00\x8d\x37\x42\x13\xf5\x53\xb9\xa0\x28\x86\x65\x8a\x9b\x87\x91\xda\xa3\xcd\x54\xe5\x65\xb6\x6e\x79\x0f\x30\xf9\x08\x86\xa5\x4d\xbb\x1f\xb2\x75\x35\x64\x37\xa0\x2d\xda\x7c\x8d\xba\x58\x3f\x54\x92\x3e\xa6\xa2\xc7\xe9\xaa\xdd\xd2\x1e\x55\xfc\x92\x3e\xba\x53\xc1\xf0\x27\x10\x21\xcb\xef\x08\x96\x49\xf0\x3c\xfd\xb7\x76\xdf\xd1\x8a\x14\xb9\x64\x8a\x42\xd1\xd2\xca\x24\xc8\xb4\xdf\xef\x98\xaf\x55\x6a\x9c\xa4\x3b\x01\x2c\xda\x43\x53\xb7\x39\x2d\x58\x5a\x77\xed\x0d\x11\x10\x6a\xce\xb2\x6a\x72\x5a\x63\xd6\xca\x4d\xd7\x6e\xd3\x47\xfd\x49\xfa\xe1\xe2\x9a\x01\xd7\xed\x72\x5f\xd5\x85\x01\x2c\x68\x84\x77\x79\x5d\x15\x90\xe8\xba\xd9\x85\xd2\xd3\xb2\x2a\xc1\x65\xd5\x76\x10\x0Line truncated
|
||||
var _conf_locale_locale_en_us_ini = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\xeb\x6e\xdc\x48\xb2\xe6\x7f\x3e\x05\xbb\x17\x5e\x77\x03\x72\x19\x3d\x03\x2c\x16\x0d\xdb\x0d\xb5\xdc\xbe\xcc\xb1\x2c\x1d\x4b\x9e\xd9\xb3\x86\xc1\x61\x91\x54\x15\x8f\xaa\xc8\x1a\x92\xa5\x6a\xcd\xaf\x7d\x8d\x7d\xbd\x7d\x92\x8d\x2f\x2e\x79\x21\x59\xb2\xdd\x67\xb1\xe7\x8f\x94\xcc\x8c\xbc\x45\x46\xc6\x2d\x23\xb3\xf2\xdd\x2e\x2b\xab\xbe\x48\x9f\xa7\xa7\xe9\x2e\xaf\x9b\x4d\xd5\xf7\x69\x5f\x6d\x6e\x9e\xac\xdb\x7e\xa8\xca\xf4\x75\x3d\xd0\x77\x77\x57\x17\x55\x92\xac\xdb\x6d\x45\xa0\x6f\xe8\x5f\x52\xe6\xfd\x7a\xd9\xe6\x5d\x49\x19\x2f\x2d\x9d\x54\xbf\xef\x36\x6d\x07\xa0\xdf\x24\x95\xac\xab\xcd\x0e\x75\xe8\x5f\xd2\xd7\xab\x26\xab\x1b\xfa\xbc\xa2\x54\xfa\xb6\x49\xfa\xb6\xa8\xf3\x4d\x16\x14\x70\x86\x95\xff\x9c\xfe\xa9\x29\xd3\xab\xa1\xda\xa5\xcf\xfa\x6d\xbe\xd9\xbc\xc8\x7b\xae\x32\x54\x69\x5e\x14\xed\xbe\x19\x9e\x3d\x95\x02\x69\xbc\xdd\x0f\xd6\xfa\xc5\x7e\x90\xbc\xfd\xce\xb2\x3e\xee\x92\xae\x5a\xd5\x34\xb1\x8e\xb2\x3e\x68\x32\x39\x54\xcb\xbe\x1e\x30\xe8\xbf\x49\x2a\xb9\xab\xba\xbe\x6e\x31\x9e\xbf\x4a\x2a\xd9\xe5\x2b\x00\x5c\xd2\xbf\x64\xa8\xb6\xbb\x4d\xce\x15\xae\x35\x99\x6c\xf2\x66\xb5\x17\x98\x77\x9a\x4c\x92\x3d\x61\xae\xc9\x19\x67\x1f\x35\x99\x54\xdb\xbc\xde\x00\x3f\x4f\x90\xa0\x76\xfb\xfe\xd0\x32\x16\x2f\x35\x49\x63\xcc\x86\xfb\x5d\xc5\x43\x7c\x72\x4d\xa9\xa4\xc8\x77\x43\xb1\xce\x29\xe7\x4c\x52\x09\x01\xed\x5a\x1a\x6b\xdb\xdd\x33\x9c\x7d\x24\x6d\xb7\xca\x9b\xfa\x9f\xf9\x20\xe3\xbf\x08\x3e\x93\x6d\xdd\x75\x2d\xa6\x7e\xce\x89\xa4\xa9\x0e\x19\xda\xa1\x9c\xf7\xd5\x21\x6c\x05\x25\xdb\x7a\xd5\xc9\x2c\x51\x78\xce\x5f\x68\x05\x65\x37\x6d\x77\xab\x05\xaf\x90\x1c\x55\xa5\x41\x68\x69\xdc\x7f\xde\x10\x5e\xb4\xf4\x9c\x3f\x22\x80\x3e\xc9\xcb\x6d\xdd\x64\xbb\xbc\xa9\x80\xa3\x53\x7c\x11\x5e\xe8\x2b\xd1\xe5\xce\xfa\x6a\x18\xea\x66\xd5\xa3\x58\xb2\xd2\x2b\xcd\x4a\x82\x32\x97\x87\xf1\xf4\xd9\x4d\x55\x95\x32\xa2\x3e\x7d\x45\xe9\x64\xb7\xdf\x6c\x68\xee\xff\xd8\x57\xfd\x00\xf8\x4b\xfa\xa6\x59\xc8\x77\x52\xf7\x3d\x25\x28\xfb\x2d\x27\x12\x5a\x80\xa6\xe0\x21\x9d\x71\x22\x49\x3e\xf5\x55\xde\x15\xeb\xcf\x89\xfc\xe7\x1e\x91\x58\x2c\x16\x47\x97\x06\xe4\xa0\xa4\x20\x3d\x58\x07\x49\xd1\x96\xf8\x38\xa3\x7f\xd4\x74\xdd\xf4\x03\x91\xf4\xe7\x44\x13\x00\x93\x94\xa0\x71\xa8\x87\x4d\xe5\x33\x79\x7f\xf4\x58\x87\xf4\x55\xdd\xf5\xc3\x93\xa1\x26\x92\xfb\xb0\x6f\x12\xcc\x8f\xc8\x39\x2b\x97\xb6\xcb\x5f\xb7\x84\x1d\xce\xee\x68\x7e\xe7\xf7\x57\xff\xfa\xee\x24\xbd\xa4\xad\xbe\xea\x2a\x4a\xa7\xd4\x06\xfd\xa3\x3a\x7f\x5e\x24\x54\xcb\x7a\x7a\x99\x0f\xf9\x32\xef\x2b\x8f\x56\x14\x0a\x8d\xba\x32\xa6\x54\xb0\x0d\x66\x11\xfd\x10\xcd\x77\x8e\xce\xa9\x0d\xdd\x1d\xae\x8d\xf7\xd8\x22\x94\x0f\xae\xc1\x95\x2f\x37\x15\xf2\xa9\xa9\xf4\xed\xfb\xf7\x17\x2f\x7f\x4d\xab\x66\x55\x37\x55\x7a\xa8\x87\x75\xba\x1f\x6e\xfe\x7b\xb6\xaa\x9a\xaa\x23\x26\x52\xd4\x29\xed\x8c\x8e\x88\x20\x25\xf2\x94\xc9\x2d\x92\xbe\xdf\x64\x5b\x41\xef\xd5\xd5\xbb\xf4\x1c\x28\xde\xe5\xc3\x9a\x07\x32\xac\x93\xfe\x1f\x1b\xa0\xc8\x75\x78\xbd\xae\xd2\x9b\x9a\x66\xcd\x40\xed\x8d\xe1\x23\x2d\x75\x8c\x8b\xa4\xea\xba\x8c\xf6\xfd\x70\x9f\x69\x65\x6d\x6f\x0c\x29\x4d\x10\xe9\x34\xed\x90\x2e\xab\x94\xeb\x2c\x92\xc4\x06\x6c\xd8\x3d\xdd\xed\x36\x75\x21\x3b\xf6\xb5\x94\x79\x44\x83\x98\xac\x03\x4f\x4b\xe9\x87\x96\xda\xe4\x09\x38\x00\x3f\x87\x53\x22\x0a\x30\xee\xae\xda\xb6\xb4\x81\x1d\x3d\xd6\xb4\xe6\x87\x9a\x0a\x69\x30\x7d\x7e\x47\x5b\x62\x68\xd3\x61\x5d\xf7\x69\x49\xf4\x50\xa0\x61\xa2\xde\x3d\xb1\x4c\x59\x39\xa2\x21\x59\x3d\xcb\x8b\xd1\xc4\x50\xdb\x3d\x2d\xf8\x9a\x1a\x03\x43\x86\xf4\xa0\x26\xe7\xc6\x99\xe6\xc4\xc9\xa9\x1d\x26\x41\x22\xae\x96\xd8\x1f\x18\xd4\x4b\x4e\xe8\x77\xd8\x3e\x8d\x2a\xbf\xb9\xa1\x51\xf5\xb4\x70\x6f\xd2\x62\xd3\xd2\xaa\x7f\xfc\xf0\x8e\x2a\xaf\x87\x61\x97\xed\xda\x8e\x29\xed\xfa\xfa\x92\x28\xb8\x1b\x7c\x6e\x40\x3d\x80\x69\xf6\xdb\x25\x7d\x1d\xd6\x35\xed\xd3\x3c\xc0\x35\xa3\x62\x03\x19\xd0\xa4\x6d\xb3\x48\x20\x0d\xf7\xdd\x66\xb4\x22\xd4\xa5\x95\x1c\x19\x1e\x86\xf0\x14\x7f\xae\xfc\x28\x79\xba\x3d\x09\xca\xc3\xba\x22\x79\x48\x53\xad\x98\xe1\xd3\xf2\xb7\x3b\xb4\x1b\xac\xff\x85\x66\xf8\x45\x67\x21\xe1\xca\x45\x54\x50\x29\x8b\xe1\x80\xdd\x6d\x69\xc2\xba\xe1\xae\xce\x09\x0d\xbc\xeb\x00\x4b\x2b\xa5\x4b\x78\x55\x35\x25\x25\x54\xda\x68\x59\xb0\x19\xb5\xdc\xed\x49\x22\xd5\xfa\xe6\xde\x75\xfd\x1e\x9f\x86\x89\x80\x26\x45\x72\x66\x45\xdb\xdc\xd4\xdd\x16\x63\x6c\xf2\x25\xd5\x30\x99\x4a\xac\x8c\x4b\x8c\xef\xd3\x6c\xa4\x65\x0f\x7a\x8e\x39\x85\xed\x2b\xf3\x57\x26\x6e\x1c\xeb\xdf\xda\x7d\x5a\xb6\x29\xb6\x10\x53\x19\x91\x57\xd1\x55\xac\x00\x34\x29\xd7\x30\x4d\x20\xed\xea\xd5\x9a\x96\xbb\x3d\x9c\x08\x69\x1e\xd6\x6d\x45\x92\x3c\x7d\xfb\xf2\xf9\x4f\xb2\xd8\x2b\xd0\x9c\xab\x04\x6a\xcd\xf7\x43\x8b\x51\x16\xc4\x48\x89\xf8\x65\x08\x6e\x63\x32\xe4\x44\xcc\x08\xd0\x58\xb0\x9b\xe8\x9a\xf2\x39\xc5\x52\x58\xa6\xe8\xf1\x30\x52\x7b\xa4\x1c\x28\xff\xcf\x56\x2d\xcb\x34\xe3\xf7\xd8\x41\xa4\x84\xf4\x43\xb6\xaa\x87\xec\x06\x6b\x8a\x36\x5f\xa1\x2e\x36\x34\x95\xa4\x8f\xa9\xe8\x71\x5a\xb4\x5b\x92\xb9\xe5\xcf\xe9\xa3\x3b\x65\x74\x7f\xc6\x3a\x64\xf9\x1d\xc1\xfLine truncated
|
||||
|
||||
func conf_locale_locale_en_us_ini_bytes() ([]byte, error) {
|
||||
return bindata_read(
|
||||
@@ -596,7 +596,7 @@ func conf_locale_locale_en_us_ini() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindata_file_info{name: "conf/locale/locale_en-US.ini", size: 31822, mode: os.FileMode(420), modTime: time.Unix(1436286541, 0)}
|
||||
info := bindata_file_info{name: "conf/locale/locale_en-US.ini", size: 32030, mode: os.FileMode(420), modTime: time.Unix(1436353448, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -106,6 +106,12 @@ func (ctx *Context) HasError() bool {
|
||||
return hasErr.(bool)
|
||||
}
|
||||
|
||||
// HasValue returns true if value of given name exists.
|
||||
func (ctx *Context) HasValue(name string) bool {
|
||||
_, ok := ctx.Data[name]
|
||||
return ok
|
||||
}
|
||||
|
||||
// HTML calls Context.HTML and converts template name to string.
|
||||
func (ctx *Context) HTML(status int, name base.TplName) {
|
||||
ctx.Context.HTML(status, string(name))
|
||||
@@ -140,7 +146,7 @@ func (ctx *Context) Handle(status int, title string, err error) {
|
||||
}
|
||||
|
||||
func (ctx *Context) HandleText(status int, title string) {
|
||||
if (status / 100 == 4) || (status / 100 == 5) {
|
||||
if (status/100 == 4) || (status/100 == 5) {
|
||||
log.Error(4, "%s", title)
|
||||
}
|
||||
ctx.RenderData(status, []byte(title))
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
|
||||
@@ -38,6 +38,8 @@ $(document).ready(function () {
|
||||
$('.slide.up.dropdown').dropdown({
|
||||
transition: 'slide up'
|
||||
});
|
||||
$('.ui.accordion').accordion();
|
||||
$('.ui.checkbox').checkbox();
|
||||
|
||||
initInstall();
|
||||
});
|
||||
@@ -66,6 +66,13 @@ footer {
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-error {
|
||||
color: #d95c5c !important;
|
||||
}
|
||||
|
||||
.generate-img(16);
|
||||
.generate-img(@n, @i: 1) when (@i =< @n) {
|
||||
|
||||
@@ -17,6 +17,17 @@
|
||||
.help {
|
||||
margin-left: 41%;
|
||||
}
|
||||
&.optional .title {
|
||||
margin-left: 38%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ui {
|
||||
.checkbox {
|
||||
margin-left: 40% !important;
|
||||
label {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
-11
@@ -126,6 +126,15 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
ctx.Data["CurDbOption"] = form.DbType
|
||||
|
||||
if ctx.HasError() {
|
||||
if ctx.HasValue("Err_SMTPEmail") {
|
||||
ctx.Data["Err_SMTP"] = true
|
||||
}
|
||||
if ctx.HasValue("Err_AdminName") ||
|
||||
ctx.HasValue("Err_AdminPasswd") ||
|
||||
ctx.HasValue("Err_AdminEmail") {
|
||||
ctx.Data["Err_Admin"] = true
|
||||
}
|
||||
|
||||
ctx.HTML(200, INSTALL)
|
||||
return
|
||||
}
|
||||
@@ -146,12 +155,20 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
models.DbCfg.SSLMode = form.SSLMode
|
||||
models.DbCfg.Path = form.DbPath
|
||||
|
||||
if models.DbCfg.Type == "sqlite3" && len(models.DbCfg.Path) == 0 {
|
||||
ctx.Data["Err_DbPath"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.err_empty_sqlite_path"), INSTALL, &form)
|
||||
return
|
||||
}
|
||||
|
||||
// Set test engine.
|
||||
var x *xorm.Engine
|
||||
if err := models.NewTestEngine(x); err != nil {
|
||||
if strings.Contains(err.Error(), `Unknown database type: sqlite3`) {
|
||||
ctx.Data["Err_DbType"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.sqlite3_not_available", "http://gogs.io/docs/installation/install_from_binary.html"), INSTALL, &form)
|
||||
} else {
|
||||
ctx.Data["Err_DbSetting"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.invalid_db_setting", err), INSTALL, &form)
|
||||
}
|
||||
return
|
||||
@@ -214,8 +231,8 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail)
|
||||
cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd)
|
||||
|
||||
cfg.Section("service").Key("REGISTER_EMAIL_CONFIRM").SetValue(com.ToStr(form.RegisterConfirm == "on"))
|
||||
cfg.Section("service").Key("ENABLE_NOTIFY_MAIL").SetValue(com.ToStr(form.MailNotify == "on"))
|
||||
cfg.Section("service").Key("REGISTER_EMAIL_CONFIRM").SetValue(com.ToStr(form.RegisterConfirm))
|
||||
cfg.Section("service").Key("ENABLE_NOTIFY_MAIL").SetValue(com.ToStr(form.MailNotify))
|
||||
}
|
||||
|
||||
cfg.Section("").Key("RUN_MODE").SetValue("prod")
|
||||
@@ -237,16 +254,23 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
GlobalInit()
|
||||
|
||||
// Create admin account.
|
||||
if err := models.CreateUser(&models.User{Name: form.AdminName, Email: form.AdminEmail, Passwd: form.AdminPasswd,
|
||||
IsAdmin: true, IsActive: true}); err != nil {
|
||||
if !models.IsErrUserAlreadyExist(err) {
|
||||
setting.InstallLock = false
|
||||
ctx.Data["Err_AdminName"] = true
|
||||
ctx.Data["Err_AdminEmail"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.invalid_admin_setting", err), INSTALL, &form)
|
||||
return
|
||||
if len(form.AdminName) > 0 {
|
||||
if err := models.CreateUser(&models.User{
|
||||
Name: form.AdminName,
|
||||
Email: form.AdminEmail,
|
||||
Passwd: form.AdminPasswd,
|
||||
IsAdmin: true,
|
||||
IsActive: true,
|
||||
}); err != nil {
|
||||
if !models.IsErrUserAlreadyExist(err) {
|
||||
setting.InstallLock = false
|
||||
ctx.Data["Err_AdminName"] = true
|
||||
ctx.Data["Err_AdminEmail"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.invalid_admin_setting", err), INSTALL, &form)
|
||||
return
|
||||
}
|
||||
log.Info("Admin account already exist")
|
||||
}
|
||||
log.Info("Admin account already exist")
|
||||
}
|
||||
|
||||
log.Info("First-time run install finished!")
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.6.1.0707 Beta
|
||||
0.6.1.0708 Beta
|
||||
@@ -1,2 +1,5 @@
|
||||
{{if .Flash.ErrorMsg}}<div class="alert alert-danger form-error">{{.Flash.ErrorMsg}}</div>{{end}}
|
||||
{{if .Flash.SuccessMsg}}<div class="alert alert-success">{{.Flash.SuccessMsg}}</div>{{end}}
|
||||
{{if .Flash.ErrorMsg}}
|
||||
<div class="ui negative message">
|
||||
<p>{{.Flash.ErrorMsg}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,2 @@
|
||||
{{if .Flash.ErrorMsg}}<div class="alert alert-danger form-error">{{.Flash.ErrorMsg}}</div>{{end}}
|
||||
{{if .Flash.SuccessMsg}}<div class="alert alert-success">{{.Flash.SuccessMsg}}</div>{{end}}
|
||||
+112
-7
@@ -2,17 +2,21 @@
|
||||
<div class="install">
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="sixteen wide center aligned centered column">
|
||||
|
||||
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "install.title"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
|
||||
<form class="ui form" action="{{AppSubUrl}}/install" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
|
||||
<!-- Dtabase Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.db_title"}}</h4>
|
||||
<p>{{.i18n.Tr "install.requite_db_desc"}}</p>
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "install.db_type"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" id="db_type" name="db_type" value="{{.CurDbOption}}">
|
||||
@@ -27,19 +31,19 @@
|
||||
</div>
|
||||
|
||||
<div id="sql_settings" class="{{if eq .CurDbOption "SQLite3"}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_host">{{.i18n.Tr "install.host"}}</label>
|
||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_user">{{.i18n.Tr "install.user"}}</label>
|
||||
<input id="db_user" name="db_user" value="{{.db_user}}">
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_passwd">{{.i18n.Tr "install.password"}}</label>
|
||||
<input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}">
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_name">{{.i18n.Tr "install.db_name"}}</label>
|
||||
<input id="db_name" name="db_name" value="{{.db_name}}">
|
||||
<span class="help">{{.i18n.Tr "install.db_helper"}}</span>
|
||||
@@ -50,7 +54,7 @@
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "install.ssl_mode"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" name="ssl_mode" value="disable">
|
||||
<input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}">
|
||||
<div class="default text">disable</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
@@ -63,7 +67,7 @@
|
||||
</div>
|
||||
|
||||
<div id="sqlite_settings" class="{{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<div class="inline required field {{if .Err_DbPath}}error{{end}}">
|
||||
<label for="db_path">{{.i18n.Tr "install.path"}}</label>
|
||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||
<span class="help">{{.i18n.Tr "install.sqlite_helper"}}</span>
|
||||
@@ -72,6 +76,107 @@
|
||||
|
||||
<!-- General Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.general_title"}}</h4>
|
||||
<div class="inline required field {{if .Err_RepoRootPath}}error{{end}}">
|
||||
<label for="repo_root_path">{{.i18n.Tr "install.repo_path"}}</label>
|
||||
<input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.repo_path_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RunUser}}error{{end}}">
|
||||
<label for="run_user">{{.i18n.Tr "install.run_user"}}</label>
|
||||
<input id="run_user" name="run_user" value="{{.run_user}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.run_user_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="domain">{{.i18n.Tr "install.domain"}}</label>
|
||||
<input id="domain" name="domain" value="{{.domain}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.domain_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="http_port">{{.i18n.Tr "install.http_port"}}</label>
|
||||
<input id="http_port" name="http_port" value="{{.http_port}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.http_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="app_url">{{.i18n.Tr "install.app_url"}}</label>
|
||||
<input id="app_url" name="app_url" value="{{.app_url}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.app_url_helper"}}</span>
|
||||
</div>
|
||||
|
||||
<!-- Optional Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.optional_title"}}</h4>
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_SMTP}}text-error{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.email_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_SMTPEmail}}error{{end}}">
|
||||
<label for="smtp_user">{{.i18n.Tr "install.mailer_user"}}</label>
|
||||
<input id="smtp_user" name="smtp_user" value="{{.smtp_user}}">
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label for="smtp_passwd">{{.i18n.Tr "install.mailer_password"}}</label>
|
||||
<input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.notify_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.register_confirm"}}</strong></label>
|
||||
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.mail_notify"}}</strong></label>
|
||||
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Admin}}text-error{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.admin_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="center">{{.i18n.Tr "install.admin_setting_desc"}}</p>
|
||||
<div class="inline field {{if .Err_AdminName}}error{{end}}">
|
||||
<label for="admin_name">{{.i18n.Tr "install.admin_name"}}</label>
|
||||
<input id="admin_name" name="admin_name" value="{{.admin_name}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
||||
<input id="admin_passwd" name="admin_passwd" value="{{.admin_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
||||
<input id="admin_confirm_passwd" name="admin_confirm_passwd" type="password" value="{{.admin_confirm_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
|
||||
<label for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
||||
<input id="admin_email" name="admin_email" value="{{.admin_email}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui primary button">{{.i18n.Tr "install.install_gogs"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
{{template "ng/base/head" .}}
|
||||
<div id="setting-wrapper" class="main-wrapper">
|
||||
<div class="container clear">
|
||||
<div class="setting-content">
|
||||
{{template "ng/base/alert" .}}
|
||||
<div id="setting-content">
|
||||
<div class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "install.title"}}</strong>
|
||||
</div>
|
||||
<form class="form form-align panel-body" id="install-form" action="{{AppSubUrl}}/install" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "install.requite_db_desc"}}</div>
|
||||
<div class="field">
|
||||
<label class="req">{{.i18n.Tr "install.db_type"}}</label>
|
||||
<select name="db_type" id="install-database" class="form-control">
|
||||
{{range .DbOptions}}
|
||||
<option value="{{.}}"{{if eq $.CurDbOption .}}selected{{end}}>{{.}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="server-sql {{if eq .CurDbOption "SQLite3"}}hide{{end}}">
|
||||
<div class="field">
|
||||
<label class="req" for="db_host">{{.i18n.Tr "install.host"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_DbHost}}ipt-error{{end}}" id="db_host" name="db_host" value="{{.db_host}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="db_user">{{.i18n.Tr "install.user"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_DbUser}}ipt-error{{end}}" id="db_user" name="db_user" value="{{.db_user}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="db_passwd">{{.i18n.Tr "install.password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_DbPasswd}}ipt-error{{end}}" id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="db_name">{{.i18n.Tr "install.db_name"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_DbName}}ipt-error{{end}}" id="db_name" name="db_name" value="{{.db_name}}" />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.db_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field pgsql-setting {{if not (eq .CurDbOption "PostgreSQL")}}hide{{end}}">
|
||||
<label class="req">{{.i18n.Tr "install.ssl_mode"}}</label>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="field sqlite-setting {{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
|
||||
<label class="req" for="db_path">{{.i18n.Tr "install.path"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_DbPath}}ipt-error{{end}}" id="db_path" name="db_path" value="{{.db_path}}" />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.sqlite_helper"}}</span>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "install.general_title"}}</div>
|
||||
<div class="field">
|
||||
<label class="req" for="repo_root_path">{{.i18n.Tr "install.repo_path"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_RepoRootPath}}ipt-error{{end}}" id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.repo_path_helper"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="run_user">{{.i18n.Tr "install.run_user"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_RunUser}}ipt-error{{end}}" id="run_user" name="run_user" value="{{.run_user}}" required />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.run_user_helper"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="domain">{{.i18n.Tr "install.domain"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Domain}}ipt-error{{end}}" id="domain" name="domain" value="{{.domain}}" required />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.domain_helper"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="http_port">{{.i18n.Tr "install.http_port"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_HttpPort}}ipt-error{{end}}" id="http_port" name="http_port" value="{{.http_port}}" required />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.http_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="app_url">{{.i18n.Tr "install.app_url"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_AppUrl}}ipt-error{{end}}" id="app_url" name="app_url" value="{{.app_url}}" required />
|
||||
<label></label>
|
||||
<span class="help">{{.i18n.Tr "install.app_url_helper"}}</span>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "install.email_title"}}</div>
|
||||
<div class="field">
|
||||
<label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtp_host" name="smtp_host" value="{{.smtp_host}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="smtp_user">{{.i18n.Tr "install.mailer_user"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_SMTPEmail}}ipt-error{{end}}" id="smtp_user" name="smtp_user" value="{{.smtp_user}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="smtp_pwd">{{.i18n.Tr "install.mailer_password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_SMTPPasswd}}ipt-error{{end}}" id="smtp_pwd" name="smtp_pwd" type="password" value="{{.smtp_pwd}}" />
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "install.notify_title"}}</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
|
||||
<strong>{{.i18n.Tr "install.register_confirm"}}</strong>
|
||||
<br>
|
||||
<label></label>
|
||||
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
|
||||
<strong>{{.i18n.Tr "install.mail_notify"}}</strong>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "install.admin_title"}}</div>
|
||||
<div class="field">
|
||||
<label class="req" for="admin_name">{{.i18n.Tr "install.admin_name"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_AdminName}}ipt-error{{end}}" id="admin_name" name="admin_name" value="{{.admin_name}}" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_AdminPasswd}}ipt-error{{end}}" id="admin_passwd" name="admin_passwd" type="password" value="{{.admin_passwd}}" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_AdminPasswd}}ipt-error{{end}}" id="admin_confirm_passwd" name="admin_confirm_passwd" type="password" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_AdminEmail}}ipt-error{{end}}" id="admin_email" name="admin_email" value="{{.admin_email}}" required />
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="field">
|
||||
<label></label>
|
||||
<button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "install.install_gogs"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "ng/base/footer" .}}
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-3 filters">
|
||||
<div class="filter-list">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{..IssueStats.AllCount}}</strong></a></li>
|
||||
<li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{.IssueStats.AllCount}}</strong></a></li>
|
||||
<li><a href="{{.RepoLink}}/issues?type=assigned&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li>
|
||||
<li><a href="{{.RepoLink}}/issues?type=created_by&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li>
|
||||
<li><a href="{{.RepoLink}}/issues?type=mentioned&state={{.State}}"{{if eq .ViewType "mentioned"}} class="active"{{end}}>Mentioning you <strong class="pull-right">{{.IssueStats.MentionCount}}</strong></a></li>
|
||||
|
||||
Reference in new issue
Block a user