ok

Mini Shell

Direktori : /home2/selectio/www/a1tex.in/storage/framework/views/
Upload File :
Current File : /home2/selectio/www/a1tex.in/storage/framework/views/9bdb7e3aa7ef54001d4e5362f37cc25cc0ae7c42.php

<?php $__env->startSection('title', \App\CPU\translate('Mail Config')); ?>
<?php $__env->startPush('css_or_js'); ?>

<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="content container-fluid">
        <!-- Page Title -->
        <div class="mb-4 pb-2">
            <h2 class="h1 mb-0 text-capitalize d-flex align-items-center gap-2">
                <img src="<?php echo e(asset('/public/assets/back-end/img/3rd-party.png')); ?>" alt="">
                <?php echo e(\App\CPU\translate('3rd_party')); ?>

            </h2>
        </div>
        <!-- End Page Title -->

        <!-- Inlile Menu -->
        <?php echo $__env->make('admin-views.business-settings.third-party-inline-menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <!-- End Inlile Menu -->

        <div class="row" style="text-align: <?php echo e(Session::get('direction') === "rtl" ? 'right' : 'left'); ?>;">
            <div class="col-12 mb-4">
                <div class="card">
                    <div class="card-body">
                        <div class="row align-items-center">
                            <div class="col-10">
                                <button class="btn btn--primary" type="button" data-toggle="collapse"
                                        data-target="#collapseExample" aria-expanded="false"
                                        aria-controls="collapseExample">
                                    <i class="tio-email-outlined"></i>
                                    <?php echo e(\App\CPU\translate('test_your_email_integration')); ?>

                                </button>
                            </div>
                            <div class="col-2 d-flex justify-content-end">
                                <i class="tio-telegram"></i>
                            </div>
                        </div>

                        <div class="collapse" id="collapseExample">
                            <div class="card card-body">
                                <form class="" action="javascript:">
                                    <div class="row">
                                        <div class="col-8">
                                            <div class="form-group mb-2">
                                                <label for="inputPassword2"
                                                       class="sr-only"><?php echo e(\App\CPU\translate('mail')); ?></label>
                                                <input type="email" id="test-email" class="form-control"
                                                       placeholder="Ex : jhon@email.com">
                                            </div>
                                        </div>
                                        <div class="col-4">
                                            <button type="button" onclick="send_mail()" class="btn btn--primary mb-2 btn-block">
                                                <i class="tio-telegram"></i>
                                                <?php echo e(\App\CPU\translate('send_mail')); ?>

                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6 mb-3 mb-sm-0">
                <div class="card h-100">
                    <div class="card-header">
                        <h5 class="mb-0"><?php echo e(\App\CPU\translate('smtp_mail_config')); ?></h5>
                    </div>
                    <div class="card-body">
                        <?php ($data_smtp=\App\CPU\Helpers::get_business_settings('mail_config')); ?>
                        <form action="<?php echo e(route('admin.business-settings.mail.update')); ?>"
                              method="post">
                            <?php echo csrf_field(); ?>
                            <?php if(isset($data_smtp)): ?>

                                <label class="mb-3 d-block title-color"><?php echo e(\App\CPU\translate('smtp_mail')); ?></label>

                                <div class="d-flex gap-10 align-items-center mb-2">
                                    <input type="radio" name="status"
                                           value="1" <?php echo e($data_smtp['status']==1?'checked':''); ?>>
                                    <label class="title-color mb-0"><?php echo e(\App\CPU\translate('Active')); ?></label>
                                    <br>
                                </div>
                                <div class="d-flex gap-10 align-items-center mb-4">
                                    <input type="radio" name="status"
                                           value="0" <?php echo e($data_smtp['status']==0?'checked':''); ?>>
                                    <label class="title-color mb-0"><?php echo e(\App\CPU\translate('Inactive')); ?></label>
                                    <br>
                                </div>
                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('mailer_name')); ?></label><br>
                                    <input type="text" placeholder="ex : Alex" class="form-control" name="name"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['name']); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('Host')); ?></label><br>
                                    <input type="text" class="form-control" name="host"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['host']); ?>">
                                </div>
                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('Driver')); ?></label><br>
                                    <input type="text" class="form-control" name="driver"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['driver']); ?>">
                                </div>
                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('port')); ?></label><br>
                                    <input type="text" class="form-control" name="port"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['port']); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('Username')); ?></label><br>
                                    <input type="text" placeholder="ex : ex@yahoo.com" class="form-control"
                                           name="username"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['username']); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('email_id')); ?></label><br>
                                    <input type="text" placeholder="ex : ex@yahoo.com" class="form-control" name="email"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['email_id']); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('Encryption')); ?></label><br>
                                    <input type="text" placeholder="ex : tls" class="form-control" name="encryption"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['encryption']); ?>">
                                </div>

                                <div class="form-group">
                                    <label class="title-color"><?php echo e(\App\CPU\translate('password')); ?></label><br>
                                    <input type="text" class="form-control" name="password"
                                           value="<?php echo e(env('APP_MODE')=='demo'?'':$data_smtp['password']); ?>">
                                </div>
                                <div class="d-flex flex-wrap justify-content-end gap-10">
                                    <button type="<?php echo e(env('APP_MODE')!='demo'?'submit':'button'); ?>"
                                            onclick="<?php echo e(env('APP_MODE')!='demo'?'':'call_demo()'); ?>"
                                            class="btn btn--primary px-4"><?php echo e(\App\CPU\translate('save')); ?></button>
                                    <?php else: ?>
                                        <button type="submit"
                                                class="btn btn--primary px-4"><?php echo e(\App\CPU\translate('Configure')); ?></button>
                                    <?php endif; ?>
                                </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="card h-100">
                    <div class="card-header">
                        <h5 class="mb-0"><?php echo e(\App\CPU\translate('sendgrid_mail_config')); ?></h5>
                    </div>
                    <div class="card-body">
                        <?php ($data_sendgrid=\App\CPU\Helpers::get_business_settings('mail_config_sendgrid')); ?>
                        <form action="<?php echo e(route('admin.business-settings.mail.update-sendgrid')); ?>"
                              method="post">
                            <?php echo csrf_field(); ?>
                            <?php if(isset($data_sendgrid)): ?>
                            <label class="mb-3 d-block title-color"><?php echo e(\App\CPU\translate('sendgrid_mail')); ?></label>

                            <div class="d-flex gap-10 align-items-center mb-2">
                                <input type="radio" name="status"
                                        value="1" <?php echo e($data_sendgrid['status']==1?'checked':''); ?>>
                                <label class="title-color mb-0"><?php echo e(\App\CPU\translate('Active')); ?></label>
                            </div>
                            <div class="d-flex gap-10 align-items-center mb-4">
                                <input type="radio" name="status"
                                        value="0" <?php echo e($data_sendgrid['status']==0?'checked':''); ?>>
                                <label class="title-color mb-0"><?php echo e(\App\CPU\translate('Inactive')); ?></label>
                            </div>
                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('mailer_name')); ?></label>
                                <input type="text" placeholder="ex : Alex" class="form-control" name="name"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['name']); ?>">
                            </div>

                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('Host')); ?></label>
                                <input type="text" class="form-control" name="host"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['host']); ?>">
                            </div>
                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('Driver')); ?></label>
                                <input type="text" class="form-control" name="driver"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['driver']); ?>">
                            </div>
                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('port')); ?></label>
                                <input type="text" class="form-control" name="port"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['port']); ?>">
                            </div>

                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('Username')); ?></label>
                                <input type="text" placeholder="ex : ex@yahoo.com" class="form-control"
                                        name="username"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['username']); ?>">
                            </div>

                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('email_id')); ?></label>
                                <input type="text" placeholder="ex : ex@yahoo.com" class="form-control" name="email"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['email_id']); ?>">
                            </div>

                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('Encryption')); ?></label>
                                <input type="text" placeholder="ex : tls" class="form-control" name="encryption"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['encryption']); ?>">
                            </div>

                            <div class="form-group">
                                <label class="title-color"><?php echo e(\App\CPU\translate('password')); ?></label>
                                <input type="text" class="form-control" name="password"
                                        value="<?php echo e(env('APP_MODE')=='demo'?'':$data_sendgrid['password']); ?>">
                            </div>
                            <div class="d-flex flex-wrap justify-content-end gap-10">
                                <button type="<?php echo e(env('APP_MODE')!='demo'?'submit':'button'); ?>"
                                        onclick="<?php echo e(env('APP_MODE')!='demo'?'':'call_demo()'); ?>"
                                        class="btn btn--primary px-4"><?php echo e(\App\CPU\translate('save')); ?></button>
                                <?php else: ?>
                                    <button type="submit"
                                            class="btn btn--primary px-4"><?php echo e(\App\CPU\translate('Configure')); ?></button>
                                <?php endif; ?>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('script'); ?>
    <script>
        function ValidateEmail(inputText) {
            var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
            if (inputText.match(mailformat)) {
                return true;
            } else {
                return false;
            }
        }

        function send_mail() {
            if (ValidateEmail($('#test-email').val())) {
                Swal.fire({
                    title: '<?php echo e(\App\CPU\translate('Are you sure?')); ?>?',
                    text: "<?php echo e(\App\CPU\translate('a_test_mail_will_be_sent_to_your_email')); ?>!",
                    showCancelButton: true,
                    confirmButtonColor: '#377dff',
                    cancelButtonColor: 'secondary',
                    confirmButtonText: '<?php echo e(\App\CPU\translate('Yes')); ?>!'
                }).then((result) => {
                    if (result.value) {
                        $.ajaxSetup({
                            headers: {
                                'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')
                            }
                        });
                        $.ajax({
                            url: "<?php echo e(route('admin.business-settings.mail.send')); ?>",
                            method: 'POST',
                            data: {
                                "email": $('#test-email').val()
                            },
                            beforeSend: function () {
                                $('#loading').show();
                            },
                            success: function (data) {
                                if (data.success === 2) {
                                    toastr.error('<?php echo e(\App\CPU\translate('email_configuration_error')); ?> !!');
                                } else if (data.success === 1) {
                                    toastr.success('<?php echo e(\App\CPU\translate('email_configured_perfectly!')); ?>!');
                                } else {
                                    toastr.info('<?php echo e(\App\CPU\translate('email_status_is_not_active')); ?>!');
                                }
                            },
                            complete: function () {
                                $('#loading').hide();

                            }
                        });
                    }
                })
            } else {
                toastr.error('<?php echo e(\App\CPU\translate('invalid_email_address')); ?> !!');
            }
        }
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.back-end.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/selectio/public_html/myclassicfit.com/resources/views/admin-views/business-settings/mail/index.blade.php ENDPATH**/ ?>

Zerion Mini Shell 1.0