openvk/Web/Presenters/templates/User/Edit.xml

333 lines
16 KiB
XML
Raw Normal View History

2020-06-07 19:04:43 +03:00
{extends "../@layout.xml"}
2022-08-09 09:37:08 +03:00
{block title}{_edit_page}{/block}
2020-06-07 19:04:43 +03:00
{block header}
2022-08-09 09:37:08 +03:00
{_edit_page}
2020-06-07 19:04:43 +03:00
{/block}
{block content}
2022-04-24 08:06:45 +03:00
{var $isMain = $mode === 'main'}
{var $isContacts = $mode === 'contacts'}
{var $isInterests = $mode === 'interests'}
{var $isAvatar = $mode === 'avatar'}
2020-06-07 19:04:43 +03:00
<div n:if="$user->hasPendingNumberChange()" class="msg">
<b>Подтверждение номера телефона</b><br/>
2022-01-09 08:49:23 +03:00
Введите код для подтверждения смены номера: <a href="/edit/verify_phone">ввести код</a>.
2020-06-07 19:04:43 +03:00
</div>
<div class="tabs">
<div n:attr="id => ($isMain ? 'activetabs' : 'ki')" class="tab">
2022-08-09 09:37:08 +03:00
<a n:attr="id => ($isMain ? 'act_tab_a' : 'ki')" href="/edit">{_main}</a>
2020-06-07 19:04:43 +03:00
</div>
<div n:attr="id => ($isContacts ? 'activetabs' : 'ki')" class="tab">
2022-08-09 09:37:08 +03:00
<a n:attr="id => ($isContacts ? 'act_tab_a' : 'ki')" href="/edit?act=contacts">{_contacts}</a>
2020-06-07 19:04:43 +03:00
</div>
<div n:attr="id => ($isInterests ? 'activetabs' : 'ki')" class="tab">
2022-08-09 09:37:08 +03:00
<a n:attr="id => ($isInterests ? 'act_tab_a' : 'ki')" href="/edit?act=interests">{_interests}</a>
2020-06-07 19:04:43 +03:00
</div>
<div n:attr="id => ($isAvatar ? 'activetabs' : 'ki')" class="tab">
2022-08-09 09:37:08 +03:00
<a n:attr="id => ($isAvatar ? 'act_tab_a' : 'ki')" href="/edit?act=avatar">{_avatar}</a>
2020-06-07 19:04:43 +03:00
</div>
</div>
<div class="container_gray">
{if $isMain}
2022-08-09 09:37:08 +03:00
<h4>{_main_information}</h4>
2020-06-07 19:04:43 +03:00
<form action="/edit?act=main" method="POST" enctype="multipart/form-data">
2020-07-13 06:55:45 +03:00
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
2020-06-07 19:04:43 +03:00
<tbody>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_name}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="first_name" value="{$user->getFirstName(true)}" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_surname}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="last_name" value="{$user->getLastName(true)}" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_nickname}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="pseudo" value="{$user->getPseudo()}" />
</td>
</tr>
{if OPENVK_ROOT_CONF['openvk']['credentials']['zadarma']['enable']}
2020-06-07 19:04:43 +03:00
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_phone}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="phone" name="phone" value="{$user->getPhone()}" />
</td>
</tr>
{/if}
2020-06-07 19:04:43 +03:00
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_status}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="status" value="{$user->getStatus()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_hometown}: </span>
</td>
<td>
<input type="text" name="hometown" value="{$user->getHometown()}" />
</td>
</tr>
2020-06-07 19:04:43 +03:00
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_relationship}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<select name="marialstatus">
<option n:foreach="range(0, 8) as $i" n:attr="selected: ($user->getMaritalStatus() == $i)" value="{$i}">
{if $user->isFemale()}
{var $str = "relationship_$i"}
{if tr($str . "_fem") == ("@$str" . "_fem")}
2022-08-09 09:37:08 +03:00
{_$str}
{else}
{tr($str . "_fem")}
{/if}
{else}
{_"relationship_$i"}
{/if}
</option>
2020-06-07 19:04:43 +03:00
</select>
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_politViews}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<select name="politViews">
2022-08-09 09:37:08 +03:00
<option value="0" {if $user->getPoliticalViews() == 0}selected{/if}>{_politViews_0}</option>
<option value="1" {if $user->getPoliticalViews() == 1}selected{/if}>{_politViews_1}</option>
<option value="2" {if $user->getPoliticalViews() == 2}selected{/if}>{_politViews_2}</option>
<option value="3" {if $user->getPoliticalViews() == 3}selected{/if}>{_politViews_3}</option>
<option value="4" {if $user->getPoliticalViews() == 4}selected{/if}>{_politViews_4}</option>
<option value="5" {if $user->getPoliticalViews() == 5}selected{/if}>{_politViews_5}</option>
<option value="6" {if $user->getPoliticalViews() == 6}selected{/if}>{_politViews_6}</option>
<option value="7" {if $user->getPoliticalViews() == 7}selected{/if}>{_politViews_7}</option>
<option value="8" {if $user->getPoliticalViews() == 8}selected{/if}>{_politViews_8}</option>
<option value="9" {if $user->getPoliticalViews() == 9}selected{/if}>{_politViews_9}</option>
2020-06-07 19:04:43 +03:00
</select>
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_gender}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<select name="gender">
2022-08-09 09:37:08 +03:00
<option value="1" {if $user->isFemale() == true}selected{/if}>{_female}</option>
<option value="0" {if $user->isFemale() == false}selected{/if}>{_male}</option>
2020-06-07 19:04:43 +03:00
</select>
</td>
</tr>
2021-09-13 19:34:02 +03:00
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_birth_date}: </span>
2021-09-13 19:34:02 +03:00
</td>
<td>
<input max={date('Y-m-d')} name="birthday" value={is_null($user->getBirthday()) ? NULL : $user->getBirthday()->format('%Y-%m-%d')} type="date" style="margin-bottom: 7px;" />
<select name="birthday_privacy">
<option value="0" {if $user->getBirthdayPrivacy() == 0}selected{/if}>{_show_my_birthday}</option>
<option value="1" {if $user->getBirthdayPrivacy() == 1}selected{/if}>{_show_only_month_and_day}</option>
</select>
2021-09-13 19:34:02 +03:00
</td>
</tr>
2020-06-07 19:04:43 +03:00
<tr>
<td>
</td>
<td>
<input type="hidden" name="hash" value="{$csrfToken}" />
2022-08-09 09:37:08 +03:00
<input type="submit" value="{_save}" class="button" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
</tbody>
</table>
</form>
{elseif $isContacts}
2022-08-09 09:37:08 +03:00
<h4>{_contact_information}</h4>
2020-06-07 19:04:43 +03:00
<form action="/edit?act=contacts" method="POST" enctype="multipart/form-data">
2020-07-13 06:55:45 +03:00
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
2020-06-07 19:04:43 +03:00
<tbody>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_email}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="email" name="email_contact" value="{$user->getContactEmail()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_telegram}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="telegram" value="{$user->getTelegram()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_personal_website}: </span>
</td>
<td>
<input type="text" name="website" value="{$user->getWebsite()}" />
</td>
</tr>
2020-06-07 19:04:43 +03:00
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_city}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="city" value="{$user->getCity()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_address}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="text" name="address" value="{$user->getPhysicalAddress()}" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="hidden" name="hash" value="{$csrfToken}" />
2022-08-09 09:37:08 +03:00
<input type="submit" value="{_save}" class="button" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
</tbody>
</table>
</form>
{elseif $isInterests}
2022-08-09 09:37:08 +03:00
<h4>{_personal_information}</h4>
2020-06-07 19:04:43 +03:00
<form action="/edit?act=interests" method="POST" enctype="multipart/form-data">
2020-07-13 06:55:45 +03:00
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
2020-06-07 19:04:43 +03:00
<tbody>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_interests}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="interests">{$user->getInterests()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_favorite_music}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="fav_music">{$user->getFavoriteMusic()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_favorite_films}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="fav_films">{$user->getFavoriteFilms()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_favorite_shows}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="fav_shows">{$user->getFavoriteShows()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_favorite_books}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="fav_books">{$user->getFavoriteBooks()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_favorite_quotes}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="fav_quote">{$user->getFavoriteQuote()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_information_about}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
2020-07-13 06:55:45 +03:00
<textarea type="text" name="about">{$user->getDescription()}</textarea>
2020-06-07 19:04:43 +03:00
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="hidden" name="hash" value="{$csrfToken}" />
2022-08-09 09:37:08 +03:00
<input type="submit" value="{_save}" class="button" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
</tbody>
</table>
</form>
{elseif $isAvatar}
2022-08-09 09:37:08 +03:00
<h4>{_profile_picture}</h4>
<form action="/al_avatars" method="POST" enctype="multipart/form-data">
2020-07-13 06:55:45 +03:00
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
2020-06-07 19:04:43 +03:00
<tbody>
<tr>
<td width="120" valign="top">
2022-08-09 09:37:08 +03:00
<span class="nobold">{_picture}: </span>
2020-06-07 19:04:43 +03:00
</td>
<td>
<input type="file" name="blob" accept="image/*" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="hidden" name="hash" value="{$csrfToken}" />
2022-08-09 09:37:08 +03:00
<input type="submit" value="{_save}" class="button" />
2020-06-07 19:04:43 +03:00
</td>
</tr>
</tbody>
</table>
</form>
{/if}
</div>
{/block}