function page_profile_trusted_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_trusted_write(form);
}

function page_profile_trusted_settings(form) {
    if (form == undefined) {
        form = {
            '_csrf': yii.getCsrfToken()
        };
    } else {
        form = $(form).serializeArray();
    }

    return page_profile_trusted_write(form);
}

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

    return false;
}