<div class="container-fluid">
    <div class="block-header">
        <h2>Settings > Video & Audio Settings</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-6 col-md-6">
            <div class="card">
                <div class="header">
                    <h2>Chat Settings</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success email-settings-alert"></div>
                    <form class="email-settings" method="POST">
                        <label for="user_registration">Message &amp; notifications update interval</label><div class="clearfix"></div><br>
                        <div class="form-group form-float">
                            <div class="form-line focused">
                                <input type="text" name="worker_updateDelay" class="form-control" value="<?php echo $wo['config']['worker_updateDelay']?>">
                                <label class="form-label">Milliseconds</label>
                            </div>
                        </div>

                        <label for="paypal_mode">Not Pro Chat user settings</label><div class="clearfix"></div><br>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="not_pro_chat_limit_daily" name="not_pro_chat_limit_daily" class="form-control" value="<?php echo $wo['config']['not_pro_chat_limit_daily'];?>">
                                <label class="form-label">Max allowed users to chat daily. X Users</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="not_pro_chat_credit" name="not_pro_chat_credit" class="form-control" value="<?php echo $wo['config']['not_pro_chat_credit'];?>">
                                <label class="form-label">Credit per user chat. X Points.</small></label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="not_pro_chat_stickers_limit" name="not_pro_chat_stickers_limit" class="form-control" value="<?php echo $wo['config']['not_pro_chat_stickers_limit'];?>">
                                <label class="form-label">Max Stickers to show. X Stickers</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="not_pro_chat_stickers_credit" name="not_pro_chat_stickers_credit" class="form-control" value="<?php echo $wo['config']['not_pro_chat_stickers_credit'];?>">
                                <label class="form-label">Credit to show more stickers. X Points.</small></label>
                            </div>
                        </div>
                        <label for="message_request_system">Message request system.</label>
                        <div class="form-group">
                            <input type="radio" name="message_request_system" id="message_request_system-enabled" value="on" <?php echo ($wo['config']['message_request_system'] == 'on') ? 'checked': '';?>>
                            <label for="message_request_system-enabled">Yes</label>
                            <input type="radio" name="message_request_system" id="message_request_system-disabled" value="off" <?php echo ($wo['config']['message_request_system'] == 'off') ? 'checked': '';?>>
                            <label for="message_request_system-disabled" class="m-l-20">No</label>
                        </div>
                        <div class="clearfix"></div>
                        <label for="giphy_api">Giphy API</label>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="giphy_api" name="giphy_api" class="form-control" value="<?php echo $wo['config']['giphy_api'];?>">
                            </div>
                        </div>
                        <input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
                        <button type="submit" class="btn btn-primary m-t-15 waves-effect">Save</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>

$(function() {
    var form_email_settings = $('form.email-settings');
    form_email_settings.ajaxForm({
        url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=update_general_setting',
        beforeSend: function() {
            form_email_settings.find('button').text('Please wait..');
        },
        success: function(data) {
            if (data.status == 200) {
                form_email_settings.find('button').text('Save');
                $("html, body").animate({ scrollTop: 0 }, "slow");
                $('.email-settings-alert').html('<i class="fa fa-check"></i> Settings updated successfully');
                setTimeout(function () {
                    $('.email-settings-alert').empty();
                }, 2000);
            }
        }
    });
});
</script>