

<?php $__env->startSection('profile-content'); ?>
    <?php echo $__env->make('include.message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <div class="form-group">
        <form action="<?php echo e(route('profile.updateTfa')); ?>" method="post" id="js-tfa-form">
            <?php echo csrf_field(); ?>
            <div class="card">
                <div class="card-body">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group" style="margin-top:20px;">
                                <label><?php echo e(__('Two Factor Authentication')); ?></label>
                                <br>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" name="tfa" class="custom-control-input" id="js-tfa-switch"
                                        <?php echo e($user->tfa == 'active' ? 'checked' : ''); ?>>
                                    <label class="custom-control-label"
                                        for="js-tfa-switch"><?php echo e($user->tfa == 'active' ? __('Enabled') : __('Disabled')); ?></label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
    <script type="text/javascript">
        $(document).ready(function() {
            //submit the form on switch toggle
            $(document).find('#js-tfa-switch').on('change', function() {
                $(this).is(":checked") ? $(this).val('active') : $(this).val('inactive');
                $('#js-tfa-form')[0].submit();
                $(this).attr('disabled', true);
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('profile.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/originsuiteai/webinar.originsuiteai.com/resources/views/profile/tfa.blade.php ENDPATH**/ ?>