Update pages.html
Browse files- pages.html +124 -42
pages.html
CHANGED
|
@@ -463,51 +463,104 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
|
|
| 463 |
</script>
|
| 464 |
|
| 465 |
<script>
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
<div class="
|
| 484 |
-
<
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
<
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
</div>
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 509 |
});
|
| 510 |
|
|
|
|
|
|
|
|
|
|
| 511 |
// Добавляем возможность настройки каждого элемента формы
|
| 512 |
editor.DomComponents.addType('form-input', {
|
| 513 |
model: {
|
|
@@ -719,11 +772,40 @@ editor.DomComponents.addType('privacy-policy-link', {
|
|
| 719 |
|
| 720 |
|
| 721 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 727 |
|
| 728 |
|
| 729 |
|
|
|
|
| 463 |
</script>
|
| 464 |
|
| 465 |
<script>
|
| 466 |
+
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
|
| 471 |
+
|
| 472 |
+
|
| 473 |
+
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
|
| 477 |
+
// Создаем новый тип компонента для формы
|
| 478 |
+
editor.Components.addType('custom-form', {
|
| 479 |
+
model: {
|
| 480 |
+
defaults: {
|
| 481 |
+
// HTML-код формы
|
| 482 |
+
content: `
|
| 483 |
+
<div class="container">
|
| 484 |
+
<form id="contactForm">
|
| 485 |
+
<h4>КЛУБ-ПРАКТИК. 255 техник для психолога - 2024</h4>
|
| 486 |
+
<div class="form-group">
|
| 487 |
+
<label for="name">Имя</label>
|
| 488 |
+
<input type="text" id="name" required>
|
| 489 |
+
</div>
|
| 490 |
+
<div class="form-group">
|
| 491 |
+
<label for="email">Почта</label>
|
| 492 |
+
<input type="email" id="email" required>
|
| 493 |
+
</div>
|
| 494 |
+
<div class="form-group">
|
| 495 |
+
<label for="phone">Телефон</label>
|
| 496 |
+
<input type="tel" id="phone" required>
|
| 497 |
+
</div>
|
| 498 |
+
<div class="form-group">
|
| 499 |
+
<label for="options">Выберите тариф</label>
|
| 500 |
+
<select id="options" required>
|
| 501 |
+
<option value="" disabled selected>Тариф</option>
|
| 502 |
+
<option>БИЗНЕС - 69 970р.</option>
|
| 503 |
+
<option>PREMIUM - 89 970р.</option>
|
| 504 |
+
<option>VIP - 149 990р.</option>
|
| 505 |
+
</select>
|
| 506 |
+
</div>
|
| 507 |
+
<div class="form-check">
|
| 508 |
+
<input type="checkbox" id="newsletter" required>
|
| 509 |
+
<label for="newsletter">Согласие на email рассылку</label>
|
| 510 |
+
</div>
|
| 511 |
+
<div class="form-group">
|
| 512 |
+
<a href="#" id="privacyPolicyLink">Политика конфиденциальности</a>
|
| 513 |
+
</div>
|
| 514 |
+
<button type="submit" class="btn-primary">ПЕРЕЙТИ К ОПЛАТЕ</button>
|
| 515 |
+
</form>
|
| 516 |
</div>
|
| 517 |
+
`,
|
| 518 |
+
// Скрипт для обработки отправки формы
|
| 519 |
+
script: function(props) {
|
| 520 |
+
const form = this.querySelector('#contactForm');
|
| 521 |
+
const avpInput = form.querySelector('input[name="avp_v"]');
|
| 522 |
+
const grupInput = form.querySelector('input[name="grup_v"]');
|
| 523 |
+
const red_urlInput = form.querySelector('input[name="red_url_v"]');
|
| 524 |
+
if (avpInput) {
|
| 525 |
+
avpInput.value = props.avp;
|
| 526 |
+
}
|
| 527 |
+
if (grupInput) {
|
| 528 |
+
grupInput.value = props.grup;
|
| 529 |
+
}
|
| 530 |
+
if (red_urlInput) {
|
| 531 |
+
grupInput.value = props.red_url;
|
| 532 |
+
}
|
| 533 |
+
},
|
| 534 |
+
// Свойства, которые будут передаваться в скрипт
|
| 535 |
+
'script-props': ['avp', 'grup', 'red_url'],
|
| 536 |
+
// Настройки для изменения URL отправки
|
| 537 |
+
traits: [
|
| 538 |
+
{
|
| 539 |
+
type: 'text',
|
| 540 |
+
name: 'avp',
|
| 541 |
+
label: 'AVP',
|
| 542 |
+
changeProp: true
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
type: 'text',
|
| 546 |
+
name: 'grup',
|
| 547 |
+
label: 'GRUP',
|
| 548 |
+
changeProp: true
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
type: 'text',
|
| 552 |
+
name: 'red_url',
|
| 553 |
+
label: 'RED_URL',
|
| 554 |
+
changeProp: true
|
| 555 |
+
}
|
| 556 |
+
]
|
| 557 |
+
}
|
| 558 |
+
}
|
| 559 |
});
|
| 560 |
|
| 561 |
+
|
| 562 |
+
|
| 563 |
+
|
| 564 |
// Добавляем возможность настройки каждого элемента формы
|
| 565 |
editor.DomComponents.addType('form-input', {
|
| 566 |
model: {
|
|
|
|
| 772 |
|
| 773 |
|
| 774 |
|
| 775 |
+
|
| 776 |
+
|
| 777 |
+
|
| 778 |
+
|
| 779 |
+
|
| 780 |
|
| 781 |
|
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
+
|
| 786 |
+
// Создаем блок для компонента формы
|
| 787 |
+
editor.Blocks.add('custom-form-block', {
|
| 788 |
+
label: 'Custom Form',
|
| 789 |
+
content: { type: 'custom-form' },
|
| 790 |
+
});
|
| 791 |
+
|
| 792 |
+
|
| 793 |
+
|
| 794 |
+
|
| 795 |
+
|
| 796 |
+
|
| 797 |
+
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
|
| 801 |
+
|
| 802 |
+
|
| 803 |
+
|
| 804 |
+
|
| 805 |
+
|
| 806 |
+
|
| 807 |
+
|
| 808 |
+
|
| 809 |
|
| 810 |
|
| 811 |
|