1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-17 07:10:48 +03:00

Фикс путей и мелкие исправления

This commit is contained in:
Denis Shakhov 2014-05-10 22:45:14 +07:00
parent 322930d55f
commit a512907303
67 changed files with 575 additions and 869 deletions

View file

@ -15,8 +15,8 @@
<p><label for="user_fields_form_type">{$aLang.userfield_form_type}:</label>
<select id="user_fields_form_type" class="input-text width-full">
<option value=""></option>
{foreach $aUserFieldTypes as $sFieldType}
<option value="{$sFieldType}">{$sFieldType}</option>
{foreach $aUserFieldTypes as $sType}
<option value="{$sType}">{$sType}</option>
{/foreach}
</select></p>

View file

@ -1,6 +1,6 @@
{**
* Создание блога
* TODO: Вынести rangelength в конфиг
* TODO: Вынести 'rangelength' > в конфиг
*}
{extends 'layouts/layout.base.tpl'}
@ -31,19 +31,19 @@
{* Название блога *}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'blog_title'
sFieldRules = 'required="true" rangelength="[2,200]"'
sFieldNote = $aLang.blog.add.fields.title.note
sFieldLabel = $aLang.blog.add.fields.title.label}
{include 'components/field/field.text.tpl'
sName = 'blog_title'
aRules = [ 'required' => true, 'rangelength' => "[2,200]" ]
sNote = $aLang.blog.add.fields.title.note
sLabel = $aLang.blog.add.fields.title.label}
{* URL блога *}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'blog_url'
sFieldRules = 'required="true" type="alphanum" rangelength="[2,50]"'
bFieldIsDisabled = $_aRequest.blog_id && ! $oUserCurrent->isAdministrator()
sFieldNote = $aLang.blog.add.fields.url.note
sFieldLabel = $aLang.blog.add.fields.url.label}
{include 'components/field/field.text.tpl'
sName = 'blog_url'
aRules = [ 'required' => true, 'type' => 'alphanum', 'rangelength' => '[2,50]' ]
bIsDisabled = $_aRequest.blog_id && ! $oUserCurrent->isAdministrator()
sNote = $aLang.blog.add.fields.url.note
sLabel = $aLang.blog.add.fields.url.label}
{* Категория блога *}
@ -59,37 +59,35 @@
]}
{/foreach}
{include 'forms/fields/form.field.select.tpl'
sFieldName = 'blog_category'
sFieldLabel = $aLang.blog.add.fields.category.label
sFieldNote = $aLang.blog.add.fields.category.note
sFieldClasses = 'width-200'
aFieldItems = $aBlogCategoriesCustom
sFieldSelectedValue = $_aRequest.blog_category}
{include 'components/field/field.select.tpl'
sName = 'blog_category'
sLabel = $aLang.blog.add.fields.category.label
sNote = $aLang.blog.add.fields.category.note
sClasses = 'width-200'
aItems = $aBlogCategoriesCustom
sSelectedValue = $_aRequest.blog_category}
{/if}
{* Тип блога *}
{$aBlogsType = [
[ 'value' => 'open', 'text' => $aLang.blog.add.fields.type.value_open ],
[ 'value' => 'close', 'text' => $aLang.blog.add.fields.type.value_close ]
]}
{include 'forms/fields/form.field.select.tpl'
sFieldName = 'blog_type'
sFieldLabel = $aLang.blog.add.fields.type.label
sFieldNote = $aLang.blog.add.fields.type.note_open
sFieldClasses = 'width-200 js-blog-add-type'
aFieldItems = $aBlogsType
sFieldSelectedValue = $_aRequest.blog_type}
{include 'components/field/field.select.tpl'
sName = 'blog_type'
sLabel = $aLang.blog.add.fields.type.label
sNote = $aLang.blog.add.fields.type.note_open
sClasses = 'width-200 js-blog-add-type'
sSelectedValue = $_aRequest.blog_type
aItems = [
[ 'value' => 'open', 'text' => $aLang.blog.add.fields.type.value_open ],
[ 'value' => 'close', 'text' => $aLang.blog.add.fields.type.value_close ]
]}
{* Описание блога *}
{include 'forms/fields/form.field.textarea.tpl'
sFieldName = 'blog_description'
sFieldRules = 'required="true" rangelength="[10,3000]"'
sFieldLabel = $aLang.blog.add.fields.description.label
sFieldClasses = 'width-full js-editor'}
{include 'components/field/field.textarea.tpl'
sName = 'blog_description'
aRules = [ 'required' => true, 'rangelength' => '[10,3000]' ]
sLabel = $aLang.blog.add.fields.description.label
sInputClasses = 'js-editor'}
{* Если визуальный редактор отключен выводим справку по разметке для обычного редактора *}
{if ! $oConfig->GetValue('view.wysiwyg')}
@ -98,13 +96,13 @@
{* Ограничение по рейтингу *}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'blog_limit_rating_topic'
sFieldRules = 'required="true" type="number"'
sFieldValue = '0'
sFieldClasses = 'width-100'
sFieldNote = $aLang.blog.add.fields.rating.note
sFieldLabel = $aLang.blog.add.fields.rating.label}
{include 'components/field/field.text.tpl'
sName = 'blog_limit_rating_topic'
aRules = [ 'required' => true, 'type' => 'number' ]
sValue = '0'
sClasses = 'width-100'
sNote = $aLang.blog.add.fields.rating.note
sLabel = $aLang.blog.add.fields.rating.label}
{* Аватар *}
@ -113,19 +111,19 @@
{if $iSize}<img src="{$oBlogEdit->getAvatarPath({$iSize})}">{/if}
{/foreach}
{include 'forms/fields/form.field.checkbox.tpl' sFieldName='avatar_delete' bFieldNoMargin=true sFieldValue='on' sFieldLabel=$aLang.common.remove}
{include 'components/field/field.checkbox.tpl' sName='avatar_delete' bNoMargin=true sValue='on' sLabel=$aLang.common.remove}
{/if}
{include 'forms/fields/form.field.file.tpl'
sFieldName = 'avatar'
sFieldLabel = $aLang.blog.add.fields.avatar.label}
{include 'components/field/field.file.tpl'
sName = 'avatar'
sLabel = $aLang.blog.add.fields.avatar.label}
{hook run='form_add_blog_end'}
{* Скрытые поля *}
{include 'forms/fields/form.field.hidden.security_key.tpl'}
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
@ -134,7 +132,7 @@
{else}
{$sSubmitInputText = $aLang.common.save}
{/if}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_blog_add' sFieldText=$sSubmitInputText sFieldStyle='primary'}
{include 'components/button/button.tpl' sName='submit_blog_add' sText=$sSubmitInputText sStyle='primary'}
</form>
{/block}

View file

@ -56,10 +56,10 @@
</table>
{* Скрытые поля *}
{include 'forms/fields/form.field.hidden.security_key.tpl'}
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_blog_admin' sFieldText=$aLang.common.save sFieldStyle='primary'}
{include 'components/button/button.tpl' sName='submit_blog_admin' sText=$aLang.common.save sStyle='primary'}
</form>
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}

View file

