#2154 disable change user for non-local users

- #2153 remove require for gravatar
This commit is contained in:
Unknwon committed 2015-12-11 15:31:02 -05:00
1 parent 5d95ffe3eb
commit d0b0d24f22
8 files changed
+18 -10

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current version: 0.7.42 Beta
##### Current version: 0.7.43 Beta
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
+1
View File
@@ -248,6 +248,7 @@ uid = Uid
public_profile = Public Profile
profile_desc = Your email address is public and will be used for any account related notifications, and any web based operations made via the site.
password_username_disabled = Non-local type users are not allowed to change their username.
full_name = Full Name
website = Website
location = Location
+1 -1
View File
@@ -18,7 +18,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.7.42.1211 Beta"
const APP_VER = "0.7.43.1211 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
+1 -1
View File
@@ -92,7 +92,7 @@ type UpdateProfileForm struct {
Email string `binding:"Required;Email;MaxSize(254)"`
Website string `binding:"Url;MaxSize(100)"`
Location string `binding:"MaxSize(50)"`
Gravatar string `binding:"Required;Email;MaxSize(254)"`
Gravatar string `binding:"OmitEmpty;Email;MaxSize(254)"`
}
func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
+2 -2
View File
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
return a, nil
}
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x72\xdc\x46\xb2\xe6\x7f\x3c\x05\xac\x09\x85\xa4\x08\xaa\x15\x1e\x9f\xbd\x84\xc3\xb2\x97\x22\xad\xcb\x39\xa2\xc8\x23\xd2\xf6\xce\x3a\x14\x30\xba\x81\xee\xc6\xa8\x1b\xe8\x01\xd0\xa4\xe8\x89\x79\x83\x7d\x80\x7d\xbe\x7d\x92\xcd\xfc\x32\xb3\x2e\x00\x9a\x94\x3c\x13\xab\x1f\x22\xba\x2a\xeb\x9e\x95\x95\x99\x95\x99\x95\xef\x76\x59\x51\x76\x8b\xf4\x79\x7a\x9c\xee\xf2\xaa\xde\x94\x5d\x97\x76\xe5\x66\xf9\x74\xdd\x74\x7d\x59\xa4\xaf\xaa\x9e\x7e\xb7\xd7\xd5\xa2\x4c\x92\x75\xb3\x2d\x09\xf4\x35\xfd\x49\x8a\xbc\x5b\xcf\x9b\xbc\x2d\x28\xe1\xd4\xbe\x93\xf2\xd3\x6e\xd3\xb4\x0c\xf4\xa3\x7c\x25\xeb\x72\xb3\xe3\x32\xf4\x27\xe9\xaa\x55\x9d\x55\x35\xfd\xbc\xa4\xaf\xf4\x4d\x2d\x29\xcd\xbe\xb7\xa4\xf3\x7d\x2f\x69\xfb\x9d\x25\xfd\xb4\x4b\xda\x72\x55\x51\x6f\x5a\x4a\x7a\xaf\x9f\xc9\x4d\x39\xef\xaa\x9e\x5b\xfa\x45\xbe\x92\xeb\xb2\xed\xaa\x86\x6b\xff\x59\xbe\x92\x5d\xbe\x62\x80\x0b\xfa\x93\xf4\xe5\x76\xb7\xc9\x51\xe0\x4a\x3f\x93\x4d\x5e\xaf\xf6\x02\xf3\x56\x3f\x93\x45\x5b\x52\x56\x56\x97\x37\x94\x7a\x82\x1f\xb3\xd9\x2c\xd9\xd3\x24\x64\xbb\xb6\x59\x56\x9b\x32\xcb\xeb\x22\xdb\xca\x30\x7f\xa2\xf4\x54\xd3\x53\x4a\x4f\x39\x1d\x43\x28\x0b\x1a\x6a\x96\x77\x3a\x0e\x9a\x4b\x1a\x79\xde\x25\xa8\xaa\xce\xb7\x56\x9a\x3f\x93\x72\x9b\x57\x1b\x9e\x35\xfe\x4b\xfd\xee\xba\x9b\x06\x53\x7b\xa1\x9f\x34\x07\x59\x7f\xbb\x2b\x31\x05\x4f\xaf\xe8\x2b\x59\xe4\xbb\x7e\xb1\xce\xb9\x9b\xf2\x95\x10\xd0\xae\xa1\xb9\x68\xda\x5b\xc0\xd9\x8f\xa4\x69\x57\x79\x5d\xfd\x9e\xf7\x32\x3f\xe7\xc1\xcf\x64\x5b\xb5\x6d\xc3\x53\x7b\x86\x8f\x84\x46\x9e\x71\x3d\x94\xf2\x8e\x26\x21\xa8\x85\x73\xb6\xd5\xaa\x95\x59\xe4\xcc\x33\xfc\xe2\x5a\x24\x4f\x6b\x92\x2c\x57\xdb\xb2\x69\x3f\x6a\xea\x4b\xfe\x1c\x54\x49\x9d\xd3\xdc\xb8\x5f\x79\x4d\xeb\xa1\xb9\x67\xf8\x11\x01\x74\x49\x5e\x6c\x69\x86\x77\x79\x5d\xf2\xd4\x1d\xf3\x2f\x9a\x2f\xfa\x95\xe4\x8b\x45\xb3\xaf\xfb\xac\x2b\xfb\xbe\xaa\x57\xbc\x06\xc7\x92\x94\x5e\x6a\x52\x12\xe4\xb9\xb4\xdb\x66\xef\x56\x99\xd2\xff\x42\x3f\xd3\x0b\xf9\x29\x79\x41\x21\x64\xba\x92\x3c\x92\x2e\x5b\x96\x65\x21\x63\xe9\xd2\x97\xf4\x9d\xec\xf6\x9b\x0d\xcd\xe6\xdf\xf6\x65\xd7\x73\xa1\x0b\xfa\x4d\xe3\x97\xdf\x49\xd5\x75\xf4\x41\xc9\x6f\xf0\x91\xd0\x92\xd6\x0b\x0c\xe6\x04\x1f\x49\xf2\x6b\x57\xe6\xed\x62\xfd\x21\x91\xbf\xe8\x2b\x7f\x30\x4a\x1e\x5a\x6c\xc6\x2f\xc5\x2d\x69\xc1\x1a\x48\x16\x4d\xc1\x3f\x4e\xe8\x0f\x55\x5d\xd5\x5d\x9f\x6f\x36\x1f\x12\xfd\x60\x30\xf9\x92\x05\xe8\xab\x1e\xb3\xa0\x89\xe9\x65\x5f\xee\x3a\x5e\xc1\xf4\x65\xd5\x76\xfd\xd3\xbe\x22\x1c\x7e\xbf\xaf\x93\xa2\x59\x7c\xa4\xdd\xc1\x3b\x1d\x2d\xbf\x59\xa6\x34\x59\x8f\x68\x7f\xb4\xfb\xba\xa6\xe9\x49\x5f\x35\x34\x65\xd4\x4c\x45\xed\x9f\x02\xfa\x28\xdd\x6d\xca\xbc\x23\x90\x32\x2f\xd2\xef\xf2\xb4\xcf\xdb\x55\xd9\x3f\x7f\x90\xcd\x69\x57\x7e\x7c\x90\xae\xdb\x72\xf9\xfc\xc1\xc3\xee\xc1\xf7\xaf\xf6\x54\x6c\x53\xd5\x65\xf7\xdd\xb3\xfc\xfb\x74\x91\x53\x0e\x4d\xe3\x6d\x3a\x2f\x97\xbc\x09\xa9\xad\x94\xb0\xbf\x5e\xf1\x06\xbc\xed\xd7\xdc\x20\x61\x02\x7d\x74\x29\x53\x80\xaf\x12\x5e\x00\xa2\x10\x59\x31\x37\x6a\x87\x0e\x21\xb9\xa5\x05\x38\xbb\xbd\xfc\xcf\xb7\x47\xe9\x05\x91\xbc\x55\x5b\xe2\x9b\xfe\xa3\x12\xdf\xa4\x34\xda\xab\xea\xf4\xc5\x2c\xa1\xb2\x36\x21\xa7\x79\x9f\xcf\xb9\xef\x6e\xf5\x39\x53\x36\xa7\xcb\xc3\x16\x65\x22\x0a\x82\xd9\xf5\xd1\xb2\x4c\x6d\x70\xaa\x43\xa9\x82\xab\xe3\x1d\x93\x06\x4a\x77\x33\x7b\x21\x73\x46\x55\xa5\x6f\xde\xbd\x3b\x3f\x7d\x91\x96\xf5\x8a\x66\x26\xbd\xa9\xfa\x75\xba\xef\x97\xff\x3d\x5b\x95\x75\xd9\xe6\x9b\x6c\x51\xf1\xa4\xb4\x84\xb0\x29\xcd\x92\x0c\x71\x96\x74\xdd\x86\x28\x17\xb0\xe0\xf2\xf2\x6d\x7a\xc6\x98\xb0\xcb\xfb\x35\x3a\xd2\xaf\x93\xee\x6f\x1b\x9e\x28\xd7\xe0\xd5\xba\x4c\xb1\x19\x00\xd4\x2c\x87\xf3\x92\x16\xda\xd7\x59\x52\xb6\x6d\x46\x84\xb5\xbf\xe5\x69\xd6\x3a\x0f\x41\x4b\x75\x84\xed\x75\xd3\xd3\x32\xa6\x28\x27\x55\x54\xf5\x75\xbe\xa9\x0a\x9a\x6c\x3f\x21\x71\x59\x24\x16\x0d\xad\x1b\x97\x26\xcc\x6c\x6e\x30\xd4\x7c\x41\xe7\x42\x97\x3e\x98\x3d\x00\x21\x7e\xf0\xf4\xc1\x2c\xa9\x9b\x4c\xa8\x04\x93\xec\xa2\xea\xf2\x39\x91\x6f\x39\x4e\x5a\xa3\x86\x7f\x61\xfc\x91\xae\x28\x44\x1a\x41\xf0\xdc\xf2\x11\x85\x93\x81\x91\x2b\x27\x3a\x0e\x62\xa3\x64\x26\x1c\xbb\xd1\x24\xb7\xbe\x42\x96\x5c\xc2\x68\xcc\x89\x2d\x98\x61\xd7\xf1\x6e\xb7\xa9\x16\xd2\xf4\x2b\xc9\xf3\x88\xc6\x07\xb6\x4e\x4a\x08\x07\x44\xb1\xbc\x00\x5d\xa8\xd7\x4c\xb6\xd2\x88\xfe\xa3\xfc\xba\xa4\x9d\xb3\xde\xaf\xe4\xd0\xda\x34\xfb\xe2\x2b\x10\x14\x5b\x39\x4f\x4f\xd2\xf7\x0d\x75\x18\xd8\xe1\x00\x7c\x13\xc7\x44\x18\x98\x47\x68\xcb\x6d\xd3\xf3\xc4\x69\xb1\x8a\x96\xe7\xa6\xa2\x4c\x1a\x69\x97\x5f\x13\x59\xec\x1b\xd9\x92\x05\x6d\xb9\x05\x57\x4c\x14\x6c\x4f\x07\xbd\x6c\x0b\xa2\x23\xb2\x35\x2c\x2d\xc6\x41\x40\x6d\xf7\xb4\x9b\xd6\x54\x19\x4f\x3c\x33\x2a\x54\xe5\x54\x3f\x31\x24\xaa\x07\xbb\x9c\x76\x6e\x43\x87\x2a\x2f\xf4\x29\x3e\xf4\x77\x58\x3f\xf5\x2a\x5f\x2e\xa9\x57\x1d\xed\x8a\xd7\xe9\x62\xd3\xd0\x96\xfa\xe9\xfd\xdb\x8e\x37\xcc\x3a\xdb\x35\x2d\x18\x14\xca\xba\xa0\x4f\x97\x16\x4c\x34\x43\xd4\xfb\xed\x9c\x7e\xdd\xac\x2b\x22\xd4\x98\x76\x2e\xc1\xcc\x13\xa5\x52\x13\xfb\x8Line truncated
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x72\xdc\x46\xb2\xe6\x7f\x3c\x05\xac\x09\x85\xa4\x08\xaa\x15\x1e\x9f\xbd\x84\xc3\xb2\x97\x22\xad\xcb\x39\xa2\xc8\x23\xd2\xf6\xce\x3a\x14\x30\xba\x81\xee\xc6\xa8\x1b\xe8\x01\xd0\xa4\xe8\x89\x79\x83\x7d\x80\x7d\xbe\x7d\x92\xcd\xfc\x32\xb3\x2e\x00\x9a\x94\x3c\x13\xab\x1f\x22\xba\x2a\xeb\x9e\x95\x95\x99\x95\x99\x95\xef\x76\x59\x51\x76\x8b\xf4\x79\x7a\x9c\xee\xf2\xaa\xde\x94\x5d\x97\x76\xe5\x66\xf9\x74\xdd\x74\x7d\x59\xa4\xaf\xaa\x9e\x7e\xb7\xd7\xd5\xa2\x4c\x92\x75\xb3\x2d\x09\xf4\x35\xfd\x49\x8a\xbc\x5b\xcf\x9b\xbc\x2d\x28\xe1\xd4\xbe\x93\xf2\xd3\x6e\xd3\xb4\x0c\xf4\xa3\x7c\x25\xeb\x72\xb3\xe3\x32\xf4\x27\xe9\xaa\x55\x9d\x55\x35\xfd\xbc\xa4\xaf\xf4\x4d\x2d\x29\xcd\xbe\xb7\xa4\xf3\x7d\x2f\x69\xfb\x9d\x25\xfd\xb4\x4b\xda\x72\x55\x51\x6f\x5a\x4a\x7a\xaf\x9f\xc9\x4d\x39\xef\xaa\x9e\x5b\xfa\x45\xbe\x92\xeb\xb2\xed\xaa\x86\x6b\xff\x59\xbe\x92\x5d\xbe\x62\x80\x0b\xfa\x93\xf4\xe5\x76\xb7\xc9\x51\xe0\x4a\x3f\x93\x4d\x5e\xaf\xf6\x02\xf3\x56\x3f\x93\x45\x5b\x52\x56\x56\x97\x37\x94\x7a\x82\x1f\xb3\xd9\x2c\xd9\xd3\x24\x64\xbb\xb6\x59\x56\x9b\x32\xcb\xeb\x22\xdb\xca\x30\x7f\xa2\xf4\x54\xd3\x53\x4a\x4f\x39\x1d\x43\x28\x0b\x1a\x6a\x96\x77\x3a\x0e\x9a\x4b\x1a\x79\xde\x25\xa8\xaa\xce\xb7\x56\x9a\x3f\x93\x72\x9b\x57\x1b\x9e\x35\xfe\x4b\xfd\xee\xba\x9b\x06\x53\x7b\xa1\x9f\x34\x07\x59\x7f\xbb\x2b\x31\x05\x4f\xaf\xe8\x2b\x59\xe4\xbb\x7e\xb1\xce\xb9\x9b\xf2\x95\x10\xd0\xae\xa1\xb9\x68\xda\x5b\xc0\xd9\x8f\xa4\x69\x57\x79\x5d\xfd\x9e\xf7\x32\x3f\xe7\xc1\xcf\x64\x5b\xb5\x6d\xc3\x53\x7b\x86\x8f\x84\x46\x9e\x71\x3d\x94\xf2\x8e\x26\x21\xa8\x85\x73\xb6\xd5\xaa\x95\x59\xe4\xcc\x33\xfc\xe2\x5a\x24\x4f\x6b\x92\x2c\x57\xdb\xb2\x69\x3f\x6a\xea\x4b\xfe\x1c\x54\x49\x9d\xd3\xdc\xb8\x5f\x79\x4d\xeb\xa1\xb9\x67\xf8\x11\x01\x74\x49\x5e\x6c\x69\x86\x77\x79\x5d\xf2\xd4\x1d\xf3\x2f\x9a\x2f\xfa\x95\xe4\x8b\x45\xb3\xaf\xfb\xac\x2b\xfb\xbe\xaa\x57\xbc\x06\xc7\x92\x94\x5e\x6a\x52\x12\xe4\xb9\xb4\xdb\x66\xef\x56\x99\xd2\xff\x42\x3f\xd3\x0b\xf9\x29\x79\x41\x21\x64\xba\x92\x3c\x92\x2e\x5b\x96\x65\x21\x63\xe9\xd2\x97\xf4\x9d\xec\xf6\x9b\x0d\xcd\xe6\xdf\xf6\x65\xd7\x73\xa1\x0b\xfa\x4d\xe3\x97\xdf\x49\xd5\x75\xf4\x41\xc9\x6f\xf0\x91\xd0\x92\xd6\x0b\x0c\xe6\x04\x1f\x49\xf2\x6b\x57\xe6\xed\x62\xfd\x21\x91\xbf\xe8\x2b\x7f\x30\x4a\x1e\x5a\x6c\xc6\x2f\xc5\x2d\x69\xc1\x1a\x48\x16\x4d\xc1\x3f\x4e\xe8\x0f\x55\x5d\xd5\x5d\x9f\x6f\x36\x1f\x12\xfd\x60\x30\xf9\x92\x05\xe8\xab\x1e\xb3\xa0\x89\xe9\x65\x5f\xee\x3a\x5e\xc1\xf4\x65\xd5\x76\xfd\xd3\xbe\x22\x1c\x7e\xbf\xaf\x93\xa2\x59\x7c\xa4\xdd\xc1\x3b\x1d\x2d\xbf\x59\xa6\x34\x59\x8f\x68\x7f\xb4\xfb\xba\xa6\xe9\x49\x5f\x35\x34\x65\xd4\x4c\x45\xed\x9f\x02\xfa\x28\xdd\x6d\xca\xbc\x23\x90\x32\x2f\xd2\xef\xf2\xb4\xcf\xdb\x55\xd9\x3f\x7f\x90\xcd\x69\x57\x7e\x7c\x90\xae\xdb\x72\xf9\xfc\xc1\xc3\xee\xc1\xf7\xaf\xf6\x54\x6c\x53\xd5\x65\xf7\xdd\xb3\xfc\xfb\x74\x91\x53\x0e\x4d\xe3\x6d\x3a\x2f\x97\xbc\x09\xa9\xad\x94\xb0\xbf\x5e\xf1\x06\xbc\xed\xd7\xdc\x20\x61\x02\x7d\x74\x29\x53\x80\xaf\x12\x5e\x00\xa2\x10\x59\x31\x37\x6a\x87\x0e\x21\xb9\xa5\x05\x38\xbb\xbd\xfc\xcf\xb7\x47\xe9\x05\x91\xbc\x55\x5b\xe2\x9b\xfe\xa3\x12\xdf\xa4\x34\xda\xab\xea\xf4\xc5\x2c\xa1\xb2\x36\x21\xa7\x79\x9f\xcf\xb9\xef\x6e\xf5\x39\x53\x36\xa7\xcb\xc3\x16\x65\x22\x0a\x82\xd9\xf5\xd1\xb2\x4c\x6d\x70\xaa\x43\xa9\x82\xab\xe3\x1d\x93\x06\x4a\x77\x33\x7b\x21\x73\x46\x55\xa5\x6f\xde\xbd\x3b\x3f\x7d\x91\x96\xf5\x8a\x66\x26\xbd\xa9\xfa\x75\xba\xef\x97\xff\x3d\x5b\x95\x75\xd9\xe6\x9b\x6c\x51\xf1\xa4\xb4\x84\xb0\x29\xcd\x92\x0c\x71\x96\x74\xdd\x86\x28\x17\xb0\xe0\xf2\xf2\x6d\x7a\xc6\x98\xb0\xcb\xfb\x35\x3a\xd2\xaf\x93\xee\x6f\x1b\x9e\x28\xd7\xe0\xd5\xba\x4c\xb1\x19\x00\xd4\x2c\x87\xf3\x92\x16\xda\xd7\x59\x52\xb6\x6d\x46\x84\xb5\xbf\xe5\x69\xd6\x3a\x0f\x41\x4b\x75\x84\xed\x75\xd3\xd3\x32\xa6\x28\x27\x55\x54\xf5\x75\xbe\xa9\x0a\x9a\x6c\x3f\x21\x71\x59\x24\x16\x0d\xad\x1b\x97\x26\xcc\x6c\x6e\x30\xd4\x7c\x41\xe7\x42\x97\x3e\x98\x3d\x00\x21\x7e\xf0\xf4\xc1\x2c\xa9\x9b\x4c\xa8\x04\x93\xec\xa2\xea\xf2\x39\x91\x6f\x39\x4e\x5a\xa3\x86\x7f\x61\xfc\x91\xae\x28\x44\x1a\x41\xf0\xdc\xf2\x11\x85\x93\x81\x91\x2b\x27\x3a\x0e\x62\xa3\x64\x26\x1c\xbb\xd1\x24\xb7\xbe\x42\x96\x5c\xc2\x68\xcc\x89\x2d\x98\x61\xd7\xf1\x6e\xb7\xa9\x16\xd2\xf4\x2b\xc9\xf3\x88\xc6\x07\xb6\x4e\x4a\x08\x07\x44\xb1\xbc\x00\x5d\xa8\xd7\x4c\xb6\xd2\x88\xfe\xa3\xfc\xba\xa4\x9d\xb3\xde\xaf\xe4\xd0\xda\x34\xfb\xe2\x2b\x10\x14\x5b\x39\x4f\x4f\xd2\xf7\x0d\x75\x18\xd8\xe1\x00\x7c\x13\xc7\x44\x18\x98\x47\x68\xcb\x6d\xd3\xf3\xc4\x69\xb1\x8a\x96\xe7\xa6\xa2\x4c\x1a\x69\x97\x5f\x13\x59\xec\x1b\xd9\x92\x05\x6d\xb9\x05\x57\x4c\x14\x6c\x4f\x07\xbd\x6c\x0b\xa2\x23\xb2\x35\x2c\x2d\xc6\x41\x40\x6d\xf7\xb4\x9b\xd6\x54\x19\x4f\x3c\x33\x2a\x54\xe5\x54\x3f\x31\x24\xaa\x07\xbb\x9c\x76\x6e\x43\x87\x2a\x2f\xf4\x29\x3e\xf4\x77\x58\x3f\xf5\x2a\x5f\x2e\xa9\x57\x1d\xed\x8a\xd7\xe9\x62\xd3\xd0\x96\xfa\xe9\xfd\xdb\x8e\x37\xcc\x3a\xdb\x35\x2d\x18\x14\xca\xba\xa0\x4f\x97\x16\x4c\x34\x43\xd4\xfb\xed\x9c\x7e\xdd\xac\x2b\x22\xd4\x98\x76\x2e\xc1\xcc\x13\xa5\x52\x13\xfb\x8Line truncated
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
return bindataRead(
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 48201, mode: os.FileMode(420), modTime: time.Unix(1449827459, 0)}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 48293, mode: os.FileMode(420), modTime: time.Unix(1449865728, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
+4 -2
View File
@@ -79,8 +79,10 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
ctx.User.Email = form.Email
ctx.User.Website = form.Website
ctx.User.Location = form.Location
ctx.User.Avatar = base.EncodeMD5(form.Gravatar)
ctx.User.AvatarEmail = form.Gravatar
if len(form.Gravatar) > 0 {
ctx.User.Avatar = base.EncodeMD5(form.Gravatar)
ctx.User.AvatarEmail = form.Gravatar
}
if err := models.UpdateUser(ctx.User); err != nil {
ctx.Handle(500, "UpdateUser", err)
return
+1 -1
View File
@@ -1 +1 @@
0.7.42.1211 Beta
0.7.43.1211 Beta
+7 -2
View File
@@ -14,7 +14,10 @@
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_Name}}error{{end}}">
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{end}}>
{{if not .SignedUser.IsLocal}}
<p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
{{end}}
</div>
<div class="field {{if .Err_FullName}}error{{end}}">
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
@@ -32,10 +35,12 @@
<label for="location">{{.i18n.Tr "settings.location"}}</label>
<input id="location" name="location" value="{{.SignedUser.Location}}">
</div>
<div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
{{if not DisableGravatar}}
<div class="field {{if .Err_Gravatar}}error{{end}}">
<label for="gravatar">Gravatar {{.i18n.Tr "email"}}</label>
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
</div>
{{end}}
<div class="field">
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>