/**
 * [OElove] (C)2010-2099 oelove.com  biz
 * Email: service@phpcoo.com ,phpcoo@qq.com
 * This is NOT a freeware, use is subject to license terms
 * $ Last update 2020/11/07 by BO $
*/
$(function () {
    function Profile () {
        this.language();
        this.submit();
    }
    Profile.prototype = {
        language: function () {
            $('[f="select_language"]').on('change', function () {
                var checkbox = $('[name="select_language"]:checked');
                var value = [];
                $.each(checkbox, function (i, v) {
                    value.push(v.value);
                });
                $('#language').val(value.join(','));
            });
        },
        submit: function () {
            $('[f="save_profile"]').on('click', function () {
                $('#profile').submit();
            });
        }
    }
    new Profile();
});