|
|
@ -1,75 +1,69 @@
|
|
|
|
{{template "ng/base/head" .}}
|
|
|
|
{{template "base/head" .}}
|
|
|
|
{{template "ng/base/header" .}}
|
|
|
|
<div class="user settings profile">
|
|
|
|
<div id="setting-wrapper" class="main-wrapper">
|
|
|
|
<div class="ui container">
|
|
|
|
<div id="user-profile-setting" class="container clear">
|
|
|
|
<div class="ui grid">
|
|
|
|
{{template "user/settings/nav" .}}
|
|
|
|
{{template "user/settings/navbar" .}}
|
|
|
|
<div class="grid-4-5 left">
|
|
|
|
<div class="twelve wide column content">
|
|
|
|
<div class="setting-content">
|
|
|
|
{{template "base/alert" .}}
|
|
|
|
{{template "ng/base/alert" .}}
|
|
|
|
<h4 class="ui top attached header">
|
|
|
|
<div id="setting-content">
|
|
|
|
{{.i18n.Tr "settings.public_profile"}}
|
|
|
|
<div id="user-profile-setting-content" class="panel panel-radius">
|
|
|
|
</h4>
|
|
|
|
<div class="panel-header">
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<strong>{{.i18n.Tr "settings.public_profile"}}</strong>
|
|
|
|
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
|
|
|
</div>
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings" method="post">
|
|
|
|
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="field">
|
|
|
|
|
|
|
|
<label>{{.i18n.Tr "settings.uid"}}</label>
|
|
|
|
<label>{{.i18n.Tr "settings.uid"}}</label>
|
|
|
|
<label class="text-left">{{.SignedUser.Id}}</label>
|
|
|
|
<span>{{.SignedUser.Id}}</span>
|
|
|
|
</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>
|
|
|
|
<div class="white-popup-block mfp-hide" id="change-username-modal">
|
|
|
|
<div class="required field {{if .Err_Name}}error{{end}}">
|
|
|
|
<h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
|
|
|
|
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
|
|
|
<p>{{.i18n.Tr "settings.change_username_desc"}}</p>
|
|
|
|
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
|
|
|
|
<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>
|
|
|
|
<div class="field">
|
|
|
|
<div class="field {{if .Err_FullName}}error{{end}}">
|
|
|
|
<label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
|
|
|
|
<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}}" />
|
|
|
|
<input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="required field {{if .Err_Email}}error{{end}}">
|
|
|
|
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
|
|
|
<label 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 />
|
|
|
|
<input id="email" name="email" value="{{.SignedUser.Email}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="field {{if .Err_Website}}error{{end}}">
|
|
|
|
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
|
|
|
<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}}" />
|
|
|
|
<input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="field">
|
|
|
|
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
|
|
|
<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}}" />
|
|
|
|
<input id="location" name="location" value="{{.SignedUser.Location}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if DisableGravatar}}hide{{end}}">
|
|
|
|
<div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
|
|
|
|
<label class="req" for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
|
|
|
|
<label for="gravatar">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}}" />
|
|
|
|
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<div class="field">
|
|
|
|
<label></label>
|
|
|
|
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
|
|
|
|
<button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings/avatar" method="post" enctype="multipart/form-data">
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="field">
|
|
|
|
<div class="inline field">
|
|
|
|
<label for="enable">{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
|
|
|
<label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
|
|
|
<input class="ipt-chk" id="enable" name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}} />
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<span>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</span>
|
|
|
|
<input name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
|
|
|
|
|
|
|
|
<label>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
|
|
|
|
<label>{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
|
|
|
|
|
|
|
<input name="avatar" type="file" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
|
|
|
|
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
|
|
|
|
|
|
|
<input name="avatar" type="file" >
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<div class="field">
|
|
|
|
<label></label>
|
|
|
|
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
|
|
|
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.update_avatar"}}</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -77,6 +71,4 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "ng/base/footer" .}}
|
|
|
|
|