wagtail-enap-designsystem 1.2.1.132__py3-none-any.whl → 1.2.1.133__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wagtail-enap-designsystem might be problematic. Click here for more details.

@@ -25,4 +25,17 @@ TEMPLATES = [
25
25
  ],
26
26
  },
27
27
  },
28
- ]
28
+ ]
29
+
30
+
31
+
32
+ # AUMENTAR LIMITES DE UPLOAD E CAMPOS
33
+ DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000 # Padrão é 1000
34
+ DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800 # 50MB (padrão é 2.5MB)
35
+ FILE_UPLOAD_MAX_MEMORY_SIZE = 52428800 # 50MB
36
+
37
+ # OUTRAS CONFIGURAÇÕES ÚTEIS PARA FORMULÁRIOS GRANDES
38
+ DATA_UPLOAD_MAX_NUMBER_FILES = 100 # Limite de arquivos por upload
39
+
40
+ # CONFIGURAÇÕES DE SEGURANÇA (se necessário)
41
+ SECURE_CROSS_ORIGIN_OPENER_POLICY = None # Para evitar problemas com CORS
@@ -423,16 +423,104 @@
423
423
  </div>
424
424
  {% elif option_block.value.action == 'end_form' %}
425
425
  <div class="end-form-message"
426
- data-parent-field="{{ block.block_type }}_{{ block.id }}"
427
- data-trigger-value="{{ option_block.value.value }}"
428
- style="display: none; margin-top: 1rem; padding: 1rem; border: 1px solid #f5c6cb; border-radius: 8px; background: #f8d7da; color: #721c24;">
429
- <p>⛔ Para dar continuidade, é necessário aceitar os termos</p>
430
- <button type="submit" class="btn btn-primary">Enviar agora</button>
426
+ data-parent-field="{{ block.block_type }}_{{ block.id }}"
427
+ data-trigger-value="{{ option_block.value.value }}"
428
+ data-auto-submit="true"
429
+ style="display: none; margin-top: 1rem; padding: 1rem; border: 1px solid #f5c6cb; border-radius: 8px; background: #f8d7da; color: #721c24;">
430
+ <p>A ENAP AGRADECE SUA PARTICIPAÇÃO NESSA CHAMADA PÚBLICA SIMPLIFICADA...</p>
431
+ <div class="loading-spinner" style="text-align: center; margin-top: 1rem;">
432
+ <div style="display: inline-block; width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #721c24; border-radius: 50%; animation: spin 1s linear infinite;"></div>
433
+ </div>
431
434
  </div>
432
435
  {% endif %}
433
436
  {% endfor %}
434
437
  </div>
435
438
 
439
+
440
+ <script>
441
+ // JavaScript para campos condicionais com auto-submit
442
+ document.addEventListener('DOMContentLoaded', function() {
443
+ // Função para lidar com campos condicionais
444
+ function handleConditionalFields() {
445
+ const conditionalBlocks = document.querySelectorAll('[data-parent-field]');
446
+
447
+ conditionalBlocks.forEach(block => {
448
+ const parentFieldName = block.dataset.parentField;
449
+ const triggerValue = block.dataset.triggerValue;
450
+ const parentInputs = document.querySelectorAll(`[name="${parentFieldName}"]`);
451
+
452
+ if (parentInputs.length === 0) return;
453
+
454
+ function checkAndToggle() {
455
+ let shouldShow = false;
456
+
457
+ parentInputs.forEach(input => {
458
+ if (input.type === 'radio') {
459
+ if (input.checked && input.value === triggerValue) {
460
+ shouldShow = true;
461
+ }
462
+ } else if (input.type === 'select-one') {
463
+ if (input.value === triggerValue) {
464
+ shouldShow = true;
465
+ }
466
+ }
467
+ });
468
+
469
+ if (shouldShow) {
470
+ block.style.display = 'block';
471
+
472
+ // Se tem auto-submit, finalizar formulário automaticamente
473
+ if (block.dataset.autoSubmit === 'true') {
474
+ setTimeout(() => {
475
+ // Submeter o formulário
476
+ const form = document.getElementById('wagtailForm');
477
+ if (form) {
478
+ // Adicionar um campo hidden para indicar finalização automática
479
+ const autoEndInput = document.createElement('input');
480
+ autoEndInput.type = 'hidden';
481
+ autoEndInput.name = 'auto_end_form';
482
+ autoEndInput.value = 'true';
483
+ form.appendChild(autoEndInput);
484
+
485
+ // Submeter
486
+ form.submit();
487
+ }
488
+ }, 2000); // Aguarda 2 segundos para mostrar a mensagem
489
+ }
490
+ } else {
491
+ block.style.display = 'none';
492
+ }
493
+ }
494
+
495
+ // Adicionar listeners
496
+ parentInputs.forEach(input => {
497
+ if (input.type === 'radio') {
498
+ input.addEventListener('change', checkAndToggle);
499
+ } else if (input.type === 'select-one') {
500
+ input.addEventListener('change', checkAndToggle);
501
+ }
502
+ });
503
+
504
+ // Verificar estado inicial
505
+ checkAndToggle();
506
+ });
507
+ }
508
+
509
+ // Inicializar
510
+ handleConditionalFields();
511
+ });
512
+
513
+ // CSS para animação de loading
514
+ const style = document.createElement('style');
515
+ style.textContent = `
516
+ @keyframes spin {
517
+ 0% { transform: rotate(0deg); }
518
+ 100% { transform: rotate(360deg); }
519
+ }
520
+ `;
521
+ document.head.appendChild(style);
522
+ </script>
523
+
436
524
  {% elif block.block_type == 'country_field' %}