@ -8,9 +8,9 @@
*}
{if $oUserCurrent && $oUserCurrent->getId() != $oBlog->getOwnerId() && $oBlog->getType() == 'open'}
{include 'forms/fields/form.field.button.tpl'
sFieldAttributes = "data-blog-id=\"{$oBlog->getId()}\""
sFieldClasses = 'js-blog-join'
sFieldText = ($oBlog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
sFieldStyle = ($oBlog->getUserIsJoin()) ? false : 'primary'}
{include 'components/button/button.tpl'
sAttributes = "data-blog-id=\"{$oBlog->getId()}\""
sClasses = 'js-blog-join'
sText = ($oBlog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
sStyle = ($oBlog->getUserIsJoin()) ? false : 'primary'}
{/if}

View file

@ -6,7 +6,7 @@
{block 'layout_content'}
{include 'topics/topic.tpl'}
{include 'comments/comment_tree.tpl'
{include 'comments/comment_tree.tpl'
iTargetId = $oTopic->getId()
iAuthorId = $oTopic->getUserId()
sAuthorNotice = $aLang.topic_author

View file

@ -8,15 +8,15 @@
<form class="wall-form js-wall-form {$sWallFormClasses}" data-id="{$iWallFormId|default:0}" {if ! $bWallFormDisplay|default:true}style="display: none"{/if}>
{* Текст *}
{include 'forms/fields/form.field.textarea.tpl'
sFieldPlaceholder = "{if $sWallFormPlaceholder}{$sWallFormPlaceholder}{else}{$aLang.wall_add_title}{/if}"
sFieldClasses = 'width-full js-wall-form-text'}
{include 'components/field/field.textarea.tpl'
sPlaceholder = "{if $sWallFormPlaceholder}{$sWallFormPlaceholder}{else}{$aLang.wall_add_title}{/if}"
sClasses = 'width-full js-wall-form-text'}
{* Подвал формы *}
<footer class="wall-form-footer">
{include 'forms/fields/form.field.button.tpl'
sFieldStyle = 'primary'
sFieldClasses = 'js-wall-form-submit'
sFieldText = $aLang.wall_add_submit}
{include 'components/button/button.tpl'
sStyle = 'primary'
sClasses = 'js-wall-form-submit'
sText = $aLang.wall_add_submit}
</footer>
</form>

View file

@ -14,12 +14,12 @@
<legend>{$aLang.settings_account}</legend>
{* E-mail *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'mail'
sFieldRules = 'required="true" type="email"'
sFieldValue = $oUserCurrent->getMail()|escape
sFieldNote = $aLang.settings_profile_mail_notice
sFieldLabel = $aLang.settings_profile_mail}
{include file='components/field/field.text.tpl'
sName = 'mail'
aRules = [ 'required' => true, 'type'=> 'email' ]
sValue = $oUserCurrent->getMail()|escape
sNote = $aLang.settings_profile_mail_notice
sLabel = $aLang.settings_profile_mail}
</fieldset>
@ -29,37 +29,37 @@
<small class="note mb-20">{$aLang.settings_account_password_notice}</small>
{* Текущий пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password_now'
sFieldType = 'password'
sFieldClasses = 'width-200'
sFieldLabel = $aLang.settings_profile_password_current}
{include file='components/field/field.text.tpl'
sName = 'password_now'
sType = 'password'
sInputClasses = 'width-200'
sLabel = $aLang.settings_profile_password_current}
{* Новый пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password'
sFieldRules = 'rangelength="[5,20]"'
sFieldType = 'password'
sFieldClasses = 'width-200'
sFieldLabel = $aLang.settings_profile_password_new}
{include file='components/field/field.text.tpl'
sName = 'password'
aRules = [ 'rangelength' => '[5,20]' ]
sType = 'password'
sInputClasses = 'width-200'
sLabel = $aLang.settings_profile_password_new}
{* Повторить овый пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password_confirm'
sFieldRules = 'rangelength="[5,20]" equalto=".js-input-password"'
sFieldType = 'password'
sFieldClasses = 'width-200'
sFieldLabel = $aLang.settings_profile_password_confirm}
{include file='components/field/field.text.tpl'
sName = 'password_confirm'
aRules = [ 'rangelength' => '[5,20]', 'equalto' => '.js-input-password' ]
sType = 'password'
sInputClasses = 'width-200'
sLabel = $aLang.settings_profile_password_confirm}
</fieldset>
{hook run='form_settings_account_end'}
{* Скрытые поля *}
{include file='forms/fields/form.field.hidden.security_key.tpl'}
{include file='components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_account_edit' sFieldStyle='primary' sFieldText=$aLang.settings_profile_submit}
{include file='components/button/button.tpl' sName='submit_account_edit' sStyle='primary' sText=$aLang.settings_profile_submit}
</form>
{hook run='settings_account_end'}

View file

@ -18,18 +18,18 @@
</p>
{* E-mail *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'invite_mail'
sFieldNote = $aLang.settings_invite_mail_notice
sFieldLabel = $aLang.settings_invite_mail}
{include file='components/field/field.text.tpl'
sName = 'invite_mail'
sNote = $aLang.settings_invite_mail_notice
sLabel = $aLang.settings_invite_mail}
{hook run='form_settings_invite_end'}
{* Скрытые поля *}
{include file='forms/fields/form.field.hidden.security_key.tpl'}
{include file='components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_invite' sFieldStyle='primary' sFieldText=$aLang.settings_invite_submit}
{include file='components/button/button.tpl' sName='submit_invite' sStyle='primary' sText=$aLang.settings_invite_submit}
</form>
{hook run='settings_invite_end'}

View file

@ -42,13 +42,13 @@
<legend>{$aLang.settings_profile_section_base}</legend>
{* Имя *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'profile_name'
sFieldRules = 'rangelength="[2,'|cat:$oConfig->Get('module.user.name_max')|cat:']"'
bFieldInline = true
sFieldValue = $oUserCurrent->getProfileName()|escape
sFieldNote = $aLang.settings_profile_name_notice
sFieldLabel = $aLang.settings_profile_name}
{include file='components/field/field.text.tpl'
sName = 'profile_name'
aRules = [ 'rangelength' => "[2,{$oConfig->Get('module.user.name_max')}]" ]
bInline = true
sValue = $oUserCurrent->getProfileName()|escape
sNote = $aLang.settings_profile_name_notice
sLabel = $aLang.settings_profile_name}
{* Пол *}
@ -58,49 +58,49 @@
[ 'value' => 'other', 'text' => $aLang.settings_profile_sex_other ]
]}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'profile_sex'
bFieldInline = true
sFieldLabel = $aLang.settings_profile_sex
aFieldItems = $aSex
sFieldSelectedValue = $oUserCurrent->getProfileSex()}
{include file='components/field/field.select.tpl'
sName = 'profile_sex'
bInline = true
sLabel = $aLang.settings_profile_sex
aItems = $aSex
sSelectedValue = $oUserCurrent->getProfileSex()}
{* Дата рождения *}
{include file='forms/fields/form.field.select.date.tpl'
sFieldNamePrefix = 'profile_birthday'
aFieldItems = $oUserCurrent->getProfileBirthday()
bFieldInline = true
sFieldLabel = $aLang.settings_profile_birthday}
{include file='components/field/field.date.tpl'
sName = 'profile_birthday'
aItems = $oUserCurrent->getProfileBirthday()
bInline = true
sLabel = $aLang.settings_profile_birthday}
{* Местоположение *}
{include file='forms/fields/form.field.select.geo.tpl'
sFieldNamePrefix = 'geo'
bFieldInline = true
sFieldLabel = $aLang.profile_place
oFieldGeoTarget = $oGeoTarget}
{include file='components/field/field.geo.tpl'
sName = 'geo'
bInline = true
sLabel = $aLang.profile_place
oFieldGeoTarget = $oGeoTarget}
{* О себе *}
{include file='forms/fields/form.field.textarea.tpl'
sFieldName = 'profile_about'
sFieldRules = 'rangelength="[1,3000]"'
bFieldInline = true
iFieldRows = 5
sFieldValue = $oUserCurrent->getProfileAbout()|escape
sFieldLabel = $aLang.settings_profile_about}
{include file='components/field/field.textarea.tpl'
sName = 'profile_about'
aRules = [ 'rangelength' => '[1,3000]' ]
bInline = true
iRows = 5
sValue = $oUserCurrent->getProfileAbout()|escape
sLabel = $aLang.settings_profile_about}
{* Пользовательские поля *}
{$aUserFieldValues = $oUserCurrent->getUserFieldValues(false, '')}
{foreach $aUserFieldValues as $oField}
{include file='forms/fields/form.field.text.tpl'
sFieldName = "profile_user_field_`$oField->getId()`"
bFieldInline = true
sFieldValue = $oField->getValue()|escape
sFieldLabel = $oField->getTitle()|escape}
{include file='components/field/field.text.tpl'
sName = "profile_user_field_`$oField->getId()`"
bInline = true
sValue = $oField->getValue()|escape
sLabel = $oField->getTitle()|escape}
{/foreach}
</fieldset>
@ -126,10 +126,10 @@
{hook run='form_settings_profile_end'}
{* Скрытые поля *}
{include file='forms/fields/form.field.hidden.security_key.tpl'}
{include file='components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_profile_edit' sFieldStyle='primary' sFieldText=$aLang.settings_profile_submit}
{include file='components/button/button.tpl' sName='submit_profile_edit' sStyle='primary' sText=$aLang.settings_profile_submit}
</form>
{hook run='settings_profile_end'}

View file

@ -10,40 +10,40 @@
<form action="{router page='settings'}tuning/" method="POST" enctype="multipart/form-data">
{hook run='form_settings_tuning_begin'}
{include file='forms/fields/form.field.hidden.security_key.tpl'}
{include file='components/field/field.hidden.security_key.tpl'}
<fieldset>
<legend>{$aLang.settings_tuning_notice}</legend>
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'settings_notice_new_topic'
bFieldChecked = $oUserCurrent->getSettingsNoticeNewTopic() != 0
bFieldNoMargin = true
sFieldLabel = $aLang.settings_tuning_notice_new_topic}
{include file='components/field/field.checkbox.tpl'
sName = 'settings_notice_new_topic'
bChecked = $oUserCurrent->getSettingsNoticeNewTopic() != 0
bNoMargin = true
sLabel = $aLang.settings_tuning_notice_new_topic}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'settings_notice_new_comment'
bFieldChecked = $oUserCurrent->getSettingsNoticeNewComment() != 0
bFieldNoMargin = true
sFieldLabel = $aLang.settings_tuning_notice_new_comment}
{include file='components/field/field.checkbox.tpl'
sName = 'settings_notice_new_comment'
bChecked = $oUserCurrent->getSettingsNoticeNewComment() != 0
bNoMargin = true
sLabel = $aLang.settings_tuning_notice_new_comment}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'settings_notice_new_talk'
bFieldChecked = $oUserCurrent->getSettingsNoticeNewTalk() != 0
bFieldNoMargin = true
sFieldLabel = $aLang.settings_tuning_notice_new_talk}
{include file='components/field/field.checkbox.tpl'
sName = 'settings_notice_new_talk'
bChecked = $oUserCurrent->getSettingsNoticeNewTalk() != 0
bNoMargin = true
sLabel = $aLang.settings_tuning_notice_new_talk}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'settings_notice_reply_comment'
bFieldChecked = $oUserCurrent->getSettingsNoticeReplyComment() != 0
bFieldNoMargin = true
sFieldLabel = $aLang.settings_tuning_notice_reply_comment}
{include file='components/field/field.checkbox.tpl'
sName = 'settings_notice_reply_comment'
bChecked = $oUserCurrent->getSettingsNoticeReplyComment() != 0
bNoMargin = true
sLabel = $aLang.settings_tuning_notice_reply_comment}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'settings_notice_new_friend'
bFieldChecked = $oUserCurrent->getSettingsNoticeNewFriend() != 0
bFieldNoMargin = true
sFieldLabel = $aLang.settings_tuning_notice_new_friend}
{include file='components/field/field.checkbox.tpl'
sName = 'settings_notice_new_friend'
bChecked = $oUserCurrent->getSettingsNoticeNewFriend() != 0
bNoMargin = true
sLabel = $aLang.settings_tuning_notice_new_friend}
</fieldset>
<fieldset>
@ -56,17 +56,17 @@
]}
{/foreach}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'settings_general_timezone'
sFieldLabel = $aLang.settings_tuning_general_timezone
sFieldClasses = 'width-500 js-topic-add-title'
aFieldItems = $aTimezones
sFieldSelectedValue = $_aRequest.settings_general_timezone}
{include file='components/field/field.select.tpl'
sName = 'settings_general_timezone'
sLabel = $aLang.settings_tuning_general_timezone
sClasses = 'width-500 js-topic-add-title'
aItems = $aTimezones
sSelectedValue = $_aRequest.settings_general_timezone}
</fieldset>
{hook run='form_settings_tuning_end'}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_settings_tuning' sFieldText=$aLang.settings_profile_submit sFieldStyle='primary'}
{include file='components/button/button.tpl' sName='submit_settings_tuning' sText=$aLang.settings_profile_submit sStyle='primary'}
</form>
{hook run='settings_tuning_end'}

View file

