-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Добавлены теги для вывода даты отправки сообщения в email. Теги работают в шаблоне email.tpl. Использование: `{send_date}` или `{send_date=D.m.Y}`. - Добавлена возможность вывода формы инлайново. Форма подгружается по-прежнему на ajax, но выводится сразу после загрузки страницы. Подробности в шаблоне **inline** - Добавлен тег `{current_page}` для вывода URL страницы, с которой была вызвана форма. Используется только в шаблоне email.tpl.
- Loading branch information
Showing
11 changed files
with
244 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,4 +184,4 @@ function setConditions($data, $fieldType = '', $arFields = array(), $tpl = false | |
} | ||
|
||
return $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Order Deny,Allow | ||
Allow from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// ----------------- | ||
// Настройки UniForm | ||
// ----------------- | ||
|
||
// ------------------------------------------- | ||
// Доступные параметры (значение по умолчанию) | ||
// templateFolder — Папка с шаблонами формы формы, указывается подпапка, в папке uniform текущего шаблона сайта сайта (feedback), в которой должны лежать файлы config.tpl, form.tpl и email.tpl | ||
// nocache — Отключение кеширования модуля (false) | ||
// debug — Дебаг (false) | ||
// required — Обязательные поля (false) | ||
// hidden — Разрешенные скрытые поля (false). Такие поля передаются из data-* атрибута кнопки открытия формы | ||
// sendmail — Отправлять email при заполнения формы? (false) | ||
// emails — Адреса почты, на которые необходимо отправлять уведомление (false) | ||
// selectFields — Поля типа select | ||
// checkboxFields — Поля типа checkbox | ||
// radioFields — Поля типа radio | ||
// ------------------------------------------- | ||
|
||
|
||
templateFolder = inline | ||
// nocache = y | ||
// debug = y | ||
required = textarea, email | ||
// hidden = newsid,user | ||
sendmail = y | ||
emails = [email protected], [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[header] | ||
Обращение из формы обратной связи | ||
[/header] | ||
<h2 style="margin: 0; padding: 20px; color: #ffffff; background: #4b9fc5;">Новое сообщение из формы обратной связи</h2><div style="background: #fafafa; padding: 20px; color: #333333;"> | ||
<b>email: </b> {email} <br> | ||
<b>Текст сообщения: </b> <br> | ||
{textarea} | ||
<br><b>Дата отправки: </b> {send_date=D.m.Y} | {send_date} | ||
<br><b>Отправлено со страницы:</b> {current_page} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{* | ||
Для вывода формы используем код: | ||
<div data-uf-inline="/engine/ajax/uniform/uniform.php" data-uf-settings='{"formConfig": "inline"}'> | ||
<div class="uf-inline-loading"></div> | ||
</div> | ||
*} | ||
<div class="uf-wrapper-inline"> | ||
<div class="uf-header"> | ||
Обратная связь | ||
</div> | ||
[debug]<div class="uf-content">{debug}</div>[/debug] | ||
[error] | ||
<div class="uf-alert uf-alert-error"> | ||
<b>Ошибка</b> | ||
<ul> | ||
[uf_token_error] | ||
<li>Ошибка сессии, попробуйте ещё раз.</li> | ||
[/uf_token_error] | ||
[uf_error_textarea] | ||
<li>Вы не написали сообщение</li> | ||
[/uf_error_textarea] | ||
[uf_error_email] | ||
<li>Вы не указали email</li> | ||
[/uf_error_email] | ||
[uf_email_error] | ||
<li>Проверьте правильность ввода email</li> | ||
[/uf_email_error] | ||
</ul> | ||
</div> | ||
[/error] | ||
[success] | ||
<div class="uf-alert uf-alert-success"><b>Спасибо за обращение!</b> <br> Если оно потребует ответа — мы свяжемся с вами.</div> | ||
<div class="uf-content"> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
Ваш email | ||
</div> | ||
<div class="uf-field-input"> | ||
<input class="uf-input uf-input-first [uf_error_email]uf-input-error[/uf_error_email] [uf_email_error]uf-input-error[/uf_email_error]" type="text" name="email" value=""> | ||
</div> | ||
</div> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
Сообщение | ||
</div> | ||
<div class="uf-field-input"> | ||
<textarea class="uf-input [uf_error_textarea]uf-input-error[/uf_error_textarea]" name="textarea" cols="30" rows="10"></textarea> | ||
</div> | ||
</div> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
| ||
</div> | ||
<div class="uf-field-input"> | ||
<button class="uf-btn ladda-button" type="submit" data-style="zoom-out"><span class="ladda-label">Отправить ещё</span></button> | ||
</div> | ||
</div> | ||
</div> | ||
[/success] | ||
[form] | ||
<div class="uf-content"> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
Ваш email | ||
</div> | ||
<div class="uf-field-input"> | ||
<input class="uf-input uf-input-first [uf_error_email]uf-input-error[/uf_error_email] [uf_email_error]uf-input-error[/uf_email_error]" type="text" name="email" value="{uf_field_email}"> | ||
</div> | ||
</div> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
Сообщение | ||
</div> | ||
<div class="uf-field-input"> | ||
<textarea class="uf-input [uf_error_textarea]uf-input-error[/uf_error_textarea]" name="textarea" cols="30" rows="10">{uf_field_textarea}</textarea> | ||
</div> | ||
</div> | ||
<div class="uf-field"> | ||
<div class="uf-label"> | ||
| ||
</div> | ||
<div class="uf-field-input"> | ||
<button class="uf-btn ladda-button" type="submit" data-style="zoom-out"><span class="ladda-label">Отправить</span></button> | ||
</div> | ||
</div> | ||
</div> | ||
[/form] | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>Error!!!</title> | ||
</head> | ||
<body>Error!!!</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters