only add name attribute to pronouns input in JS, to ensure fallback works
This commit is contained in:
parent
454ceb2ada
commit
1c551f923b
2 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<span class="inline field"><label for="pronouns">{{ctx.Locale.Tr "settings.pronouns"}}</label></span>
|
<span class="inline field"><label for="pronouns">{{ctx.Locale.Tr "settings.pronouns"}}</label></span>
|
||||||
<div id="pronouns-dropdown" style="display: none" class="ui selection dropdown">
|
<div id="pronouns-dropdown" style="display: none" class="ui selection dropdown">
|
||||||
<input type="hidden" name="pronouns" value="{{.SignedUser.Pronouns}}">
|
<input type="hidden" value="{{.SignedUser.Pronouns}}">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
{{if .PronounsAreCustom}}
|
{{if .PronounsAreCustom}}
|
||||||
{{ctx.Locale.Tr "settings.pronouns_custom"}}
|
{{ctx.Locale.Tr "settings.pronouns_custom"}}
|
||||||
|
|
|
@ -54,6 +54,7 @@ export function initUserSettings() {
|
||||||
// If JS is disabled, the page will show the custom input, as the dropdown requires JS to work.
|
// If JS is disabled, the page will show the custom input, as the dropdown requires JS to work.
|
||||||
// JS progressively enhances the input by adding a dropdown, but it works regardless.
|
// JS progressively enhances the input by adding a dropdown, but it works regardless.
|
||||||
pronounsCustom.removeAttribute('name');
|
pronounsCustom.removeAttribute('name');
|
||||||
|
pronounsInput.setAttribute('name', 'pronouns');
|
||||||
pronounsDropdown.style.display = '';
|
pronounsDropdown.style.display = '';
|
||||||
|
|
||||||
onPronounsDropdownUpdate();
|
onPronounsDropdownUpdate();
|
||||||
|
|
Loading…
Reference in a new issue