form.addEventListener('submit', function (event) { event.preventDefault(); tma__profile__submitEditProfile(form, { onSuccess: function () { // TODO: удалить фолбэк после обновления tilda-members-init.min.js if (typeof tma__getSafeRedirectUrl === 'function') { var safeUrl = tma__getSafeRedirectUrl(url); if (safeUrl) { window.location.assign(safeUrl); } } else if (url) { window.location.assign(url); } }, }); });}/** * Шаблон списка страниц * * @param {object} props - данные доступных ресурсов * @param {object} style - данные стилей * @returns {string} - список страниц */function tma__resources__getPagesListHtml(props, style) { var html = ''; html += '<div class="tlk-resources__container">'; if (style && (!style.typeId || style.typeId === 'custom') && style.textTop) { html += '<div class="tlk-resources__text-top">' + style.textTop + '</div>'; } html += '<div class="tlk-resources__wrap">'; if (props.courses.length === 0 && props.groups.length === 0) { html += '<div class="tlk-resources__empty">'; html += '<div class="tlk-resources__empty-wrap">'; html += '<div class="tlk-resources__empty-image">'; html += '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">'; html += '<line fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" x1="7" y1="0" x2="7" y2="64"></line>'; html += '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="32.062,6 26,11 26,35 57,35 51,23 57,11 26,11 "></polyline>'; html += '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="26,30 7,30 7,6 32,6 32,11 "></polyline>'; html += '</svg>'; html += '</div>'; html += '<div class="tlk-resources__empty-text">'; html += '{{resources_empty_text_first}}<br>{{resources_empty_text_second}}'; html += '</div>'; html += '</div>'; html += '</div>'; } else { if (props.courses.length !== 0) { html += '<div class="tlk-resources__courses">'; for (var i = 0; i < props.courses.length; i++) { html += tma__resources__getCourseItemHtml(props.courses[i]); } html += '</div>'; } if (props.groups.length !== 0) { html += '<div class="tlk-resources__groups">'; for (var i = 0; i < props.groups.length; i++) { html += tma__resources__getGroupItemHtml(props.groups[i]); } html += '</div>'; } } html += '</div>'; if (style && (!style.typeId || style.typeId === 'custom') && style.textBottom) { html += '<div class="tlk-resources__text-bottom">' + style.textBottom + '</div>'; } html += '</div>';