@ -12,28 +12,28 @@
<form action="" method="POST" enctype="multipart/form-data" class="js-form-validate">
{hook run='form_add_talk_begin'}
{include 'forms/fields/form.field.hidden.security_key.tpl'}
{include 'components/field/field.hidden.security_key.tpl'}
{* Получатели *}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'talk_users'
sFieldRules = 'required="true" rangetags="[1,99]"'
sFieldLabel = $aLang.talk_create_users
sFieldClasses = 'width-full autocomplete-users-sep'
sFieldNote = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".js-input-talk_users\">Выбрать из списка друзей</a>"}
{include 'components/field/field.text.tpl'
sName = 'talk_users'
aRules = [ 'required' => true, 'rangetags' => '[1,99]' ]
sLabel = $aLang.talk_create_users
sClasses = 'width-full autocomplete-users-sep'
sNote = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".js-input-talk_users\">Выбрать из списка друзей</a>"}
{* Заголовок *}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'talk_title'
sFieldRules = 'required="true" rangelength="[2,200]"'
sFieldLabel = $aLang.talk_create_title}
{include 'components/field/field.text.tpl'
sName = 'talk_title'
aRules = [ 'required' => true, 'rangelength' => '[2,200]' ]
sLabel = $aLang.talk_create_title}
{* Текст сообщения *}
{include 'forms/fields/form.field.textarea.tpl'
sFieldName = 'talk_text'
sFieldRules = 'required="true" rangelength="[2,3000]"'
sFieldLabel = $aLang.topic_create_text
sFieldClasses = 'width-full js-editor'}
{include 'components/field/field.textarea.tpl'
sName = 'talk_text'
aRules = [ 'required' => true, 'rangelength' => '[2,3000]' ]
sLabel = $aLang.topic_create_text
sInputClasses = 'js-editor'}
{* Preview *}
<div class="text mb-20" id="text_preview" style="display: none;"></div>
@ -41,8 +41,8 @@
{hook run='form_add_talk_end'}
{* Кнопки *}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_talk_add' sFieldStyle='primary' sFieldText=$aLang.talk_create_submit}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_preview' sFieldType='button' sFieldText=$aLang.common.preview_text sFieldAttributes='onclick="jQuery(\'#text_preview\').show(); ls.utils.textPreview($(\'#talk_text\'), $(\'#text_preview\'), false); return false;"'}
{include 'components/button/button.tpl' sName='submit_talk_add' sStyle='primary' sText=$aLang.talk_create_submit}
{include 'components/button/button.tpl' sName='submit_preview' sType='button' sText=$aLang.common.preview_text sAttributes='onclick="jQuery(\'#text_preview\').show(); ls.utils.textPreview($(\'#talk_text\'), $(\'#text_preview\'), false); return false;"'}
</form>
{hook run='talk_add_end'}

View file

