You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/BookingJieFeng/Views/Booking/SendMailAfterSubmit.cshtml

74 lines
3.0 KiB
Plaintext

3 years ago
@{
}
<div class="wrapper wrapper-content animated fadeIn gray-bg-right">
<form class="form-horizontal clearfix" id="mailForm" method="post">
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-5 col-sm-offset-3 account-b">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">收件人</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="mailAddr" value="@ViewBag.MailAddr" placeholder="收件人邮箱地址,多个用英文逗号“,”隔开" required>
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">标题</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="title" value="@ViewBag.Title" required>
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">内容</label>
<div class="col-lg-8 col-md-6">
<textarea class="form-control" name="body" style="height:300px;" required>@ViewBag.Body</textarea>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-5 col-sm-offset-5 clearfix">
<a class="btn btn-info" id="btnSubmit">发送</a>
<a class="btn btn-default" id="btnClose">不发送</a>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
@section scripts
{
<script src="~/Content/hplus/js/plugins/validate/jquery.validate.min.js"></script>
<script src="~/Content/js/jquery.form.js"></script>
<script src="~/Content/js/validatorConfig.js"></script>
<script>
$(function () {
$("#mailForm").validate()
$("#btnSubmit").click(function () {
if ($("#mailForm").valid()) {
var obj = $("#mailForm").serializeObject();
$.ajax({
method: 'POST',
url: '@Url.Action("SendMailAfterSubmit")',
data: obj,
success: function (data) {
layer.alert(data.Message, function () {
parent.closeLayer()
})
}
});
}
})
$("#btnClose").click(function () {
parent.closeLayer()
})
})
</script>
}