function page_profile_panel_notification_create(form, html = 0) {
    if (form == undefined) {
        form = {
            '_csrf': yii.getCsrfToken()
        };
    } else {
        form = $(form).serializeArray();

        // Запись параметра типа уведомления (тест и html-код)
        form.push({
            name: 'Notification[html]',
            value: html
        });
    };

    return page_profile_panel_write(form);
};

function page_profile_panel_settings(form, panel) {
    if (form == undefined) {
        form = {
            '_csrf': yii.getCsrfToken()
        };

        if (panel !== undefined) {
            form.panel = panel;
        };
    } else {
        form = $(form).serializeArray();

        form.push({
            name: "panel",
            value: panel
        });
    };

    return page_profile_panel_write(form);
};

function page_profile_panel_write (form) {
    $.ajax({
        url: '/profile/panel',
        type: 'post',
        dataType: 'json',
        data: form,
        success: page_profile_response_success,
        error: page_profile_response_error
    });

    return false;
};