@ -5,8 +5,8 @@
{if $aTalks}
<form action="{router page='talk'}" method="post" id="talk-form">
{* Скрытые поля *}
{include 'forms/fields/form.field.hidden.security_key.tpl'}
{include 'forms/fields/form.field.hidden.tpl' sFieldName='form_action' sFieldId='talk-form-action'}
{include 'components/field/field.hidden.security_key.tpl'}
{include 'components/field/field.hidden.tpl' sName='form_action' sId='talk-form-action'}
{* Экшнбар *}
{include 'components/actionbar/actionbar.item.select.tpl' sItemSelector='.js-message-list-item' assign=sMessagesSelect aItems=[

View file

@ -6,43 +6,43 @@
<form action="{router page='talk'}" method="GET" name="talk_filter_form" id="block_talk_search_content" class="accordion-content" {if $_aRequest.submit_talk_filter}style="display:block;"{/if}>
{* Отправитель *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'sender'
sFieldLabel = $aLang.messages.search.fields.sender.label
sFieldNote = $aLang.messages.search.fields.sender.note
sFieldClasses = 'width-full autocomplete-users-sep'}
{include file='components/field/field.text.tpl'
sName = 'sender'
sLabel = $aLang.messages.search.fields.sender.label
sNote = $aLang.messages.search.fields.sender.note
sClasses = 'width-full autocomplete-users-sep'}
{* Искать в заголовке *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'keyword'
sFieldLabel = $aLang.messages.search.fields.keyword.label}
{include file='components/field/field.text.tpl'
sName = 'keyword'
sLabel = $aLang.messages.search.fields.keyword.label}
{* Искать в тексте *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'keyword_text'
sFieldLabel = $aLang.messages.search.fields.keyword_text.label}
{include file='components/field/field.text.tpl'
sName = 'keyword_text'
sLabel = $aLang.messages.search.fields.keyword_text.label}
{* Ограничения по дате *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'start'
sFieldPlaceholder = $aLang.messages.search.fields.start.placeholder
sFieldLabel = $aLang.messages.search.fields.start.label
sFieldClasses = 'width-200 date-picker'}
{include file='components/field/field.text.tpl'
sName = 'start'
sPlaceholder = $aLang.messages.search.fields.start.placeholder
sLabel = $aLang.messages.search.fields.start.label
sClasses = 'width-200 date-picker'}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'end'
sFieldPlaceholder = $aLang.messages.search.fields.end.placeholder
sFieldClasses = 'width-200 date-picker'}
{include file='components/field/field.text.tpl'
sName = 'end'
sPlaceholder = $aLang.messages.search.fields.end.placeholder
sClasses = 'width-200 date-picker'}
{* Искать только в избранном *}
{include file='forms/fields/form.field.checkbox.tpl' sFieldName='favourite' sFieldLabel=$aLang.messages.search.fields.favourite.label}
{include file='components/field/field.checkbox.tpl' sName='favourite' sLabel=$aLang.messages.search.fields.favourite.label}
{* Кнопки *}
{include file='forms/fields/form.field.button.tpl'
sFieldName = 'submit_talk_filter'
sFieldStyle = 'primary'
sFieldText = $aLang.search.find}
{include file='components/button/button.tpl'
sName = 'submit_talk_filter'
sStyle = 'primary'
sText = $aLang.search.find}
{include file='forms/fields/form.field.button.tpl' sFieldType='reset' sFieldText=$aLang.common.form_reset}
{include file='components/button/button.tpl' sType='reset' sText=$aLang.common.form_reset}
</form>
</div>

View file

@ -1,9 +1,9 @@
/**
* Блоки
*
*
* @template blocks/*.tpl
* @scripts <frontend>/common/js/blocks.js
*
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
@ -24,7 +24,7 @@
/* Шапка */
.block-header { padding: 18px 20px 0; position: relative; }
.block-header .block-title { font-size: 16px; line-height: 1em; font-weight: normal; }
.block-header .block-title { margin-bottom: 0; font-size: 16px; line-height: 1em; font-weight: normal; }
/* Навигация */
.block-nav { padding: 20px; border-bottom: 1px solid #eee; }
@ -38,13 +38,13 @@
.block-footer { border-top: 1px solid #eee; padding: 15px 20px; font-size: 12px; }
/* Кнопка обновления блока */
.block-update {
.block-update {
position: absolute;
top: 19px;
right: 15px;
width: 16px;
height: 16px;
background: url(../images/update.gif) no-repeat; cursor: pointer;
background: url(../images/update.gif) no-repeat; cursor: pointer;
}
.block-update.active { background-position: -16px 0; }
@ -54,7 +54,7 @@
/**
* Список категорий блогов
*
*
* @modifier blog-categories
* @template blocks/block.blogCategories.tpl
*/
@ -63,7 +63,7 @@
/**
* Блок с кнопкой "Создать блог"
*
*
* @modifier blog-add
* @template blocks/block.blogAdd.tpl
*/
@ -73,7 +73,7 @@
/**
* Навигация по блогам
*
*
* @modifier blog-navigation
* @template blocks/block.blogNav.tpl
*/
@ -83,7 +83,7 @@
/**
* Информация о блоге
*
*
* @modifier blog-actions
* @template blocks/block.blogActions.tpl
*/
@ -94,7 +94,7 @@
/**
* Фото пользователя
*
*
* @modifier profile
* @template blocks/block.profilePhoto.tpl
*/
@ -111,7 +111,7 @@
/**
* Навигация по профилю пользователя
*
*
* @modifier profile-nav
* @template blocks/block.profileNav.tpl
*/
@ -120,7 +120,7 @@
/**
* Блок управления на странице пользователя
*
*
* @modifier profile-actions
* @template blocks/block.profileActions.tpl
*/

View file

@ -17,11 +17,11 @@
{if ! ($oConfig->get('module.stream.disable_vote_events') && substr($sType, 0, 4) == 'vote')}
{$sLangKey = "stream_event_type_`$sType`"}
{include 'forms/fields/form.field.checkbox.tpl'
sFieldInputClasses = 'js-activity-settings-toggle'
sFieldInputAttributes = "data-type=\"{$sType}\""
bFieldChecked = in_array($sType, $aStreamTypesList)
sFieldLabel = $aLang.$sLangKey}
{include 'components/field/field.checkbox.tpl'
sInputClasses = 'js-activity-settings-toggle'
sInputAttributes = "data-type=\"{$sType}\""
bChecked = in_array($sType, $aStreamTypesList)
sLabel = $aLang.$sLangKey}
{/if}
{/foreach}
{/if}

View file

@ -27,7 +27,7 @@
{/foreach}
</select></p>
{include 'forms/fields/form.field.button.tpl' sFieldText=$aLang.block_blog_navigator_button sFieldClasses='js-blog-nav-submit' bFieldIsDisabled=true}
{include 'components/button/button.tpl' sText=$aLang.block_blog_navigator_button sClasses='js-blog-nav-submit' bIsDisabled=true}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog.categories.empty sMods='empty'}
{/if}

View file

@ -45,7 +45,7 @@
{* Тип блога *}
<p class="mb-10">Тип блога</p>
{include file='forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="blogs"' sFieldName='type' sFieldValue='' bFieldChecked=true sFieldLabel='Любой'}
{include file='forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="blogs"' sFieldName='type' sFieldValue='open' sFieldLabel='Открытый'}
{include file='forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="blogs"' sFieldName='type' sFieldValue='close' sFieldLabel='Закрытый'}
{include file='components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="blogs"' sName='type' sValue='' bChecked=true sLabel='Любой'}
{include file='components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="blogs"' sName='type' sValue='open' sLabel='Открытый'}
{include file='components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="blogs"' sName='type' sValue='close' sLabel='Закрытый'}
{/block}

View file

@ -14,11 +14,11 @@
{if $aUserfeedBlogs}
{foreach $aUserfeedBlogs as $oBlog}
{include 'forms/fields/form.field.checkbox.tpl'
sFieldInputClasses = 'js-userfeed-subscribe'
sFieldInputAttributes = "data-id=\"{$oBlog->getId()}\""
bFieldChecked = isset($aUserfeedSubscribedBlogs[$oBlog->getId()])
sFieldLabel = "<a href=\"{$oBlog->getUrlFull()}\">{$oBlog->getTitle()|escape}</a>"}
{include 'components/field/field.checkbox.tpl'
sInputClasses = 'js-userfeed-subscribe'
sInputAttributes = "data-id=\"{$oBlog->getId()}\""
bChecked = isset($aUserfeedSubscribedBlogs[$oBlog->getId()])
sLabel = "<a href=\"{$oBlog->getUrlFull()}\">{$oBlog->getTitle()|escape}</a>"}
{/foreach}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.userfeed_no_blogs sMods='info'}

View file

@ -10,16 +10,16 @@
{block name='block_content'}
{* Сейчас на сайте *}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'is_online'
sFieldInputClasses = 'js-search-ajax-option'
sFieldInputAttributes = 'data-search-type="users"'
bFieldChecked = false
sFieldLabel = 'Сейчас на сайте'}
{include file='components/field/field.checkbox.tpl'
sName = 'is_online'
sInputClasses = 'js-search-ajax-option'
sInputAttributes = 'data-search-type="users"'
bChecked = false
sLabel = 'Сейчас на сайте'}
{* Пол *}
<p class="mb-10">Пол</p>
{include 'forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="users"' sFieldName='sex' sFieldValue='' bFieldChecked=true sFieldLabel='Любой'}
{include 'forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="users"' sFieldName='sex' sFieldValue='man' sFieldLabel='Мужской'}
{include 'forms/fields/form.field.radio.tpl' sFieldInputClasses='js-search-ajax-option' sFieldInputAttributes='data-search-type="users"' sFieldName='sex' sFieldValue='woman' sFieldLabel='Женский'}
{include 'components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="users"' sName='sex' sValue='' bChecked=true sLabel='Любой'}
{include 'components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="users"' sName='sex' sValue='man' sLabel='Мужской'}
{include 'components/field/field.radio.tpl' sInputClasses='js-search-ajax-option' sInputAttributes='data-search-type="users"' sName='sex' sValue='woman' sLabel='Женский'}
{/block}

View file

@ -15,21 +15,21 @@
{hook run='form_add_comment_begin'}
{* Текст комментария *}
{include 'forms/fields/form.field.textarea.tpl' sFieldName='comment_text' sFieldId='form_comment_text' sFieldClasses='width-full js-editor'}
{include 'components/field/field.textarea.tpl' sName='comment_text' sId='form_comment_text' sInputClasses='js-editor'}
{hook run='form_add_comment_end'}
{* Скрытые поля *}
{include 'forms/fields/form.field.hidden.tpl' sFieldName='reply' sFieldValue='0' sFieldId='form_comment_reply'}
{include 'forms/fields/form.field.hidden.tpl' sFieldName='cmt_target_id' sFieldValue=$iTargetId}
{include 'components/field/field.hidden.tpl' sName='reply' sValue='0' sId='form_comment_reply'}
{include 'components/field/field.hidden.tpl' sName='cmt_target_id' sValue=$iTargetId}
{* Кнопки создания *}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_comment' sFieldText=$aLang.common.add sFieldStyle='primary' sFieldClasses='js-comment-form-submit'}
{include 'components/button/button.tpl' sName='submit_comment' sText=$aLang.common.add sStyle='primary' sClasses='js-comment-form-submit'}
{* Кнопки редактирования *}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_comment' sFieldType='button' sFieldText=$aLang.common.save sFieldStyle='primary' sFieldClasses='js-comment-form-update-submit hide'}
{include 'forms/fields/form.field.button.tpl' sFieldName='submit_comment' sFieldType='button' sFieldText=$aLang.common.cancel sFieldClasses='js-comment-form-update-cancel fl-r hide'}
{include 'components/button/button.tpl' sName='submit_comment' sType='button' sText=$aLang.common.save sStyle='primary' sClasses='js-comment-form-update-submit hide'}
{include 'components/button/button.tpl' sName='submit_comment' sType='button' sText=$aLang.common.cancel sClasses='js-comment-form-update-cancel fl-r hide'}
{* Общие кнопки *}
{include 'forms/fields/form.field.button.tpl' sFieldText=$aLang.common.preview_text sFieldType='button' sFieldClasses='js-comment-form-preview'}
{include 'components/button/button.tpl' sText=$aLang.common.preview_text sType='button' sClasses='js-comment-form-preview'}
</form>

View file

@ -1,17 +1,10 @@
<li class="actionbar-item">
{block 'actionbar_item'}
<{if $aItem['url']}a{else}button{/if} {if $aItem['url']}href="{$aItem['url']}"{/if}
class="button actionbar-item-link {$aItem['classes']} {block 'actionbar_item_classes'}{/block}"
{if ! $aItem['url']}type="button"{/if}
{$aItem['attributes']} {block 'actionbar_item_attributes'}{/block}>
{block 'actionbar_item_icon'}
{if $aItem['icon']}
<i class="{$aItem['icon']}"></i>
{/if}
{/block}
{block 'actionbar_item_text'}{$aItem['text']}{/block}
</{if $aItem['url']}a{else}button{/if}>
{include 'components/button/button.tpl'
sUrl = $aItem['url']
sClasses = "actionbar-item-link {$aItem['classes']}"
sText = $aItem['text']
sIcon = $aItem['icon']
sAttributes = $aItem['attributes']}
{/block}
</li>

View file

@ -15,10 +15,10 @@
{* Кнопка *}
{include 'forms/fields/form.field.button.tpl'
sFieldClasses = "{$_sComponentName}-toggle js-dropdown-default {$smarty.local.sClasses}"
sFieldAttributes = "data-{$_sComponentName}-target=\"js-{$_sComponentName}-{$_sName}-menu\" {$smarty.local.sAttributes}"
sFieldText = $smarty.local.sText}
{include 'components/button/button.tpl'
sClasses = "{$_sComponentName}-toggle js-dropdown-default {$smarty.local.sClasses}"
sAttributes = "data-{$_sComponentName}-target=\"js-{$_sComponentName}-{$_sName}-menu\" {$smarty.local.sAttributes}"
sText = $smarty.local.sText}
{* Выпадающее меню *}
{include './dropdown.menu.tpl'

View file

@ -1,9 +1,12 @@
{**
* Пагинация
*
* @param string $aPaging Массив с параметрами пагинации
* @param string $aPaging Массив с параметрами пагинации
* @param string $sClasses Дополнительные классы
* @param string $sMods Список классов-модификаторов
* @param string $sAttributes Атрибуты
*
* @styles assets/css/common.css
* @styles assets/css/components/pagination.css
*
* TODO: Сделать универсальные ссылки
*}

View file

@ -21,13 +21,13 @@
<form class="{$_sComponentName}-form js-{$_sComponentName}-form">
{$sClass = "js-$_sComponentName-form-users-"|cat:rand(0, 9999)}
{include 'forms/fields/form.field.text.tpl'
sFieldName = 'add'
sFieldClasses = "width-full autocomplete-users-sep {$sClass}"
sFieldLabel = $aLang.user_list_add.form.fields.add.label
sFieldNote = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".{$sClass}\">Выбрать из списка друзей</a>"}
{include 'components/field/field.text.tpl'
sName = 'add'
sClasses = "width-full autocomplete-users-sep {$sClass}"
sLabel = $aLang.user_list_add.form.fields.add.label
sNote = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".{$sClass}\">Выбрать из списка друзей</a>"}
{include 'forms/fields/form.field.button.tpl' sFieldText=$aLang.common.add sFieldStyle='primary' sFieldClasses='js-{$_sComponentName}-form-submit'}
{include 'components/button/button.tpl' sText=$aLang.common.add sStyle='primary' sClasses='js-{$_sComponentName}-form-submit'}
</form>
{* Список пользователей *}

View file

@ -41,10 +41,10 @@
{* Форма редактирования *}
{if $_bIsEditable}
<form class="{$_sComponentName}-form js-{$_sComponentName}-form" style="display: none;">
{include 'forms/fields/form.field.textarea.tpl' sFieldClasses="width-full $_sComponentName-form-text js-$_sComponentName-form-text"}
{include 'components/field/field.textarea.tpl' sClasses="width-full $_sComponentName-form-text js-$_sComponentName-form-text"}
{include 'forms/fields/form.field.button.tpl' sFieldStyle='primary' sFieldClasses="js-$_sComponentName-form-save" sFieldText=$aLang.common.save}
{include 'forms/fields/form.field.button.tpl' sFieldType='button' sFieldClasses="js-$_sComponentName-form-cancel" sFieldText=$aLang.common.cancel}
{include 'components/button/button.tpl' sStyle='primary' sClasses="js-$_sComponentName-form-save" sText=$aLang.common.save}
{include 'components/button/button.tpl' sType='button' sClasses="js-$_sComponentName-form-cancel" sText=$aLang.common.cancel}
</form>
{/if}
</div>

View file

@ -1,40 +0,0 @@
{**
* Базовый шаблон поля формы
*
* @param string sFieldName Имя поля (параметр name)
* @param string sFieldLabel Текст лэйбла
* @param string sFieldNote Подсказка (отображается под полем)
* @param string sFieldRules Правила валидации через пробел без префикса 'data-' (Плагин Parsley)
* @param boolean bFieldInline Отображать поле как инлайновое или нет
* @param boolean bFieldNoMargin Убрать отступы
*}
{* Правила валидации *}
{if $sFieldRules}
{$aFieldRules = " "|explode:$sFieldRules}
{/if}
{if $sFieldEntity}
{if !$sFieldEntityField}
{$sFieldEntityField=$sFieldName}
{/if}
{field_make_rule entity=$sFieldEntity field=$sFieldEntityField scenario=$sFieldEntityScenario assign=aFieldRules}
{/if}
{block name='field_before'}{/block}
<div class="form-field {if $bFieldDisplayInline}form-field-display-inline{/if} {if $bFieldInline}form-field-inline{/if} {block name='field_classes'}{/block} {if $bFieldNoMargin}m-0{/if}">
{if $sFieldLabel && ! $bFieldNoLabel}
<label for="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}" class="form-field-label">{$sFieldLabel}:</label>
{/if}
<div class="form-field-holder">
{block name='field_holder'}
{if $sFieldNote}
<small class="note" id="{$sFieldName}_note">{$sFieldNote}</small>
{/if}
{/block}
</div>
</div>
{block name='field_after'}{/block}

View file

@ -1,14 +0,0 @@
{**
* Кнопка
*}
<button type="{if $sFieldType}{$sFieldType}{else}submit{/if}"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
value="{if isset($sFieldValue)}{$sFieldValue}{elseif isset($_aRequest[$sFieldName])}{$_aRequest[$sFieldName]}{/if}"
class="button {if $sFieldStyle}button-{$sFieldStyle}{/if} {$sFieldClasses}"
{$sFieldAttributes}
{if $bFieldIsDisabled}disabled{/if}>
{if $sFieldIcon}<i class="{$sFieldIcon}"></i>{/if}
{$sFieldText}
</button>

View file

@ -1,23 +0,0 @@
{**
* Каптча
*
* @scripts <framework>/js/livestreet/captcha.js
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
{hookb run="captcha"}
<span style="background-image: url({cfg name='path.framework.libs_vendor.web'}/kcaptcha/index.php?{$_sPhpSessionName}={$_sPhpSessionId}&n={rand()}&name={$sCaptchaName});" data-type="captcha" data-captcha-name="{$sCaptchaName}" class="form-auth-captcha"></span>
<input type="text"
id="{if $sFieldId}{$sFieldId}{/if}"
name="{$sFieldName}"
value="{if $sFieldValue}{$sFieldValue}{elseif $_aRequest[$sFieldName]}{$_aRequest[$sFieldName]}{/if}"
class="{if $sFieldClasses}{$sFieldClasses}{else}width-150{/if} js-input-{$sFieldName}"
data-required="true"
data-remote="{router page='ajax/validate/captcha'}"
data-remote-method="POST"
data-remote-param-name="{$sCaptchaName}"
{if $bFieldIsDisabled}disabled{/if} />
{/hookb}
{/block}

View file

@ -1,22 +0,0 @@
{**
* Чекбокс
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_before'}
{$bFieldNoLabel = true}
{/block}
{block name='field_holder' prepend}
{if $sFieldLabel}<label>{/if}
<input type="checkbox"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
value="{if $sFieldValue}{$sFieldValue}{else}1{/if}"
{if $bFieldIsDisabled}disabled{/if}
{$sFieldInputAttributes}
{if $sFieldInputClasses}class="{$sFieldInputClasses}"{/if}
{if $bFieldChecked}checked{else}{if $_aRequest[$sFieldName] == 1}checked{/if}{/if} />
{if $sFieldLabel}{$sFieldLabel}</label>{/if}
{/block}

View file

@ -1,35 +0,0 @@
{**
* Выбор изображения для аякс загрузки
*
* @scripts <framework>/js/livestreet/user.js
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<div class="js-ajax-{$sFieldName}-upload {$sFieldClasses}">
<img src="{$sFieldImagePath}" class="js-ajax-image-upload-image" />
<div>
<label for="{$sFieldName}" class="form-input-file">
{strip}
<span class="link-dotted js-ajax-image-upload-choose">
{if $oUserCurrent} {* TODO: переделать на универсальный *}
{if $oUserCurrent->getProfileAvatar()}
{$aLang.settings_profile_avatar_change}
{else}
{$aLang.settings_profile_avatar_upload}
{/if}
{/if}
</span>
{/strip}
<input type="file" name="{$sFieldName}" id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}" class="js-ajax-image-upload-file">
</label>
<a href="#" class="js-ajax-image-upload-remove link-dotted" {if ! $bFieldIsImage}style="display: none;"{/if}>
{$aLang.settings_profile_avatar_delete}
</a>
</div>
</div>
{/block}

View file

@ -1,13 +0,0 @@
{**
* Выбор файла
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<input type="file"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
class="{if $sFieldClasses}{$sFieldClasses}{/if}"
{if $bFieldIsDisabled}disabled{/if} />
{/block}

View file

@ -1,6 +0,0 @@
{**
* Скрытое поле
* Ключ безопасности LiveStreet
*}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='security_ls_key' sFieldValue=$LIVESTREET_SECURITY_KEY}

View file

@ -1,8 +0,0 @@
{**
* Скрытое поле
*}
<input type="hidden"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
value="{if $sFieldValue}{$sFieldValue}{elseif $_aRequest[$sFieldName]}{$_aRequest[$sFieldName]}{/if}" />

View file

@ -1,22 +0,0 @@
{**
*
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_before'}
{$bFieldNoLabel = true}
{/block}
{block name='field_holder' prepend}
{if $sFieldLabel}<label>{/if}
<input type="radio"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
value="{if $sFieldValue}{$sFieldValue}{else}1{/if}"
{if $bFieldIsDisabled}disabled{/if}
{$sFieldInputAttributes}
{if $sFieldInputClasses}class="{$sFieldInputClasses}"{/if}
{if $bFieldChecked}checked{else}{if $_aRequest[$sFieldName] == 1}checked{/if}{/if} />
{if $sFieldLabel}{$sFieldLabel}</label>{/if}
{/block}

View file

@ -1,28 +0,0 @@
{**
* Выбор даты
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<select name="{$sFieldNamePrefix}_day">
<option value="">{$aLang.date_day}</option>
{section name=date_day start=1 loop=32 step=1}
<option value="{$smarty.section.date_day.index}" {if $smarty.section.date_day.index==$aFieldItems|date_format:"%d"}selected{/if}>{$smarty.section.date_day.index}</option>
{/section}
</select>
<select name="{$sFieldNamePrefix}_month" style="width: 165px">
<option value="">{$aLang.date_month}</option>
{section name=date_month start=1 loop=13 step=1}
<option value="{$smarty.section.date_month.index}" {if $smarty.section.date_month.index==$aFieldItems|date_format:"%m"}selected{/if}>{$aLang.month_array[$smarty.section.date_month.index][0]}</option>
{/section}
</select>
<select name="{$sFieldNamePrefix}_year">
<option value="">{$aLang.date_year}</option>
{section name=date_year loop=$smarty.now|date_format:"%Y"+1 max=$smarty.now|date_format:"%Y"-2012+130 step=-1}
<option value="{$smarty.section.date_year.index}" {if $smarty.section.date_year.index==$aFieldItems|date_format:"%Y"}selected{/if}>{$smarty.section.date_year.index}</option>
{/section}
</select>
{/block}

View file

@ -1,38 +0,0 @@
{**
* Выбор местоположения
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_classes'}js-geo-select{/block}
{block name='field_holder' prepend}
<select class="js-geo-country width-full" name="{$sFieldNamePrefix}_country">
<option value="">{$aLang.geo_select_country}</option>
{if $aGeoCountries}
{foreach $aGeoCountries as $oGeoCountry}
<option value="{$oGeoCountry->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getCountryId() == $oGeoCountry->getId()}selected="selected"{/if}>{$oGeoCountry->getName()}</option>
{/foreach}
{/if}
</select>
<select class="js-geo-region width-full mt-15" name="{$sFieldNamePrefix}_region" {if ! $oFieldGeoTarget or ! $oFieldGeoTarget->getCountryId()}style="display:none;"{/if}>
<option value="">{$aLang.geo_select_region}</option>
{if $aGeoRegions}
{foreach $aGeoRegions as $oGeoRegion}
<option value="{$oGeoRegion->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getRegionId() == $oGeoRegion->getId()}selected="selected"{/if}>{$oGeoRegion->getName()}</option>
{/foreach}
{/if}
</select>
<select class="js-geo-city width-full mt-15" name="{$sFieldNamePrefix}_city" {if ! $oFieldGeoTarget or ! $oFieldGeoTarget->getRegionId()}style="display:none;"{/if}>
<option value="">{$aLang.geo_select_city}</option>
{if $aGeoCities}
{foreach $aGeoCities as $oGeoCity}
<option value="{$oGeoCity->getId()}" {if $oFieldGeoTarget and $oFieldGeoTarget->getCityId() == $oGeoCity->getId()}selected="selected"{/if}>{$oGeoCity->getName()}</option>
{/foreach}
{/if}
</select>
{/block}

View file

@ -1,13 +0,0 @@
{**
* Выпадающий список
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<select id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}" name="{$sFieldName}" class="{if $sFieldClasses}{$sFieldClasses}{else}width-full{/if}" {$sFieldInputAttributes} {if $bFieldIsDisabled}disabled{/if}>
{foreach $aFieldItems as $aItem}
<option value="{$aItem.value}" {if $aItem.value == $sFieldSelectedValue}selected{/if}>{$aItem.text}</option>
{/foreach}
</select>
{/block}

View file

@ -1,17 +0,0 @@
{**
* Текстовое поле
*}
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<input type="{if $sFieldType}{$sFieldType}{else}text{/if}"
id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
value="{if isset($sFieldValue)}{$sFieldValue}{elseif isset($_aRequest[$sFieldName])}{$_aRequest[$sFieldName]}{/if}"
class="{if $sFieldClasses}{$sFieldClasses}{else}width-full{/if} js-input-{$sFieldName}"
{if $sFieldPlaceholder}placeholder="{$sFieldPlaceholder}"{/if}
{foreach $aFieldRules as $sRule}data-{$sRule} {/foreach}
{if $bFieldIsAutofocus}autofocus{/if}
{if $bFieldIsDisabled}disabled{/if} />
{/block}

View file

@ -1,11 +0,0 @@
{extends file='forms/fields/form.field.base.tpl'}
{block name='field_holder' prepend}
<textarea id="{if $sFieldId}{$sFieldId}{else}{$sFieldName}{/if}"
name="{$sFieldName}"
class="{if $sFieldClasses}{$sFieldClasses}{else}width-full{/if}"
rows="{$iFieldRows}"
{if $sFieldPlaceholder}placeholder="{$sFieldPlaceholder}"{/if}
{if $bFieldIsDisabled}disabled{/if}
{foreach $aFieldRules as $sRule}data-{$sRule} {/foreach}>{if $sFieldValue}{$sFieldValue}{else}{if $_aRequest[$sFieldName]}{$_aRequest[$sFieldName]}{/if}{/if}</textarea>
{/block}

View file

@ -53,23 +53,23 @@
]}
{/foreach}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'topic[blog_id]'
sFieldLabel = $aLang.topic_create_blog
sFieldNote = $aLang.topic_create_blog_notice
sFieldClasses = 'width-full js-topic-add-title'
aFieldItems = $aBlogs
sFieldSelectedValue = {($oTopicEdit) ? $oTopicEdit->getBlogId() : '' }}
{include file='components/field/field.select.tpl'
sName = 'topic[blog_id]'
sLabel = $aLang.topic_create_blog
sNote = $aLang.topic_create_blog_notice
sClasses = 'width-full js-topic-add-title'
aItems = $aBlogs
sSelectedValue = {($oTopicEdit) ? $oTopicEdit->getBlogId() : '' }}
{* Заголовок топика *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'topic[topic_title]'
sFieldValue = {(($oTopicEdit) ? $oTopicEdit->getTitle() : '')|escape:'html' }
sFieldEntityField = 'topic_title'
sFieldEntity = 'ModuleTopic_EntityTopic'
sFieldNote = $aLang.topic_create_title_notice
sFieldLabel = $aLang.topic_create_title}
{include file='components/field/field.text.tpl'
sName = 'topic[topic_title]'
sValue = {(($oTopicEdit) ? $oTopicEdit->getTitle() : '')|escape:'html' }
sEntityField = 'topic_title'
sEntity = 'ModuleTopic_EntityTopic'
sNote = $aLang.topic_create_title_notice
sLabel = $aLang.topic_create_title}
{block name='add_topic_form_text_before'}{/block}
@ -78,12 +78,12 @@
{* Текст топика *}
{if $oTopicType->getParam('allow_text')}
{include file='forms/fields/form.field.textarea.tpl'
sFieldName = 'topic[topic_text_source]'
sFieldValue = {(($oTopicEdit) ? $oTopicEdit->getTextSource() : '')|escape:'html' }
sFieldRules = 'required="true" rangelength="[2,'|cat:$oConfig->Get('module.topic.max_length')|cat:']"'
sFieldLabel = $aLang.topic_create_text
sFieldClasses = 'width-full js-editor'}
{include file='components/field/field.textarea.tpl'
sName = 'topic[topic_text_source]'
sValue = {(($oTopicEdit) ? $oTopicEdit->getTextSource() : '')|escape:'html' }
aRules = [ 'required' => true, 'rangelength' => "[2,{$oConfig->Get('module.topic.max_length')}]" ]
sLabel = $aLang.topic_create_text
sInputClasses = 'js-editor'}
{* Если визуальный редактор отключен выводим справку по разметке для обычного редактора *}
{if ! $oConfig->GetValue('view.wysiwyg')}
@ -97,13 +97,13 @@
{* Теги *}
{if $oTopicType->getParam('allow_tags')}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'topic[topic_tags]'
sFieldValue = {(($oTopicEdit) ? $oTopicEdit->getTags() : '')|escape:'html' }
sFieldRules = 'required="true" rangetags="[1,15]"'
sFieldNote = $aLang.topic_create_tags_notice
sFieldLabel = $aLang.topic_create_tags
sFieldClasses = 'width-full autocomplete-tags-sep'}
{include file='components/field/field.text.tpl'
sName = 'topic[topic_tags]'
sValue = {(($oTopicEdit) ? $oTopicEdit->getTags() : '')|escape:'html' }
aRules = [ 'required' => true, 'rangetags' => '[1,15]' ]
sNote = $aLang.topic_create_tags_notice
sLabel = $aLang.topic_create_tags
sClasses = 'width-full autocomplete-tags-sep'}
{/if}
{* Показывает дополнительные поля *}
@ -124,20 +124,20 @@
{/if}
{* Запретить комментарии *}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'topic[topic_forbid_comment]'
bFieldChecked = {($oTopicEdit && $oTopicEdit->getForbidComment()) ? true : false }
sFieldNote = $aLang.topic_create_forbid_comment_notice
sFieldLabel = $aLang.topic_create_forbid_comment}
{include file='components/field/field.checkbox.tpl'
sName = 'topic[topic_forbid_comment]'
bChecked = {($oTopicEdit && $oTopicEdit->getForbidComment()) ? true : false }
sNote = $aLang.topic_create_forbid_comment_notice
sLabel = $aLang.topic_create_forbid_comment}
{* Принудительный вывод топиков на главную (доступно только админам) *}
{if $oUserCurrent->isAdministrator()}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'topic[topic_publish_index]'
bFieldChecked = {($oTopicEdit && $oTopicEdit->getPublishIndex()) ? true : false }
sFieldNote = $aLang.topic_create_publish_index_notice
sFieldLabel = $aLang.topic_create_publish_index}
{include file='components/field/field.checkbox.tpl'
sName = 'topic[topic_publish_index]'
bChecked = {($oTopicEdit && $oTopicEdit->getPublishIndex()) ? true : false }
sNote = $aLang.topic_create_publish_index_notice
sLabel = $aLang.topic_create_publish_index}
{/if}
@ -146,7 +146,7 @@
{* Скрытые поля *}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='topic_type' sFieldValue=$oTopicType->getCode()}
{include file='components/field/field.hidden.tpl' sName='topic_type' sValue=$oTopicType->getCode()}
{* Кнопки *}
@ -157,16 +157,16 @@
{/if}
{if $oTopicEdit}
{include file="forms/fields/form.field.hidden.tpl" sFieldName='topic[id]' sFieldValue=$oTopicEdit->getId()}
{include file="components/field/field.hidden.tpl" sName='topic[id]' sValue=$oTopicEdit->getId()}
{/if}
{include file='forms/fields/form.field.button.tpl'
sFieldId = {($oTopicEdit) ? 'submit-edit-topic-publish' : 'submit-add-topic-publish' }
sFieldStyle = 'primary'
sFieldClasses = 'fl-r'
sFieldText = $sSubmitInputText}
{include file='forms/fields/form.field.button.tpl' sFieldType='button' sFieldClasses='js-topic-preview-text-button' sFieldText=$aLang.topic_create_submit_preview}
{include file='forms/fields/form.field.button.tpl' sFieldId={($oTopicEdit) ? 'submit-edit-topic-save' : 'submit-add-topic-save' } sFieldText=$aLang.topic_create_submit_save}
{include file='components/button/button.tpl'
sId = {($oTopicEdit) ? 'submit-edit-topic-publish' : 'submit-add-topic-publish' }
sStyle = 'primary'
sClasses = 'fl-r'
sText = $sSubmitInputText}
{include file='components/button/button.tpl' sType='button' sClasses='js-topic-preview-text-button' sText=$aLang.topic_create_submit_preview}
{include file='components/button/button.tpl' sId={($oTopicEdit) ? 'submit-edit-topic-save' : 'submit-add-topic-save' } sText=$aLang.topic_create_submit_save}
</form>

