Viewing file: dd7acd80d576959e341781b73ff4e70c36b65652.php (10.71 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> Sending Domain <?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-css'); ?>
<link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')); ?>">
<link rel="stylesheet" href="<?php echo e(asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')); ?>">
<style>
#dnsKey{
background: #d3d3d36b;
padding: 3px 8px;
border-radius: 5px;
margin: 6px 5px;
}
#pubKey{
background: #d3d3d36b;
padding: 3px 8px;
border-radius: 5px;
margin: 6px 5px;
line-break: anywhere;
}
#dkim_key{
background: #d3d3d36b;
padding: 3px 8px;
border-radius: 5px;
margin: 6px 5px;
line-break: anywhere;
overflow-y: scroll;
height: 100px;
width: 100%;
}
#spf_key{
background: #d3d3d36b;
padding: 3px 8px;
border-radius: 5px;
margin: 6px 5px;
line-break: anywhere;
width: 100%;
}
.desc-section{
line-height: 27px;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-12 mt-3">
<div class="card">
<div class="card-header">
<h2 class="card-title"><?php echo app('translator')->get('customer.list'); ?></h2>
<div class="float-right">
<a class="btn btn-primary" href="<?php echo e(route('customer.domain.create')); ?>"><?php echo app('translator')->get('customer.new'); ?></a>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="domains" class="table table-striped table-bordered dt-responsive nowrap">
<thead>
<tr>
<th><?php echo app('translator')->get('customer.name'); ?></th>
<th><?php echo app('translator')->get('customer.dkim_key'); ?></th>
<th><?php echo app('translator')->get('customer.spf_key'); ?></th>
<th><?php echo app('translator')->get('customer.text'); ?></th>
<th><?php echo app('translator')->get('customer.dmarc_key'); ?></th>
<th><?php echo app('translator')->get('customer.dkim_key_verified'); ?></th>
<th><?php echo app('translator')->get('customer.spf_key_verified'); ?></th>
<th><?php echo app('translator')->get('customer.text_verified'); ?></th>
<th><?php echo app('translator')->get('customer.dmarc_key_verified'); ?></th>
<th><?php echo app('translator')->get('customer.action'); ?></th>
</tr>
</thead>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<button type="button" class="btn btn-primary d-none" id="authorizeDomainButton" data-toggle="modal" data-target="#authorizeDomainModal"></button>
<div class="modal fade" id="authorizeDomainModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-center-domain-title" id="exampleModalLabel">Authorize this domain</h5>
<button type="button" class="close modal-close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="fas fa-times"></i></span>
</button>
</div>
<p class="text-center-domain-title"><?php echo app('translator')->get('customer.authorize_your_domain'); ?></p>
<div class="modal-body">
<div class="form-group">
<label for="dkim_key">1. <?php echo app('translator')->get('customer.dkim_key'); ?> "<span id="domain_name_sector"></span>" <?php echo app('translator')->get('customer.to_small'); ?></label>
<p id="dkim_key"></p>
<button type="button" class="btn btn-primary ml-2 mt-2 mb-4 float-right verify_btn" id="dkim_key_verify_btn">Verify</button>
</div>
<div class="form-group">
<label for="spf_key">2. <?php echo app('translator')->get('customer.spf_key'); ?> "<span class="domain_name"></span>" <?php echo app('translator')->get('customer.to_small'); ?></label>
<p id="spf_key"></p>
<button type="button" class="btn btn-primary ml-2 mt-2 mb-4 float-right verify_btn" id="spf_key_verify_btn">Verify</button>
</div>
<div class="form-group">
<label for="dnsKey">3. <?php echo app('translator')->get('customer.text'); ?> "<span class="domain_name"></span>" <?php echo app('translator')->get('customer.to_small'); ?></label>
<p id="dnsKey"></p>
<button type="button" class="btn btn-primary ml-2 mt-2 mb-4 float-right verify_btn" id="text_verify_btn">Verify</button>
</div>
<div class="form-group">
<label for="pubKey">4. <?php echo app('translator')->get('customer.dmarc_key'); ?> "_dmarc.<span class="domain_name"></span>" <?php echo app('translator')->get('customer.to_small'); ?></label>
<p id="pubKey"></p>
<button type="button" class="btn btn-primary ml-2 mt-2 mb-2 float-right verify_btn" id="dmarc_key_verify_btn">Verify</button>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script src="<?php echo e(asset('js/customer/domain.js')); ?>"></script>
<script>
$(document).on('click', '.domain_key_show', function(e){
e.preventDefault();
const id = $(this).attr('data-id');
$.ajax({
type:'GET',
url:'<?php echo e(route('customer.domain.keys.show')); ?>',
data:{
id:id
},
success:function (res){
if(res.status=='success' && res.data){
$('.ssh_key_section').removeClass('d-none');
$('#continue').addClass('d-none');
$('#dkim_key_verify_btn').attr('key', res.data.dkim_key).attr('name', 'dkim_key').attr('domain_key',res.data.dnskey).attr('data-id',res.data.id);
$('#spf_key_verify_btn').attr('key', res.data.spf_key).attr('name', 'spf_key').attr('domain_key',res.data.name).attr('data-id',res.data.id);
$('#text_verify_btn').attr('key', res.data.mail_code).attr('name', 'text').attr('domain_key',res.data.name).attr('data-id',res.data.id);
$('#dmarc_key_verify_btn').attr('key', res.data.dmarc_key).attr('name', 'dmarc_key').attr('domain_key','_dmarc.'+res.data.name).attr('data-id',res.data.id);
$('.domain_name').text(res.data.name)
$('#domain_name_sector').text(res.data.dnskey);
$('#dkim_key').text(res.data.dkim_key);
$('#spf_key').text(res.data.spf_key);
$('#dnsKey').removeClass('d-none').text(res.data.mail_code);
$('#pubKey').removeClass('d-none').text(res.data.dmarc_key);
if(res.data.dkim_key_verified=='yes'){
$('#dkim_key_verify_btn').attr('disabled', 'true').addClass('disabled');
}
if(res.data.spf_key_verified=='yes'){
$('#spf_key_verify_btn').attr('disabled', 'true').addClass('disabled');
}
if(res.data.text_verified=='yes'){
$('#text_verify_btn').attr('disabled', 'true').addClass('disabled');
}
if(res.data.dmarc_key_verified=='yes'){
$('#dmarc_key_verify_btn').attr('disabled', 'true').addClass('disabled');
}
$('#authorizeDomainButton').trigger('click');
}else{
toastr.error(res.message, {timeOut: 9000});
}
}
})
});
$(document).on('click', '.verify_btn', function (e){
e.preventDefault();
const key = ""+$(this).attr('key');
const name = $(this).attr('name');
const domain_key = $(this).attr('domain_key');
const id = $(this).attr('data-id');
$(this).addClass('disabled').attr('disabled','true');
const that=this;
$.ajax({
type:'POST',
url:'<?php echo e(route('customer.domain.verification')); ?>',
data:{
key:key,
name:name,
domain_key:domain_key,
id:id,
_token:'<?php echo e(csrf_token()); ?>'
},
success:function (res){
if(res.status=='success'){
toastr.success(res.message, {timeOut: 9000});
}else{
toastr.error(res.message, {timeOut: 9000});
$(that).removeClass('disabled').removeAttr('disabled');
}
}
})
})
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/pcolfjqt/mail.picotech.app/resources/views/customer/domain/index.blade.php ENDPATH**/ ?>
|