mirror of
https://github.com/openvk/openvk
synced 2025-01-22 15:54:26 +03:00
The current gender is now displayed in the input
This commit is contained in:
parent
2e031fb482
commit
0b9f415109
4 changed files with 9 additions and 4 deletions
|
@ -167,8 +167,11 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
if ($this->postParam("gender"))
|
if ($this->postParam("gender"))
|
||||||
if($this->postParam("gender") == "hide")
|
if($this->postParam("gender") == "hide")
|
||||||
$user->setGender(NULL);
|
$user->setGender(NULL);
|
||||||
elseif($this->postParam("gender") == "other" && $this->postParam("other-gender-string"))
|
elseif($this->postParam("gender") == "other")
|
||||||
$user->setGender($this->postParam("other-gender-string"));
|
if($this->postParam("other-gender-string"))
|
||||||
|
$user->setGender($this->postParam("other-gender-string"));
|
||||||
|
else
|
||||||
|
$user->setGender(NULL);
|
||||||
else
|
else
|
||||||
$user->setGender($this->postParam("gender"));
|
$user->setGender($this->postParam("gender"));
|
||||||
|
|
||||||
|
|
|
@ -143,13 +143,13 @@
|
||||||
</script>
|
</script>
|
||||||
<td>
|
<td>
|
||||||
<select name="gender" onchange="genderChanged(event)">
|
<select name="gender" onchange="genderChanged(event)">
|
||||||
<option value="hide" n:attr="selected => $user->getRawGender() == NULL">{_hide}</option>
|
<option value="hide" n:attr="selected => $user->getRawGender() == NULL">{_hidden}</option>
|
||||||
<option value="female" n:attr="selected => $user->getRawGender() == 'female'">{_female}</option>
|
<option value="female" n:attr="selected => $user->getRawGender() == 'female'">{_female}</option>
|
||||||
<option value="male" n:attr="selected => $user->getRawGender() == 'male'">{_male}</option>
|
<option value="male" n:attr="selected => $user->getRawGender() == 'male'">{_male}</option>
|
||||||
<option value="non-binary" n:attr="selected => $user->getRawGender() == 'non-binary'">{_non-binary}</option>
|
<option value="non-binary" n:attr="selected => $user->getRawGender() == 'non-binary'">{_non-binary}</option>
|
||||||
<option value="other" n:attr="selected => $user->hasOtherGenderString()">{_other}</option>
|
<option value="other" n:attr="selected => $user->hasOtherGenderString()">{_other}</option>
|
||||||
</select>
|
</select>
|
||||||
<input id="other-gender-input" type="text" name="other-gender-string" placeholder="{_other_gender_placeholder}" style="display: {$user->hasOtherGenderString() ? 'inline' : 'none'};" />
|
<input id="other-gender-input" type="text" name="other-gender-string" placeholder="{_other_gender_placeholder}" style="display: {$user->hasOtherGenderString() ? 'inline' : 'none'};" n:attr="value => $user->hasOtherGenderString() ? $user->getGender() : ''" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
"non-binary" = "non-binary";
|
"non-binary" = "non-binary";
|
||||||
"other" = "other";
|
"other" = "other";
|
||||||
"other_gender_placeholder" = "I refer to myself as...";
|
"other_gender_placeholder" = "I refer to myself as...";
|
||||||
|
"hidden" = "not specified";
|
||||||
"description" = "Description";
|
"description" = "Description";
|
||||||
"save" = "Save";
|
"save" = "Save";
|
||||||
"main_information" = "Main information";
|
"main_information" = "Main information";
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
"non-binary" = "небинарный";
|
"non-binary" = "небинарный";
|
||||||
"other" = "другой";
|
"other" = "другой";
|
||||||
"other_gender_placeholder" = "Я идентифицирую себя как...";
|
"other_gender_placeholder" = "Я идентифицирую себя как...";
|
||||||
|
"hidden" = "не указан";
|
||||||
"description" = "Описание";
|
"description" = "Описание";
|
||||||
"save" = "Сохранить";
|
"save" = "Сохранить";
|
||||||
"main_information" = "Основная информация";
|
"main_information" = "Основная информация";
|
||||||
|
|
Loading…
Reference in a new issue