View file

@ -3,11 +3,11 @@
*}
<form action="{router page='registration'}invite/" method="post">
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'invite_code'
sFieldRules = 'required="true" type="alphanum'
sFieldLabel = $aLang.registration_invite_code
sFieldClasses = 'width-300'}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_invite' sFieldStyle='primary' sFieldText=$aLang.registration_invite_check}
{include file='components/field/field.text.tpl'
sName = 'invite_code'
aRules = [ 'required' => true, 'type' => 'alphanum' ]
sLabel = $aLang.registration_invite_code
sInputClasses = 'width-300'}
{include file='components/button/button.tpl' sName='submit_invite' sStyle='primary' sText=$aLang.registration_invite_check}
</form>

View file

@ -10,36 +10,36 @@
{hook run='form_login_begin' isModal=$isModal}
{* Логин *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'login'
sFieldRules = 'required="true" rangelength="[2,20]"'
sFieldLabel = $aLang.user_login}
{include file='components/field/field.text.tpl'
sName = 'login'
aRules = [ 'required' => true, 'rangelength' => '[2,20]' ]
sLabel = $aLang.user_login}
{* Пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password'
sFieldType = 'password'
sFieldRules = 'required="true" rangelength="[2,20]"'
sFieldLabel = $aLang.user_password}
{include file='components/field/field.text.tpl'
sName = 'password'
sType = 'password'
aRules = [ 'required' => true, 'rangelength' => '[2,20]' ]
sLabel = $aLang.user_password}
{* Каптча *}
{if $oConfig->GetValue('general.login.captcha')}
{include file='forms/fields/form.field.captcha.tpl'
sFieldName = 'captcha'
{include file='components/field/field.captcha.tpl'
sName = 'captcha'
sCaptchaName = 'user_auth'
sFieldLabel = $aLang.registration_captcha}
sLabel = $aLang.registration_captcha}
{/if}
{* Запомнить *}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'remember'
sFieldLabel = $aLang.user_login_remember
bFieldChecked = true}
{include file='components/field/field.checkbox.tpl'
sName = 'remember'
sLabel = $aLang.user_login_remember
bChecked = true}
{hook run='form_login_end' isModal=$isModal}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='return-path' value=$PATH_WEB_CURRENT}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_login' sFieldStyle='primary' sFieldText=$aLang.user_login_submit}
{include file='components/field/field.hidden.tpl' sName='return-path' value=$PATH_WEB_CURRENT}
{include file='components/button/button.tpl' sName='submit_login' sStyle='primary' sText=$aLang.user_login_submit}
</form>
{if ! $isModal}