437
525
  <div class="form-group">
438
526
  <label for="{{ block.block_type }}_{{ block.id }}">
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-enap-designsystem
3
- Version: 1.2.1.132
3
+ Version: 1.2.1.133
4
4
  Summary: Módulo de componentes utilizado nos portais ENAP, desenvolvido com Wagtail + CodeRedCMS
5
5
  Author: Renan Campos
6
6
  Author-email: renan.oliveira@enap.gov.br
@@ -2,7 +2,7 @@ enap_designsystem/__init__.py,sha256=_SM5n--8zkHIEZfCoc7wEfm6hQT8cuATZSRlLdrD7Rg
2
2
  enap_designsystem/apps.py,sha256=psX3YlGfqmPsaZZzRL4cpDTGvjwfNJT_0Vvizc_LIEg,226
3
3
  enap_designsystem/context_processors.py,sha256=ooXzfb2EnzczH4H2M-uz__97u8yKHc3LOJUu0LfxREE,1475
4
4
  enap_designsystem/models.py,sha256=IOhgM2VbBGcqtoZA4o60pLwmcyIDDhcvPAEjn9bYYnA,142543
5
- enap_designsystem/settings.py,sha256=20xoXRejrsE5naqu0timPfCTPsiKlBcQgAKbqLKz4q4,953
5
+ enap_designsystem/settings.py,sha256=s8wrTm1fbkJBdqkINv1DexlgDxsDYP5UisG9IFVd5lg,1416
6
6
  enap_designsystem/signals.py,sha256=oaHpZms4Dkc97ql-55Q0QxU7-45jwg2Y1XoRDOJ45tc,1978
7
7
  enap_designsystem/urls.py,sha256=EJ52w-55BysQU5pTZR4ltMtZM7aSKyjZdnQDGFipDXY,2219
8
8
  enap_designsystem/views.py,sha256=Au46gj48cauBIH8zZeYPPycVzoz6GH022zDJp-CFy_c,78332
@@ -11,7 +11,7 @@ enap_designsystem/blocks/__init__.py,sha256=6JW1ybuSfTucg-xZnomIcuVJIIo_1wGWgsaB
11
11
  enap_designsystem/blocks/base_blocks.py,sha256=ZuqVWn4PEAvD3pKM1ST7wjo4lwv98ooen_rs15rRJbg,10866
12
12
  enap_designsystem/blocks/chatbot_blocks.py,sha256=YeCznrXMbFa9MP9vjdTYl53ZhKsywkGOXvFK2bwcqW0,1133
13
13
  enap_designsystem/blocks/content_blocks.py,sha256=4oWDtY0zmvC6k7v_WduCTAyGapJuQTsfJ9ij_vJZXxY,16549
14
- enap_designsystem/blocks/form.py,sha256=8ilckMSE1qxbqted4ukHAw0y5vWQgsCP1gIkwOql1GQ,79078
14
+ enap_designsystem/blocks/form.py,sha256=POm1xiGfQ1Owo9Bj9IDL3Vn7cNGzHt_F96ehHrlxEh4,79102
15
15
  enap_designsystem/blocks/html_blocks.py,sha256=yFx6QkivBuGadBPPKFDWRZegDY_xHs38mK8_jNxEi3s,244509
16
16
  enap_designsystem/blocks/layout_blocks.py,sha256=WyVt3nwYxA4Eqr6-MqQY7W-xtjh07ZhstM8aiQaHmLw,23388
17
17
  enap_designsystem/blocks/semana_blocks.py,sha256=tJ8bFvW6lTSnLp2Wf1CARNSM4UoGl95lvYmxik5g0GA,70251
