mirror of
https://github.com/openvk/openvk
synced 2024-11-11 09:29:29 +03:00
374 lines
17 KiB
XML
374 lines
17 KiB
XML
{extends "../@layout.xml"}
|
|
{if $mode === 'backdrop'}
|
|
{var $backdrops = $user->getBackDropPictureURLs()}
|
|
{/if}
|
|
|
|
{block title}{_edit_page}{/block}
|
|
|
|
{block header}
|
|
{_edit_page}
|
|
{/block}
|
|
|
|
{block content}
|
|
{var $isMain = $mode === 'main'}
|
|
{var $isContacts = $mode === 'contacts'}
|
|
{var $isInterests = $mode === 'interests'}
|
|
{var $isAvatar = $mode === 'avatar'}
|
|
{var $isBackDrop = $mode === 'backdrop'}
|
|
|
|
<div n:if="$user->hasPendingNumberChange()" class="msg">
|
|
<b>Подтверждение номера телефона</b><br/>
|
|
Введите код для подтверждения смены номера: <a href="/edit/verify_phone">ввести код</a>.
|
|
</div>
|
|
|
|
<div class="tabs">
|
|
<div n:attr="id => ($isMain ? 'activetabs' : 'ki')" class="tab">
|
|
<a n:attr="id => ($isMain ? 'act_tab_a' : 'ki')" href="/edit">{_main}</a>
|
|
</div>
|
|
<div n:attr="id => ($isContacts ? 'activetabs' : 'ki')" class="tab">
|
|
<a n:attr="id => ($isContacts ? 'act_tab_a' : 'ki')" href="/edit?act=contacts">{_contacts}</a>
|
|
</div>
|
|
<div n:attr="id => ($isInterests ? 'activetabs' : 'ki')" class="tab">
|
|
<a n:attr="id => ($isInterests ? 'act_tab_a' : 'ki')" href="/edit?act=interests">{_interests}</a>
|
|
</div>
|
|
<div n:attr="id => ($isAvatar ? 'activetabs' : 'ki')" class="tab">
|
|
<a n:attr="id => ($isAvatar ? 'act_tab_a' : 'ki')" href="/edit?act=avatar">{_avatar}</a>
|
|
</div>
|
|
<div n:attr="id => ($isBackDrop ? 'activetabs' : 'ki')" class="tab">
|
|
<a n:attr="id => ($isBackDrop ? 'act_tab_a' : 'ki')" href="/edit?act=backdrop">{_backdrop_short}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container_gray">
|
|
{if $isMain}
|
|
|
|
<h4>{_main_information}</h4>
|
|
<form action="/edit?act=main" method="POST" enctype="multipart/form-data">
|
|
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_name}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="first_name" value="{$user->getFirstName(true)}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_surname}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="last_name" value="{$user->getLastName(true)}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_nickname}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="pseudo" value="{$user->getPseudo()}" />
|
|
</td>
|
|
</tr>
|
|
{if OPENVK_ROOT_CONF['openvk']['credentials']['zadarma']['enable']}
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_phone}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="phone" name="phone" value="{$user->getPhone()}" />
|
|
</td>
|
|
</tr>
|
|
{/if}
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_status}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="status" value="{$user->getStatus()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_hometown}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="hometown" value="{$user->getHometown()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_relationship}: </span>
|
|
</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")}
|
|
{_$str}
|
|
{else}
|
|
{tr($str . "_fem")}
|
|
{/if}
|
|
{else}
|
|
{_"relationship_$i"}
|
|
{/if}
|
|
</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_politViews}: </span>
|
|
</td>
|
|
<td>
|
|
<select name="politViews">
|
|
<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>
|
|
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_gender}: </span>
|
|
</td>
|
|
<td>
|
|
<select name="gender">
|
|
<option value="1" {if $user->isFemale() == true}selected{/if}>{_female}</option>
|
|
<option value="0" {if $user->isFemale() == false}selected{/if}>{_male}</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_birth_date}: </span>
|
|
</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>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<input type="submit" value="{_save}" class="button" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
|
|
{elseif $isContacts}
|
|
|
|
<h4>{_contact_information}</h4>
|
|
<form action="/edit?act=contacts" method="POST" enctype="multipart/form-data">
|
|
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_email}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="email" name="email_contact" value="{$user->getContactEmail()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_telegram}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="telegram" value="{$user->getTelegram()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_personal_website}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="website" value="{$user->getWebsite()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_city}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="city" value="{$user->getCity()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_address}: </span>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="address" value="{$user->getPhysicalAddress()}" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<input type="submit" value="{_save}" class="button" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
|
|
{elseif $isInterests}
|
|
|
|
<h4>{_personal_information}</h4>
|
|
<form action="/edit?act=interests" method="POST" enctype="multipart/form-data">
|
|
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_interests}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="interests">{$user->getInterests()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_favorite_music}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="fav_music">{$user->getFavoriteMusic()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_favorite_films}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="fav_films">{$user->getFavoriteFilms()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_favorite_shows}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="fav_shows">{$user->getFavoriteShows()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_favorite_books}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="fav_books">{$user->getFavoriteBooks()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_favorite_quotes}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="fav_quote">{$user->getFavoriteQuote()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_information_about}: </span>
|
|
</td>
|
|
<td>
|
|
<textarea type="text" name="about">{$user->getDescription()}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<input type="submit" value="{_save}" class="button" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
|
|
{elseif $isAvatar}
|
|
|
|
<h4>{_profile_picture}</h4>
|
|
<form action="/al_avatars" method="POST" enctype="multipart/form-data">
|
|
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
|
<tbody>
|
|
<tr>
|
|
<td width="120" valign="top">
|
|
<span class="nobold">{_picture}: </span>
|
|
</td>
|
|
<td>
|
|
<label class="button" style="">{_browse}
|
|
<input type="file" id="blob" name="blob" style="display: none;" onchange="filename.innerHTML=blob.files[0].name" />
|
|
</label>
|
|
<div id="filename" style="margin-top: 10px;"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<input type="submit" value="{_save}" class="button" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
|
|
{elseif $isBackDrop}
|
|
|
|
<h4>{_backdrop}</h4>
|
|
<p>{_backdrop_desc}</p>
|
|
<form method="POST" enctype="multipart/form-data">
|
|
<div id="backdropEditor">
|
|
<div id="backdropFilePicker">
|
|
<label class="button" style="">{_browse}<input type="file" accept="image/*" name="backdrop1" style="display: none;"></label>
|
|
<div id="spacer" style="width: 366px;"></div>
|
|
<label class="button" style="">{_browse}<input type="file" accept="image/*" name="backdrop2" style="display: none;"></label>
|
|
<div id="spacer" style="width: 366px;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
<span class="nobold">{_backdrop_warn}</span>
|
|
</p>
|
|
<p>
|
|
<span class="nobold">{_backdrop_about_adding}</span>
|
|
</p>
|
|
<p><br/></p>
|
|
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<div>
|
|
<center>
|
|
<button name="subact" value="save" class="button">{_backdrop_save}</button>
|
|
<button name="subact" value="remove" class="button">{_backdrop_remove}</button>
|
|
</center>
|
|
</div>
|
|
</form>
|
|
|
|
{/if}
|
|
</div>
|
|
|
|
{/block}
|