mirror of
https://github.com/sruupl/batflat.git
synced 2026-02-07 12:49:07 +01:00
89 lines
4.6 KiB
HTML
89 lines
4.6 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.driver}</label>
|
|
<p>
|
|
<label style="font-weight:normal;"><input type="radio" name="driver" value="mail" {if: $contact.driver == 'mail'}checked{/if}/> {$lang.contact.mail}</label>
|
|
<br />
|
|
<label style="font-weight:normal;"><input type="radio" name="driver" value="phpmailer" {if: $contact.driver == 'phpmailer'}checked{/if}/> {$lang.contact.phpmailer}</label>
|
|
</p>
|
|
<div id="phpmailer" class="well well-sm clearfix collapse" style="margin: 15px 0 0 0;">
|
|
{if: !class_exists("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()
|
|
{
|
|
var page = $(this).find("option:selected").val();
|
|
if(page > 0)
|
|
$('form #mail').slideUp();
|
|
else
|
|
$('form #mail').slideDown();
|
|
}).change();
|
|
$("form input[name='driver']").change(function()
|
|
{
|
|
if($(this).is(':checked'))
|
|
{
|
|
var val = $(this).val();
|
|
console.log(val);
|
|
if(val == "phpmailer")
|
|
$('form #phpmailer').slideDown();
|
|
else
|
|
$('form #phpmailer').slideUp();
|
|
}
|
|
}).change();
|
|
</script> |