DmitrMakeev commited on
Commit
ce55231
·
verified ·
1 Parent(s): ccfd067

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +42 -86
pages.html CHANGED
@@ -463,93 +463,49 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
463
  </script>
464
 
465
  <script>
466
- // Создаем новый тип компонента для формы
467
- editor.Components.addType('custom-form', {
468
- model: {
469
- defaults: {
470
- // HTML-код формы
471
- content: `
472
- <div class="container">
473
- <form id="contactForm">
474
- <h4>КЛУБ-ПРАКТИК. 255 техник для психолога - 2024</h4>
475
- <div class="form-group name-field">
476
- <label for="name">Имя</label>
477
- <input type="text" id="name" required>
478
- </div>
479
- <div class="form-group email-field">
480
- <label for="email">Почта</label>
481
- <input type="email" id="email" required>
482
- </div>
483
- <div class="form-group phone-field">
484
- <label for="phone">Телефон</label>
485
- <input type="tel" id="phone" required>
486
- </div>
487
- <div class="form-group options-field">
488
- <label for="options">Выберите тариф</label>
489
- <select id="options" required>
490
- <option value="" disabled selected>Тариф</option>
491
- <option>БИЗНЕС - 69 970р.</option>
492
- <option>PREMIUM - 89 970р.</option>
493
- <option>VIP - 149 990р.</option>
494
- </select>
495
- </div>
496
- <div class="form-check newsletter-field">
497
- <input type="checkbox" id="newsletter" required>
498
- <label for="newsletter">Согласие на email рассылку</label>
499
- </div>
500
- <div class="form-group privacy-policy-link">
501
- <a href="#" id="privacyPolicyLink">Политика конфиденциальности</a>
502
- </div>
503
- <button type="submit" class="btn-primary submit-button">ПЕРЕЙТИ К ОПЛАТЕ</button>
504
- </form>
505
- </div>
506
- `,
507
- // Скрипт для обработки отправки формы
508
- script: function(props) {
509
- const form = this.querySelector('#contactForm');
510
- const avpInput = form.querySelector('input[name="avp_v"]');
511
- const grupInput = form.querySelector('input[name="grup_v"]');
512
- const red_urlInput = form.querySelector('input[name="red_url_v"]');
513
- if (avpInput) {
514
- avpInput.value = props.avp;
515
- }
516
- if (grupInput) {
517
- grupInput.value = props.grup;
518
- }
519
- if (red_urlInput) {
520
- red_urlInput.value = props.red_url;
521
- }
522
- },
523
- // Свойства, которые будут передаваться в скрипт
524
- 'script-props': ['avp', 'grup', 'red_url'],
525
- // Настройки для изменения URL отправки
526
- traits: [
527
- {
528
- type: 'text',
529
- name: 'avp',
530
- label: 'AVP',
531
- changeProp: true
532
- },
533
- {
534
- type: 'text',
535
- name: 'grup',
536
- label: 'GRUP',
537
- changeProp: true
538
- },
539
- {
540
- type: 'text',
541
- name: 'red_url',
542
- label: 'RED_URL',
543
- changeProp: true
544
- }
545
- ]
546
- }
547
- }
548
- });
549
- // Создаем блок для компонента формы
550
- editor.Blocks.add('custom-form-block', {
551
  label: 'Custom Form',
552
- content: { type: 'custom-form' },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  });
554
 
555
  // Добавляем возможность настройки каждого элемента формы
 
463
  </script>
464
 
465
  <script>
466
+ // Создаем блок формы
467
+ editor.Blocks.add('custom-form', {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  label: 'Custom Form',
469
+ content: `
470
+ <div class="form-container container">
471
+ <form id="contactForm">
472
+ <div class="form-group title-field">
473
+ <h4>КЛУБ-ПРАКТИК. 255 техник для психолога - 2024</h4>
474
+ </div>
475
+ <div class="form-group name-field">
476
+ <label for="name">Имя</label>
477
+ <input type="text" id="name" required>
478
+ </div>
479
+ <div class="form-group email-field">
480
+ <label for="email">Почта</label>
481
+ <input type="email" id="email" required>
482
+ </div>
483
+ <div class="form-group phone-field">
484
+ <label for="phone">Телефон</label>
485
+ <input type="tel" id="phone" required>
486
+ </div>
487
+ <div class="form-group options-field">
488
+ <label for="options">Выберите тариф</label>
489
+ <select id="options" required>
490
+ <option value="" disabled selected>Тариф</option>
491
+ <option>БИЗНЕС - 69 970р.</option>
492
+ <option>PREMIUM - 89 970р.</option>
493
+ <option>VIP - 149 990р.</option>
494
+ </select>
495
+ </div>
496
+ <div class="form-check newsletter-field">
497
+ <input type="checkbox" id="newsletter" required>
498
+ <label for="newsletter">Согласие на email рассылку</label>
499
+ </div>
500
+ <div class="form-group privacy-policy-link">
501
+ <a href="#" id="privacyPolicyLink">Политика конфиденциальности</a>
502
+ </div>
503
+ <div class="form-group submit-button">
504
+ <button type="submit" class="btn-primary">ПЕРЕЙТИ К ОПЛАТЕ</button>
505
+ </div>
506
+ </form>
507
+ </div>
508
+ `,
509
  });
510
 
511
  // Добавляем возможность настройки каждого элемента формы