View file

@ -4,10 +4,10 @@
<form action="{router page='login'}reactivation/" method="post" class="js-form-reactivation">
{* E-mail *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'mail'
sFieldRules = 'required="true" type="email"'
sFieldLabel = $aLang.password_reminder_email}
{include file='components/field/field.text.tpl'
sName = 'mail'
aRules = [ 'required' => true, 'type' => 'email' ]
sLabel = $aLang.password_reminder_email}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_reactivation' sFieldStyle='primary' sFieldText=$aLang.reactivation_submit}
{include file='components/button/button.tpl' sName='submit_reactivation' sStyle='primary' sText=$aLang.reactivation_submit}
</form>

View file

@ -6,10 +6,10 @@
<form action="{router page='login'}reminder/" method="post" class="js-form-recovery">
{* E-mail *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'mail'
sFieldRules = 'required="true" type="email"'
sFieldLabel = $aLang.password_reminder_email}
{include file='components/field/field.text.tpl'
sName = 'mail'
aRules = [ 'required' => true, 'type' => 'email' ]
sLabel = $aLang.password_reminder_email}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_reactivation' sFieldStyle='primary' sFieldText=$aLang.password_reminder_submit}
{include file='components/button/button.tpl' sName='submit_reactivation' sStyle='primary' sText=$aLang.password_reminder_submit}
</form>

View file

