diff options
author | Unknwon <u@gogs.io> | 2015-12-11 15:31:02 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-11 15:31:02 -0500 |
commit | d0b0d24f22f117eb6ae41a5180b8cdb7d957ac55 (patch) | |
tree | fbfff51c5aa2463e56145f6e2a62e42f1dff3d66 /templates/user | |
parent | 5d95ffe3eb216845606b7652160865eb1dd58111 (diff) | |
download | gitea-d0b0d24f22f117eb6ae41a5180b8cdb7d957ac55.tar.gz gitea-d0b0d24f22f117eb6ae41a5180b8cdb7d957ac55.zip |
#2154 disable change user for non-local users
- #2153 remove require for gravatar
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/settings/profile.tmpl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 37d5683671..7f46569984 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -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> |