Viewing file: c70e14297c80fe2ce4f0c938d486803a39cdc306.php (8.97 KB) -rwxrwxr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title',trans('auth.login_title')); ?> <?php $__env->startSection('css'); ?> <style> .default-credential-text { background: #f9f9f9; padding: 15px; border: 1px solid #ccc; border-radius: 8px; max-width: 600px; margin-top: 20px; }
.credential-text { font-size: 14px; flex: 1; }
.auth-type { display: none; }
.copy-icon-wrapper { padding-left: 15px; }
.copy-icon { font-size: 24px; color: #007bff; cursor: pointer; transition: color 0.2s ease-in-out; }
.copy-icon:hover { color: #0056b3; }
</style> <?php $__env->stopSection(); ?> <?php $__env->startSection('main-content'); ?> <div class="authincation h-100"> <div class="container h-100"> <div class="row justify-content-center h-100 align-items-center"> <div class="col-md-6"> <div class="authincation-content"> <div class="row no-gutters"> <div class="col-xl-12"> <div class="text-center mt-2 d-none"><span class="text-red font-weight-bolder"><?php echo e(trans('Database is being refreshed every 2 hours')); ?></span></div>
<div class="auth-form"> <h4 class="text-center mb-4"><?php echo e(trans('auth.login_title')); ?></h4> <form action="<?php echo e(route('authenticate')); ?>" method="post" id="signInForm"> <?php echo csrf_field(); ?> <div class="form-group"> <label class="mb-1"><strong><?php echo e(trans('auth.email')); ?></strong></label> <input type="email" id="email" class="form-control" placeholder="<?php echo e(trans('auth.email_ex')); ?>" name="email"> </div> <div class="form-group"> <label class="mb-1"><strong><?php echo e(trans('auth.password')); ?></strong></label> <input type="password" id="password" class="form-control" placeholder="<?php echo e(trans('auth.password')); ?>" name="password"> </div> <div class="form-row d-flex justify-content-between mt-4 mb-2"> <div class="form-group"> <div class="custom-control custom-checkbox ml-1"> <input type="checkbox" class="custom-control-input" id="basic_checkbox_1" name="remember_me"> <label class="custom-control-label" for="basic_checkbox_1"><?php echo e(trans('auth.remember_pass')); ?></label> </div> </div> <div class="form-group"> <a href="<?php echo e(route('forget.password')); ?>"><?php echo e(trans('auth.forget_pass')); ?>?</a> </div> </div> <div id="g_token_append">
</div> <div class="text-center"> <button type="<?php echo e(json_decode(get_settings('site_setting')) && isset(json_decode(get_settings('site_setting'))->recaptcha_site_key)?'button':'submit'); ?>" class="btn btn-primary btn-block signIn"><?php echo e(trans('auth.sign_in')); ?></button> </div> </form> <div class="new-account mt-3"> <p><?php echo e(trans('auth.haven\'t_account')); ?> <a class="text-primary" href="<?php echo e(route('registration',['type'=>request()->get('type')])); ?>"><?php echo e(trans('auth.sign_up')); ?></a> </p> </div> <?php if(config('app.demo_mode')): ?> <hr> <div class="default-credential-section "> <div class="default-credential-text d-flex justify-content-around"> <div class="credential-text"> <div class="mb-1"> <strong>Click to copy and use demo credentials:</strong>
<div class="auth-type admin-type mb-1"> Email: <span class="demo-email">admin@demo.com</span><br /> Password: <span class="demo-password">123456</span> </div>
<div class="auth-type restaurent-owner-type mb-1"> Email: <span class="demo-email">alex@gmail.com</span><br /> Password: <span class="demo-password">123456</span> </div>
<div class="auth-type customer-type mb-1"> Email: <span class="demo-email">customer@gmail.com</span><br /> Password: <span class="demo-password">123456</span> </div> </div> </div> <div> <i class="fa fa-copy copy-icon" title="Copy"></i> </div> </div> </div> <?php endif; ?> </div> </div> </div> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?>
<?php if(json_decode(get_settings('site_setting')) && isset(json_decode(get_settings('site_setting'))->recaptcha_site_key)): ?> <script src="https://www.google.com/recaptcha/api.js?render=<?php echo e(json_decode(get_settings('site_setting'))->recaptcha_site_key); ?>"></script> <script> $(document).on('click', '.signIn', function (e) { e.preventDefault(); grecaptcha.ready(function() { grecaptcha.execute('<?php echo e(json_decode(get_settings('site_setting'))->recaptcha_site_key); ?>', {action: 'submit'}).then(function(token) { // Add your logic to submit to your backend server here. if(token){ $('#g_token_append').html(`<input type="hidden" name="grecaptcha_response" value="${token}">`); $('#signInForm').submit(); } }); }); })
</script> <?php endif; ?>
<?php if(config('app.demo_mode')): ?> <script> $(document).ready(function () { const urlParams = new URLSearchParams(window.location.search); const type = urlParams.get('type'); const allowedTypes = ['admin', 'restaurent_owner', 'customer','reservation_owner']; const section = $('.default-credential-section');
if (!allowedTypes.includes(type)) { section.hide(); return; }
// $('.' + type.replace('_', '-') + '-type').show(); $('.' + type.replace('_', '-') + '-type').show();
$('.copy-icon').click(function () { const $target = $('.' + type.replace('_', '-') + '-type'); const email = $target.find('.demo-email').text().trim(); const password = $target.find('.demo-password').text().trim();
$('#email').val(email); $('#password').val(password);
const textToCopy = `Email: ${email}\nPassword: ${password}`; const $temp = $('<textarea>'); $('body').append($temp); $temp.val(textToCopy).select(); document.execCommand('copy'); $temp.remove(); }); }); </script> <?php endif; ?> <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.auth', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/test.qr.picotech.app/public_html/resources/views/auth/login.blade.php ENDPATH**/ ?>
|