aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-21 10:58:08 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-21 10:58:08 -0500
commit55dfe2c97876a8af5db0fb071f002e33fb686128 (patch)
treec43f8eb741f1dd69b62888202582e4894a5da66d /templates/user/settings
parent3c3f7c2a56ba18d7210cc40e33e64da5219ef990 (diff)
downloadgitea-55dfe2c97876a8af5db0fb071f002e33fb686128.tar.gz
gitea-55dfe2c97876a8af5db0fb071f002e33fb686128.zip
custom avatar upload
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/profile.tmpl100
1 files changed, 57 insertions, 43 deletions
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 5338d295f6..85db6f8951 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -11,49 +11,63 @@
<div class="panel-header">
<strong>{{.i18n.Tr "settings.public_profile"}}</strong>
</div>
- <form class="form form-align panel-body" id="user-profile-form" action="{{AppSubUrl}}/user/settings" method="post">
- {{.CsrfTokenHtml}}
- <div class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</div>
- <div class="field">
- <label>{{.i18n.Tr "settings.uid"}}</label>
- <label class="text-left">{{.SignedUser.Id}}</label>
- </div>
- <div class="field">
- <label class="req" for="username">{{.i18n.Tr "username"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.SignedUser.Name}}" data-uname="{{.SignedUser.Name}}" required />
- </div>
- <div class="white-popup-block mfp-hide" id="change-username-modal">
- <h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
- <p>{{.i18n.Tr "settings.change_username_desc"}}</p>
- <br>
- <button class="btn btn-red btn-large btn-radius" id="change-username-submit">{{.i18n.Tr "settings.continue"}}</button>
- <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
- </div>
- <div class="field">
- <label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.SignedUser.FullName}}" />
- </div>
- <div class="field">
- <label class="req" for="email">{{.i18n.Tr "email"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.SignedUser.Email}}" required />
- </div>
- <div class="field">
- <label for="website">{{.i18n.Tr "settings.website"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.SignedUser.Website}}" />
- </div>
- <div class="field">
- <label for="location">{{.i18n.Tr "settings.location"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.SignedUser.Location}}" />
- </div>
- <div class="field">
- <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.SignedUser.AvatarEmail}}" />
- </div>
- <div class="field">
- <label></label>
- <button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
- </div>
- </form>
+ <div class="panel-body">
+ <form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</div>
+ <div class="field">
+ <label>{{.i18n.Tr "settings.uid"}}</label>
+ <label class="text-left">{{.SignedUser.Id}}</label>
+ </div>
+ <div class="field">
+ <label class="req" for="username">{{.i18n.Tr "username"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.SignedUser.Name}}" data-uname="{{.SignedUser.Name}}" required />
+ </div>
+ <div class="white-popup-block mfp-hide" id="change-username-modal">
+ <h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
+ <p>{{.i18n.Tr "settings.change_username_desc"}}</p>
+ <br>
+ <button class="btn btn-red btn-large btn-radius" id="change-username-submit">{{.i18n.Tr "settings.continue"}}</button>
+ <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
+ </div>
+ <div class="field">
+ <label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.SignedUser.FullName}}" />
+ </div>
+ <div class="field">
+ <label class="req" for="email">{{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.SignedUser.Email}}" required />
+ </div>
+ <div class="field">
+ <label for="website">{{.i18n.Tr "settings.website"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.SignedUser.Website}}" />
+ </div>
+ <div class="field">
+ <label for="location">{{.i18n.Tr "settings.location"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.SignedUser.Location}}" />
+ </div>
+ <div class="field">
+ <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.SignedUser.AvatarEmail}}" />
+ </div>
+ <div class="field">
+ <label></label>
+ <button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
+ </div>
+ </form>
+ <hr>
+ <form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings/avatar" method="post" enctype="multipart/form-data">
+ {{.CsrfTokenHtml}}
+ <div class="field">
+ <label>{{.i18n.Tr "settings.choose_new_avatar"}}</label>
+ <input name="avatar" type="file" required />
+ </div>
+ <div class="field">
+ <label></label>
+ <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.upload_avatar"}}</button>
+ </div>
+ </form>
+ </div>
</div>
</div>
</div>