<div class="container-fluid">
    <div>
        <h3>Fake User Generator</h3>
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    <a href="#">Home</a>
                </li>
                <li class="breadcrumb-item">
                    <a href="#">Tools</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Fake User Generator</li>
            </ol>
        </nav>
    </div>
    <div class="row">
        <div class="col-lg-6 col-md-6">
            <div class="card">
                <form action="" method="POST" class="generate-form">
                    <div class="card-body">
                        <h6 class="card-title">Fake User Generator</h6>
                        <div class="alert alert-info">Generate unlimited fake users.</div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <label class="form-label">How many users you want to generate?</label>
                                <input type="number" id="count_users" name="count_users" class="form-control" value="10" min="10">
								<small class="admin-info">Minumum users required are 10</small>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <label class="form-label">Password</label>
                                <input type="text" id="password" name="password" class="form-control">
                                <small class="admin-info">Choose the password that will be used for all users, default: 123456789</small>
                            </div>
                        </div>
                        <label for="avatar">Create Random Avatar?</label>
                        <div class="form-group">
                            <div class="form-check form-check-inline">
                                <input class="form-check-input" type="radio" name="avatar" id="avatar-enabled" value="1">
                                <label class="form-check-label" for="avatar-enabled">Yes</label>
                            </div>
                            <div class="form-check form-check-inline">
                                <input class="form-check-input" type="radio" name="avatar" id="avatar-disabled" value="0" checked>
                                <label class="form-check-label" for="avatar-disabled" class="m-l-20">No</label>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <small>If avatar is enabled, you might see dublicated avatars, avatars are generated randomly.</small><br>
                        <small>This process might take some time, you can check for your site changes after few minutes.</small><br>
                        <div class="clearfix"></div><br>
                        <button type="submit" class="btn btn-primary waves-effect waves-light m-t-20" id="delete-btn">Generate Fake Data</button>
                    </div>
                </form>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
<script>
    $(function() {
        var generate_form = $('form.generate-form');
        generate_form.ajaxForm({
            url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=fake-users&p=fake-users',
            beforeSend: function() {
                $('#delete-btn').text('Please wait..');
            },
            success: function(data) {
                if (data.status == 200) {
                    $('#delete-btn').text('User are being generated, check your site after few mins.');
                    setTimeout(function () {
                        $('#delete-btn').text('Generate Fake Data');
                    }, 4000);
                }
            }
        });

    });
</script>