mirror of
https://github.com/sruupl/batflat.git
synced 2026-01-13 09:22:03 +01:00
120 lines
5.9 KiB
HTML
120 lines
5.9 KiB
HTML
<article class="row">
|
|
<div class="col-md-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{$lang.general.settings}</div>
|
|
<div class="panel-body">
|
|
<form name="user" action="{?=url(ADMIN.'/contact/save')?}" method="POST">
|
|
<div class="form-group">
|
|
<label>{$lang.contact.recipient}</label>
|
|
<select name="user" class="form-control">
|
|
<option value="0">{$lang.contact.custom}</option>
|
|
{loop: $contact.users}
|
|
<option value="{$value.id}" {$value.attr}>{$value.username} <{$value.email}></option>
|
|
{/loop}
|
|
</select>
|
|
</div>
|
|
<div class="form-group collapse" id="mail">
|
|
<label>{$lang.contact.or_mail}</label>
|
|
<input class="form-control" type="email" name="email" value="{$contact.email|e}" placeholder="{$lang.contact.example}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>{$lang.contact.checkbox}</label>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="checkbox[switch]" value="0" {if: !$contact.checkbox.switch}checked{/if}> {$lang.general.say_no}
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="checkbox[switch]" value="1" {if: $contact.checkbox.switch}checked{/if}> {$lang.general.say_yes}
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group collapse" id="checkbox">
|
|
<label>{$lang.contact.checkbox_content}</label>
|
|
<textarea class="form-control" name="checkbox[content]" rows="4">{$contact.checkbox.content|e}</textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>{$lang.contact.driver}</label>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="driver" value="mail" {if: $contact.driver == 'mail'}checked{/if}> {$lang.contact.mail}
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="driver" value="phpmailer" {if: $contact.driver == 'phpmailer'}checked{/if}> {$lang.contact.phpmailer}
|
|
</label>
|
|
</div>
|
|
<div id="phpmailer" class="well well-sm clearfix collapse" style="margin: 15px 0 0 0;">
|
|
{if: !class_exists("PHPMailer\PHPMailer\PHPMailer")}
|
|
<div class="alert alert-danger">{$lang.contact.phpmailer_error}</div>
|
|
{/if}
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-xs-10">
|
|
<label>{$lang.contact.server}</label>
|
|
<input type="text" class="form-control" name="phpmailer[server]" value="{$contact.phpmailer.server}">
|
|
</div>
|
|
<div class="col-xs-2">
|
|
<label>{$lang.contact.port}</label>
|
|
<input type="text" class="form-control" name="phpmailer[port]" value="{$contact.phpmailer.port}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>{$lang.contact.name}</label>
|
|
<input type="text" class="form-control" name="phpmailer[name]" value="{$contact.phpmailer.name}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>{$lang.contact.username}</label>
|
|
<input type="text" class="form-control" name="phpmailer[username]" value="{$contact.phpmailer.username}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>{$lang.contact.password}</label>
|
|
<input type="password" class="form-control" name="phpmailer[password]" value="{$contact.phpmailer.password}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="submit" name="save" class="btn btn-primary" value="{$lang.general.save}">
|
|
</form>
|
|
<div class="well well-sm clearfix" style="margin: 15px 0 0 0;">
|
|
{$lang.contact.info} <strong>{noparse}{$contact.form}{/noparse}</strong>.
|
|
<span class="label label-default pull-right">info</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
|
|
<script>
|
|
$('form select[name="user"]').change(function()
|
|
{
|
|
if($(this).find('option:selected').val() > 0)
|
|
$('form #mail').slideUp();
|
|
else
|
|
$('form #mail').slideDown();
|
|
}).change();
|
|
|
|
$('form input[name="checkbox[switch]"]').change(function()
|
|
{
|
|
if($(this).is(':checked'))
|
|
{
|
|
if(this.value == 0)
|
|
$('form #checkbox').slideUp();
|
|
else
|
|
$('form #checkbox').slideDown();
|
|
}
|
|
}).change();
|
|
|
|
$('form input[name="driver"]').change(function()
|
|
{
|
|
if($(this).is(':checked'))
|
|
{
|
|
if(this.value == 'phpmailer')
|
|
$('form #phpmailer').slideDown();
|
|
else
|
|
$('form #phpmailer').slideUp();
|
|
}
|
|
}).change();
|
|
</script> |