@ -10,44 +10,44 @@
{hook run='form_registration_begin' isPopup=$isModal}
{* Логин *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'login'
sFieldRules = 'required="true" rangelength="[2,20]" remote="'|cat:{router page='registration'}|cat:'ajax-validate-fields" remote-method="POST"'
sFieldLabel = $aLang.user_login}
{include file='components/field/field.text.tpl'
sName = 'login'
aRules = [ 'required' => true, 'rangelength' => '[2,20]', 'remote' => "{router page='registration'}ajax-validate-fields", 'remote-method' => 'POST' ]
sLabel = $aLang.user_login}
{* E-mail *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'mail'
sFieldRules = 'required="true" type="email"'
sFieldLabel = $aLang.registration_mail}
{include file='components/field/field.text.tpl'
sName = 'mail'
aRules = [ 'required' => true, 'type' => 'email' ]
sLabel = $aLang.registration_mail}
{* Пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password'
sFieldType = 'password'
sFieldRules = 'required="true" rangelength="[2,20]"'
sFieldLabel = $aLang.registration_password
sFieldClasses = 'js-input-password-reg'}
{include file='components/field/field.text.tpl'
sName = 'password'
sType = 'password'
aRules = [ 'required' => true, 'rangelength' => '[2,20]' ]
sLabel = $aLang.registration_password
sClasses = 'js-input-password-reg'}
{* Повторите пароль *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'password_confirm'
sFieldType = 'password'
sFieldRules = 'required="true" rangelength="[2,20]" equalto=".js-input-password-reg"'
sFieldLabel = $aLang.registration_password_retry}
{include file='components/field/field.text.tpl'
sName = 'password_confirm'
sType = 'password'
aRules = [ 'required' => true, 'rangelength' => '[2,20]', 'equalto' => '.js-input-password-reg' ]
sLabel = $aLang.registration_password_retry}
{* Каптча *}
{include file='forms/fields/form.field.captcha.tpl'
sFieldName = 'captcha'
sCaptchaName = 'user_signup'
sFieldLabel = $aLang.registration_captcha}
{include file='components/field/field.captcha.tpl'
sName = 'captcha'
sCaptchaName = 'user_signup'
sLabel = $aLang.registration_captcha}
{hook run='form_registration_end' isPopup=$isModal}
{if $isModal}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='return-path' sFieldValue=$PATH_WEB_CURRENT}
{include file='components/field/field.hidden.tpl' sName='return-path' sValue=$PATH_WEB_CURRENT}
{/if}
{include file='forms/fields/form.field.button.tpl' sFieldName='submit_register' sFieldStyle='primary' sFieldText=$aLang.registration_submit}
{include file='components/button/button.tpl' sName='submit_register' sStyle='primary' sText=$aLang.registration_submit}
</form>
{hook run='registration_end' isPopup=$isModal}

View file

@ -1,7 +1,7 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.checkbox.tpl"
sFieldName = "property[{$oProperty->getId()}]"
bFieldChecked = $oValue->getValueInt()
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.checkbox.tpl"
sName = "property[{$oProperty->getId()}]"
bChecked = $oValue->getValueInt()
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}

View file

@ -1,12 +1,12 @@
{$oValue = $oProperty->getValue()}
{$oValueType = $oValue->getValueTypeObject()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}][date]"
sFieldValue = $oValue->getValueForForm()
sFieldClasses = 'width-150 date-picker'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}][date]"
sValue = $oValue->getValueForForm()
sClasses = 'width-150 date-picker'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}
{if $oProperty->getParam('use_time')}

View file

@ -1,11 +1,11 @@
{$oValue = $oProperty->getValue()}
{$oValueType = $oValue->getValueTypeObject()}
{include file="forms/fields/form.field.file.tpl"
sFieldName = "property[{$oProperty->getId()}][file]"
sFieldClasses = 'width-300'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.file.tpl"
sName = "property[{$oProperty->getId()}][file]"
sClasses = 'width-300'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}
{$aFile=$oValue->getDataOne('file')}
{if $aFile}

View file

@ -1,8 +1,8 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueFloat()
sFieldClasses = 'width-150'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueFloat()
sClasses = 'width-150'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}

View file

@ -1,11 +1,11 @@
{$oValue = $oProperty->getValue()}
{$oValueType = $oValue->getValueTypeObject()}
{include file="forms/fields/form.field.file.tpl"
sFieldName = "property[{$oProperty->getId()}][file]"
sFieldClasses = 'width-300'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.file.tpl"
sName = "property[{$oProperty->getId()}][file]"
sClasses = 'width-300'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}
{$aFile=$oValue->getDataOne('file')}
{if $aFile}

View file

@ -1,8 +1,8 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueInt()
sFieldClasses = 'width-150'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueInt()
sClasses = 'width-150'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}

View file

@ -1,11 +1,11 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueVarchar()
sFieldId = "property-value-tags-{$oProperty->getId()}"
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueVarchar()
sId = "property-value-tags-{$oProperty->getId()}"
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}
<script>
jQuery(function($){

View file

@ -1,8 +1,8 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.textarea.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueForForm()
iFieldRows = 10
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.textarea.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueForForm()
iRows = 10
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}

View file

@ -1,7 +1,7 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueVarchar()
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueVarchar()
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}

View file

@ -1,11 +1,11 @@
{$oValue = $oProperty->getValue()}
{include file="forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueVarchar()
sFieldClasses = 'width-300'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
{include file="components/field/field.text.tpl"
sName = "property[{$oProperty->getId()}]"
sValue = $oValue->getValueVarchar()
sClasses = 'width-300'
sNote = $oProperty->getDescription()
sLabel = $oProperty->getTitle()}
{include file="modals/modal.property_type_video.tpl" oValue=$oValue}
<p class="mb-20"><a href="#" class="link-dotted" data-modal-target="modal-property-type-video-{$oValue->getId()}">Смотреть</a></p>

View file

@ -12,12 +12,12 @@
{block name='modal_content'}
<form id="add_friend_form" onsubmit="return ls.user.addFriend(this,{$oUserProfile->getId()},'add');">
{include file='forms/fields/form.field.textarea.tpl'
sFieldName = 'add_friend_text'
sFieldRules = 'required="true" rangelength="[2,200]"'
iFieldRows = 3
bFieldNoMargin = true
sFieldLabel = $aLang.user_friend_add_text_label}
{include file='components/field/field.textarea.tpl'
sName = 'add_friend_text'
aRules = [ 'required' => true, 'rangelength' => '[2,200]' ]
iRows = 3
bNoMargin = true
sLabel = $aLang.user_friend_add_text_label}
</form>
{/block}

View file

@ -24,20 +24,17 @@
]}
{/foreach}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'topic_move_to'
sFieldLabel = $aLang.blog.remove.move_to
aFieldItems = $aBlogsCustom}
{include file='components/field/field.select.tpl'
sName = 'topic_move_to'
sLabel = $aLang.blog.remove.move_to
aItems = $aBlogsCustom}
{* Скрытые поля *}
{include file='forms/fields/form.field.hidden.security_key.tpl'}
{include file='components/field/field.hidden.security_key.tpl'}
</form>
{/block}
{block name='modal_footer_begin'}
{include file='forms/fields/form.field.button.tpl'
sFieldAttributes = 'data-button-submit-form="js-blog-remove-form"'
sFieldText = $aLang.common.remove
sFieldStyle = 'primary'}
{include 'components/button/button.tpl' sForm='#js-blog-remove-form' sText=$aLang.common.remove sStyle='primary'}
{/block}

View file

@ -19,27 +19,27 @@
]}
{/foreach}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'type'
sFieldLabel = $aLang.user_complaint_type_title
sFieldClasses = 'width-full'
aFieldItems = $aTypes }
{include file='components/field/field.select.tpl'
sName = 'type'
sLabel = $aLang.user_complaint_type_title
sClasses = 'width-full'
aItems = $aTypes }
{include file='forms/fields/form.field.textarea.tpl'
sFieldName = 'text'
iFieldRows = 5
sFieldLabel = $aLang.user_complaint_text_title
sFieldClasses = 'width-full'}
{include file='components/field/field.textarea.tpl'
sName = 'text'
iRows = 5
sLabel = $aLang.user_complaint_text_title
sClasses = 'width-full'}
{* Каптча *}
{if Config::Get('module.user.complaint_captcha')}
{include file='forms/fields/form.field.captcha.tpl'
{include file='components/field/field.captcha.tpl'
sCaptchaName = 'complaint_user'
sFieldName = 'captcha'
sFieldLabel = $aLang.registration_captcha}
sName = 'captcha'
sLabel = $aLang.registration_captcha}
{/if}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='user_id' sFieldValue=$_aRequest.user_id}
{include file='components/field/field.hidden.tpl' sName='user_id' sValue=$_aRequest.user_id}
</form>
{/block}

View file

@ -13,14 +13,18 @@
{block name='modal_content'}
<form id="js-favourite-form">
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'tags'
bFieldNoMargin = true
bFieldIsAutofocus = true
sFieldClasses = 'width-full autocomplete-tags-sep js-tags-form-input-list'}
{include file='components/field/field.text.tpl'
sName = 'tags'
bNoMargin = true
bIsAutofocus = true
sClasses = 'width-full autocomplete-tags-sep js-tags-form-input-list'}
</form>
{/block}
{block name='modal_footer_begin'}
<button type="submit" class="button button-primary js-tags-form-submit" data-button-submit-form="js-favourite-form">{$aLang.favourite_form_tags_button_save}</button>
{include 'components/button/button.tpl'
sForm = '#js-favourite-form'
sText = $aLang.common.save
sClasses = 'js-tags-form-submit'
sStyle = 'primary'}
{/block}

View file

@ -21,9 +21,9 @@
{/block}
{block name='modal_footer_begin'}
{include file='forms/fields/form.field.button.tpl'
sFieldAttributes = 'data-button-submit-form="js-poll-form"'
sFieldText = ($oPoll) ? $aLang.common.save : $aLang.common.add
sFieldClasses = 'js-poll-form-submit'
sFieldStyle = 'primary'}
{include 'components/button/button.tpl'
sForm = '#js-poll-form'
sText = ($oPoll) ? $aLang.common.save : $aLang.common.add
sClasses = 'js-poll-form-submit'
sStyle = 'primary'}
{/block}

View file

