Files
AtomicOld/design/atomic/html/feedback.tpl
2026-02-15 18:29:53 +03:00

57 lines
2.2 KiB
Smarty
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{literal}
<script src="https://www.google.com/recaptcha/api.js?render=6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q"></script>
<script>
grecaptcha.ready(function () {
grecaptcha.execute('6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q', { action: 'contact' }).then(function (token) {
var recaptchaResponse = document.getElementById('recaptchaResponseFeedback');
recaptchaResponse.value = token;
});
});
</script>
{/literal}
{* Страница с формой обратной связи *}
<h1>{$page->name|escape}</h1>
{$page->body}
<div class="title">Обратная связь</div>
<div class="well">
{if $message_sent}
{$name|escape}, ваше сообщение отправлено.
{else}
<form class="form feedback_form form-horizontal" method="post">
{if $error}
<div class="message_error">
{if $error=='captcha'}
Неверно введена капча
{elseif $error=='empty_name'}
Введите имя
{elseif $error=='empty_email'}
Введите email
{elseif $error=='empty_text'}
Введите сообщение
{/if}
</div>
{/if}
<div class="form-group">
<label for="name" class="col-sm-2 control-label">Имя</label>
<div class="col-sm-10">
<input class="form-control" data-format=".+" data-notice="Введите имя" value="{$name|escape}" name="name" maxlength="255" type="text"/>
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input required class="form-control" data-format="email" data-notice="Введите email" value="{$email|escape}" name="email" maxlength="255" type="text"/>
</div>
</div>
<div class="form-group">
<label for="message" class="col-sm-2 control-label">Сообщение</label>
<div class="col-sm-10">
<textarea class="form-control" data-format=".+" data-notice="Введите сообщение" value="{$message|escape}" name="message">{$message|escape}</textarea>
</div>
</div>
<input type="hidden" name="recaptcha_response" id="recaptchaResponseFeedback">
<input class="btn btn-danger pull-right" type="submit" name="feedback" value="Отправить" />
</form>
</div>
{/if}