Fixed a bug where phrases would sometimes get entitised.
Fixed a couple of spots which didn't have phrases. Removed inline CSS in a couple of places and added a missing tooltip. Added the account_username_save phrase.
This commit is contained in:
parent
05ab585d41
commit
96a5a9e872
|
@ -142,6 +142,7 @@ var PreRenderHooks = map[string][]func(http.ResponseWriter, *http.Request, *User
|
||||||
"pre_render_account_own_edit_mfa": nil,
|
"pre_render_account_own_edit_mfa": nil,
|
||||||
"pre_render_account_own_edit_mfa_setup": nil,
|
"pre_render_account_own_edit_mfa_setup": nil,
|
||||||
"pre_render_account_own_edit_email": nil,
|
"pre_render_account_own_edit_email": nil,
|
||||||
|
"pre_render_level_list": nil,
|
||||||
"pre_render_login": nil,
|
"pre_render_login": nil,
|
||||||
"pre_render_login_mfa_verify": nil,
|
"pre_render_login_mfa_verify": nil,
|
||||||
"pre_render_register": nil,
|
"pre_render_register": nil,
|
||||||
|
|
|
@ -508,7 +508,7 @@ func InitTemplates() error {
|
||||||
panic("phraseNameInt is not a string")
|
panic("phraseNameInt is not a string")
|
||||||
}
|
}
|
||||||
// TODO: Log non-existent phrases?
|
// TODO: Log non-existent phrases?
|
||||||
return GetTmplPhrase(phraseName)
|
return template.HTML(GetTmplPhrase(phraseName))
|
||||||
}
|
}
|
||||||
|
|
||||||
fmap["level"] = func(levelInt interface{}) interface{} {
|
fmap["level"] = func(levelInt interface{}) interface{} {
|
||||||
|
@ -516,7 +516,7 @@ func InitTemplates() error {
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("levelInt is not an integer")
|
panic("levelInt is not an integer")
|
||||||
}
|
}
|
||||||
return GetLevelPhrase(level)
|
return template.HTML(GetLevelPhrase(level))
|
||||||
}
|
}
|
||||||
|
|
||||||
fmap["scope"] = func(name interface{}) interface{} {
|
fmap["scope"] = func(name interface{}) interface{} {
|
||||||
|
|
|
@ -448,6 +448,7 @@
|
||||||
"account_dash_2fa_setup":"Setup your two-factor authentication.",
|
"account_dash_2fa_setup":"Setup your two-factor authentication.",
|
||||||
"account_dash_2fa_manage":"Remove or manage your two-factor authentication.",
|
"account_dash_2fa_manage":"Remove or manage your two-factor authentication.",
|
||||||
"account_dash_security_notice":"Security",
|
"account_dash_security_notice":"Security",
|
||||||
|
"account_username_save":"Save",
|
||||||
"account_avatar_select":"Select",
|
"account_avatar_select":"Select",
|
||||||
"account_avatar_update_button":"Upload",
|
"account_avatar_update_button":"Upload",
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
<span id="dash_username">
|
<span id="dash_username">
|
||||||
<form id="dash_username_form" action="/user/edit/username/submit/?session={{.CurrentUser.Session}}" method="post"></form>
|
<form id="dash_username_form" action="/user/edit/username/submit/?session={{.CurrentUser.Session}}" method="post"></form>
|
||||||
<input form="dash_username_form" name="account-new-username" value="{{.CurrentUser.Name}}" />
|
<input form="dash_username_form" name="account-new-username" value="{{.CurrentUser.Name}}" />
|
||||||
<button form="dash_username_form" class="formbutton">Save</button>
|
<button form="dash_username_form" class="formbutton">{{lang "account_username_save"}}</button>
|
||||||
</span>
|
</span>
|
||||||
<img src="{{.CurrentUser.Avatar}}" height="128px" />
|
<img src="{{.CurrentUser.Avatar}}" height="128px" />
|
||||||
<span id="dash_avatar_buttons">
|
<span id="dash_avatar_buttons">
|
||||||
<input form="avatar_form" id="select_avatar" name="account-avatar" type="file" required style="display: none;" />
|
<input form="avatar_form" id="select_avatar" name="account-avatar" type="file" required style="display: none;" />
|
||||||
<label for="select_avatar" class="formbutton">Select</label>
|
<label for="select_avatar" class="formbutton">{{lang "account_avatar_select"}}</label>
|
||||||
<button form="avatar_form" name="account-button" class="formbutton">{{lang "account_avatar_update_button"}}</button>
|
<button form="avatar_form" name="account-button" class="formbutton">{{lang "account_avatar_update_button"}}</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
<a class="username hide_on_micro like_count" aria-label="{{lang "topic.like_count_aria"}}">{{.Topic.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic.like_count_tooltip"}}"></a>
|
<a class="username hide_on_micro like_count" aria-label="{{lang "topic.like_count_aria"}}">{{.Topic.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic.like_count_tooltip"}}"></a>
|
||||||
|
|
||||||
{{if .Topic.Tag}}<a class="username hide_on_micro user_tag">{{.Topic.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic.level_aria"}}">{{level .Topic.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="{{lang "topic.level_tooltip"}}"></a>{{end}}
|
{{if .Topic.Tag}}<a class="username hide_on_micro user_tag">{{.Topic.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic.level_aria"}}" title="{{lang "topic.level_tooltip"}}">{{level .Topic.Level}}</a><a class="username hide_on_micro level_label" title="{{lang "topic.level_tooltip"}}"></a>{{end}}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<a class="username hide_on_micro like_count">{{.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic.post_like_count_tooltip"}}"></a>
|
<a class="username hide_on_micro like_count">{{.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic.post_like_count_tooltip"}}"></a>
|
||||||
|
|
||||||
{{if .Tag}}<a class="username hide_on_micro user_tag">{{.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic.post_level_aria"}}">{{.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="{{lang "topic.post_level_tooltip"}}"></a>{{end}}
|
{{if .Tag}}<a class="username hide_on_micro user_tag">{{.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic.post_level_aria"}}" title="{{lang "topic.post_level_tooltip"}}">{{.Level}}</a><a class="username hide_on_micro level_label" title="{{lang "topic.post_level_tooltip"}}"></a>{{end}}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -706,6 +706,7 @@ button.username {
|
||||||
.level_label {
|
.level_label {
|
||||||
color: #505050;
|
color: #505050;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
.level_hideable {
|
.level_hideable {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Reference in New Issue