@@ -446,6 +446,7 @@ enap_designsystem/migrations/0407_alter_formulariopage_form_steps.py,sha256=Q4Im
446
446
  enap_designsystem/migrations/0408_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py,sha256=GzutOLxStj6CeS6h1j525-OytmuTLvRV_Y4yjATPgjQ,2420951
447
447
  enap_designsystem/migrations/0409_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py,sha256=kdD6gvDpWGClTnoIJAb2ELF0ktsL1EZf2OJMgxYTlhA,2425164
448
448
  enap_designsystem/migrations/0410_alter_formulariopage_form_steps.py,sha256=VphZlDbOYAIaw9dLRi1_9mVhdLz2v7x-dZA2SvCNUhA,53854
449
+ enap_designsystem/migrations/0411_alter_formulariopage_form_steps.py,sha256=Z00KTXqEJEAxG12vK7zo4h7iXYsW8YpmF_-rTzCY2n8,53880
449
450
  enap_designsystem/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
450
451
  enap_designsystem/search_backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
451
452
  enap_designsystem/search_backends/custom_elasticsearch.py,sha256=LeQT0_dJmNMTY7l3jOJ_7mJ9-2X0oXVqvxRiXEA0qGY,988
@@ -766,7 +767,7 @@ enap_designsystem/templates/enap_designsystem/form_templates/welcome_page.html,s
766
767
  enap_designsystem/templates/enap_designsystem/includes/chatbot_global.html,sha256=CO7wXrGx1l_icY8vb9OdrILCUXEFBomJPPxQz_e9hq4,12308
767
768
  enap_designsystem/templates/enap_designsystem/includes/cookie_banner.html,sha256=vyrvj1W_haSA4oKmQiyjFpjoTFqjPSZfz3u5nfr-P2g,10871
768
769
  enap_designsystem/templates/enap_designsystem/includes/footer.html,sha256=qsDmN413A_NNOhRFZz1Uxym1j5UPVhEDuRRDLTgRMPA,4063
769
- enap_designsystem/templates/enap_designsystem/includes/form_field.html,sha256=EVXvu_Z6tQ-4BNaQ2wH4mysu0SR2XqLZdTi6xAr9Lrc,68717
770
+ enap_designsystem/templates/enap_designsystem/includes/form_field.html,sha256=nB6PnTSbJZGQcIqRQIJgoa800rPhepCCOx2_RyGKcRI,72983
770
771
  enap_designsystem/templates/enap_designsystem/pages/404.html,sha256=yibkQlRTOZdyOVsDcNdqXjzmQwVq3QH5ztf0gNtbt58,2885
771
772
  enap_designsystem/templates/enap_designsystem/pages/area_aluno.html,sha256=lpHBVsnuZ0kARnH10xfFBPldABAvLGNMnVuvPACP3FU,15783
772
773
  enap_designsystem/templates/enap_designsystem/pages/article_index_page.html,sha256=6VjJ3_EroEPCidFCW5gBDzvbi81UcFX9lGpbc4j6r9U,11482
@@ -852,8 +853,8 @@ enap_designsystem/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
852
853
  enap_designsystem/utils/decorators.py,sha256=aq6SbLn0LcH2rfE3ZFit8jkD7pSx9fLVBUUwVB747hg,335
853
854
  enap_designsystem/utils/services.py,sha256=6dG5jLSbwH49jpZV9ZNpWlaZqI49gTlwlr1vaerxdiU,5824
854
855
  enap_designsystem/utils/sso.py,sha256=vjAuoYgoLeQAa_dkkyQ6-LmHvKMaVCxizNFpe5y3iUA,1145
855
- wagtail_enap_designsystem-1.2.1.132.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
856
- wagtail_enap_designsystem-1.2.1.132.dist-info/METADATA,sha256=w11WnILANp_7vZLQbDAwGa5x84Lwz5_qugU5-OcmOgA,3651
857
- wagtail_enap_designsystem-1.2.1.132.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
858
- wagtail_enap_designsystem-1.2.1.132.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
859
- wagtail_enap_designsystem-1.2.1.132.dist-info/RECORD,,
856
+ wagtail_enap_designsystem-1.2.1.133.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
857
+ wagtail_enap_designsystem-1.2.1.133.dist-info/METADATA,sha256=inBcZ6X6tTXy1xEjl9Hc3gWGNRUUL6auj0PJX7Z8RvY,3651
858
+ wagtail_enap_designsystem-1.2.1.133.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
859
+ wagtail_enap_designsystem-1.2.1.133.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
860
+ wagtail_enap_designsystem-1.2.1.133.dist-info/RECORD,,