@ -42,9 +42,9 @@
</ul>
{* Описание *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'title'
sFieldLabel = $aLang.uploadimg_title}
{include file='components/field/field.text.tpl'
sName = 'title'
sLabel = $aLang.uploadimg_title}
</div>
{* Основные настройки *}
@ -52,10 +52,10 @@
<h3>Опции вставки</h3>
{* Выравнивание *}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'align'
sFieldLabel = $aLang.uploadimg_align
aFieldItems = $aSelectImageAlign}
{include file='components/field/field.select.tpl'
sName = 'align'
sLabel = $aLang.uploadimg_align
aItems = $aSelectImageAlign}
{* Размер *}
{$aSelectImageSizes = [ [ 'value' => 'original', 'text' => 'Оригинал' ] ]}
@ -68,11 +68,11 @@
]}
{/foreach}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'size'
sFieldLabel = 'Размер'
sFieldSelectedValue = $_aRequest.blog_category
aFieldItems = $aSelectImageSizes}
{include file='components/field/field.select.tpl'
sName = 'size'
sLabel = 'Размер'
sSelectedValue = $_aRequest.blog_category
aItems = $aSelectImageSizes}
</div>
{* Опции фотосета *}
@ -80,15 +80,15 @@
<h3>Опции фотосета</h3>
{* Показывать ленту с превьюшками *}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'use_thumbs'
bFieldChecked = true
sFieldLabel = 'Показывать ленту с превьюшками'}
{include file='components/field/field.checkbox.tpl'
sName = 'use_thumbs'
bChecked = true
sLabel = 'Показывать ленту с превьюшками'}
{* Показывать описания фотографий *}
{include file='forms/fields/form.field.checkbox.tpl'
sFieldName = 'show_caption'
sFieldLabel = 'Показывать описания фотографий'}
{include file='components/field/field.checkbox.tpl'
sName = 'show_caption'
sLabel = 'Показывать описания фотографий'}
</div>
</div>
</div>

View file

@ -67,25 +67,25 @@
<form method="POST" action="" enctype="multipart/form-data" id="tab-media-link" onsubmit="return false;" data-type="tab-pane" class="tab-pane modal-upload-image-pane js-media-link-form">
<div class="modal-content">
{* Ссылка *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'url'
sFieldValue = 'http://'
sFieldLabel = 'Ссылка'}
{include file='components/field/field.text.tpl'
sName = 'url'
sValue = 'http://'
sLabel = 'Ссылка'}
{* Описание *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'title'
sFieldLabel = $aLang.uploadimg_title}
{include file='components/field/field.text.tpl'
sName = 'title'
sLabel = $aLang.uploadimg_title}
<div style="display: none;" class="js-media-link-settings-image">
<p><img src="" width="200" class="js-media-link-settings-image-preview"></p>
{* Выравнивание *}
{include file='forms/fields/form.field.select.tpl'
sFieldName = 'align'
sFieldClasses = 'width-200'
sFieldLabel = $aLang.uploadimg_align
aFieldItems = $aSelectImageAlign}
{include file='components/field/field.select.tpl'
sName = 'align'
sClasses = 'width-200'
sLabel = $aLang.uploadimg_align
aItems = $aSelectImageAlign}
</div>
</div>

View file

@ -25,10 +25,10 @@
{block name='modal_footer_begin'}
{if $aUserList && $bSelectable}
{include 'forms/fields/form.field.button.tpl'
sFieldText = $aLang.common.add
sFieldStyle = 'primary'
sFieldClasses = 'js-user-list-select-add'
sFieldAttributes = "data-target=\"{$sTarget}\""}
{include 'components/button/button.tpl'
sText = $aLang.common.add
sStyle = 'primary'
sClasses = 'js-user-list-select-add'
sAttributes = "data-target=\"{$sTarget}\""}
{/if}
{/block}

View file

@ -7,10 +7,10 @@
<form action="" method="post" id="js-poll-form" data-action="{if $oPoll}update{else}add{/if}">
{* Заголовок топика *}
{include file='forms/fields/form.field.text.tpl'
sFieldName = 'poll[title]'
sFieldValue = {($oPoll) ? $oPoll->getTitle() : '' }
sFieldLabel = $aLang.poll.answer}
{include file='components/field/field.text.tpl'
sName = 'poll[title]'
sValue = {($oPoll) ? $oPoll->getTitle() : '' }
sLabel = $aLang.poll.answer}
{* Кол-во вариантов которые может выбрать пользователь *}
@ -20,27 +20,27 @@
<p class="mb-10">{$aLang.poll.form.fields.type.label}:</p>
{include file='forms/fields/form.field.radio.tpl'
sFieldName = 'poll[type]'
sFieldValue = 'one'
sFieldLabel = $aLang.poll.form.fields.type.label_one
bFieldChecked = ! $oPoll or $oPoll->getCountAnswerMax() == 1
bFieldIsDisabled = $bDisableChangeType}
{include file='components/field/field.radio.tpl'
sName = 'poll[type]'
sValue = 'one'
sLabel = $aLang.poll.form.fields.type.label_one
bChecked = ! $oPoll or $oPoll->getCountAnswerMax() == 1
bIsDisabled = $bDisableChangeType}
{include file='forms/fields/form.field.radio.tpl'
bFieldDisplayInline = true
sFieldName = 'poll[type]'
sFieldValue = 'many'
sFieldLabel = $aLang.poll.form.fields.type.label_many
bFieldChecked = $oPoll and $oPoll->getCountAnswerMax() > 1
bFieldIsDisabled = $bDisableChangeType}
{include file='components/field/field.radio.tpl'
bDisplayInline = true
sName = 'poll[type]'
sValue = 'many'
sLabel = $aLang.poll.form.fields.type.label_many
bChecked = $oPoll and $oPoll->getCountAnswerMax() > 1
bIsDisabled = $bDisableChangeType}
{include file='forms/fields/form.field.text.tpl'
bFieldDisplayInline = true
sFieldName = 'poll[count_answer_max]'
sFieldValue = ($oPoll) ? $oPoll->getCountAnswerMax() : 2
sFieldClasses = 'width-50'
bFieldIsDisabled = $bDisableChangeType}
{include file='components/field/field.text.tpl'
bDisplayInline = true
sName = 'poll[count_answer_max]'
sValue = ($oPoll) ? $oPoll->getCountAnswerMax() : 2
sClasses = 'width-50'
bIsDisabled = $bDisableChangeType}
{* Варианты ответов *}
@ -69,11 +69,11 @@
{if ! $oPoll or $oPoll->isAllowUpdate()}
<footer class="fieldset-footer">
{include file='forms/fields/form.field.button.tpl'
sFieldType = 'button'
sFieldText = $aLang.common.add
sFieldAttributes = 'title="[Ctrl + Enter]"'
sFieldClasses = 'js-poll-form-answer-add'}
{include file='components/button/button.tpl'
sType = 'button'
sText = $aLang.common.add
sAttributes = 'title="[Ctrl + Enter]"'
sClasses = 'js-poll-form-answer-add'}
</footer>
{/if}
</div>
@ -81,13 +81,13 @@
{* Скрытые поля *}
{if $oPoll}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='poll_id' sFieldValue=$oPoll->getId()}
{include file='components/field/field.hidden.tpl' sName='poll_id' sValue=$oPoll->getId()}
{else}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='target[type]' sFieldValue=$sTargetType}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='target[id]' sFieldValue=$sTargetId}
{include file='components/field/field.hidden.tpl' sName='target[type]' sValue=$sTargetType}
{include file='components/field/field.hidden.tpl' sName='target[id]' sValue=$sTargetId}
{/if}
{include file='forms/fields/form.field.hidden.tpl' sFieldName='target[tmp]' sFieldValue=$sTargetTmp}
{include file='components/field/field.hidden.tpl' sName='target[tmp]' sValue=$sTargetTmp}
</form>
{* Шаблон ответа для добавления с помощью js *}

View file

@ -14,36 +14,36 @@
{foreach $oPoll->getAnswers() as $oAnswer}
<li class="poll-answer-list-item js-poll-answer-list-item" data-answer-id="{$oAnswer->getId()}">
{if $oPoll->getCountAnswerMax() > 1}
{include 'forms/fields/form.field.checkbox.tpl'
sFieldName = 'answers[]'
sFieldValue = $oAnswer->getId()
sFieldLabel = $oAnswer->getTitle()
sFieldClasses = 'js-poll-answer-checkbox'}
{include 'components/field/field.checkbox.tpl'
sName = 'answers[]'
sValue = $oAnswer->getId()
sLabel = $oAnswer->getTitle()
sClasses = 'js-poll-answer-checkbox'}
{else}
{include 'forms/fields/form.field.radio.tpl'
sFieldName = 'answers[]'
sFieldValue = $oAnswer->getId()
sFieldLabel = $oAnswer->getTitle()
sFieldClasses = 'js-poll-answer-radio'}
{include 'components/field/field.radio.tpl'
sName = 'answers[]'
sValue = $oAnswer->getId()
sLabel = $oAnswer->getTitle()
sClasses = 'js-poll-answer-radio'}
{/if}
</li>
{/foreach}
</ul>
{include file='forms/fields/form.field.hidden.tpl' sFieldName='id' sFieldValue=$oPoll->getId()}
{include file='components/field/field.hidden.tpl' sName='id' sValue=$oPoll->getId()}
{if $oUserCurrent}
{include 'forms/fields/form.field.button.tpl'
sFieldText = $aLang.poll.vote
sFieldType = 'button'
sFieldStyle = 'primary'
sFieldClasses = 'js-poll-vote'}
{include 'components/button/button.tpl'
sText = $aLang.poll.vote
sType = 'button'
sStyle = 'primary'
sClasses = 'js-poll-vote'}
{include 'forms/fields/form.field.button.tpl'
sFieldText = $aLang.poll.abstain
sFieldType = 'button'
sFieldStyle = 'primary'
sFieldClasses = 'js-poll-abstain'}
{include 'components/button/button.tpl'
sText = $aLang.poll.abstain
sType = 'button'
sStyle = 'primary'
sClasses = 'js-poll-abstain'}
{else}
{$aLang.poll.only_auth}
{/if}

View file

@ -52,6 +52,7 @@ $aCss = array(
"___path.skin.assets.web___/css/components/tags.css",
"___path.skin.assets.web___/css/components/alphanumeric.css",
"___path.skin.assets.web___/css/components/search_form.css",
"___path.skin.assets.web___/css/components/field.css",
// Template's styles
"___path.skin.assets.web___/css/icons.css",

View file

@ -17,7 +17,7 @@
{/if}
{/foreach}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging sClasses='js-pagination-topics'}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog_no_topic sMods='empty'}
{/if}