You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(reregistration): per-audience editable Termo de Ciência (form + ficha PDF) (#396)
The acknowledgment notice was hardcoded in both the reregistration form
renderer and the ficha PDF template. It is now a display-only `acknowledgment`
standard field whose HTML lives in field_options['html'], edited per-audience
via wp_editor in the Custom Fields editor and propagated to descendants by the
existing "Replicate lists to children" action.
- New `acknowledgment` field type (display-only): skipped during value
collection, validation and persistence.
- Seeded per-audience with the shipped default notice
(ReregistrationFieldOptions::get_default_termo_ciencia_html), which is also
the render-time fallback for audiences predating the field.
- Form renders the per-audience HTML block; ficha injects {{termo_ciencia}}
via a dedicated replace so the notice's links survive (the per-variable
allowlist omits <a>).
- Admin: always-visible wp_editor in the acknowledgment row; builder JS
collects the HTML and toggles the editor by type.
https://claude.ai/code/session_01BEUEoUQmxb5d7akkVmaSVY
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ The format follows [Keep a Changelog] (https://keepachangelog.com/en/1.1.0/).
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
12
+
-**The "Termo de Ciência" (acknowledgment notice) is now editable per-audience.** It was hardcoded in two places — the reregistration form and the ficha PDF template — so changing the wording meant a code edit. It is now a display-only `acknowledgment` standard field stored in `wp_ffc_custom_fields.field_options['html']`, edited with the WordPress visual editor (`wp_editor`) inside the audience's Reregistration Fields section. Both the form's acknowledgment fieldset and the ficha PDF's section 6 render from this field (single source of truth), and "Replicate lists to children" propagates it to descendant audiences like any other standard field's options. Audiences that predate the field fall back to the shipped default notice (`ReregistrationFieldOptions::get_default_termo_ciencia_html()`), so existing forms are unchanged until edited. The block carries no user input — it's skipped during value collection, validation and persistence.
13
+
10
14
### Fixed
11
15
12
16
-**Ficha PDF: Divisão and Setor cells printed the literal placeholder instead of the values.**`default_ficha_template.html` referenced `{{divisao}}` / `{{setor}}`, but `FichaGenerator` only ever emits the combined `divisao_setor` value (`"<parent> - <child>"`), so neither placeholder was substituted. The generator now also exposes each `dependent_select` field's two halves as `{{<key>_parent}}` / `{{<key>_child}}` (the combined `{{<key>}}` form stays for back-compat), and the template's Divisão/Setor cells point at `{{divisao_setor_parent}}` / `{{divisao_setor_child}}`. The standard-field variable building moved into the unit-tested `FichaGenerator::build_standard_field_variables()`.
<pstyle="margin: 0 0 4px">Eu, em exercício na Diretoria Regional de Educação de São Miguel – DRE-MP, declaro estar ciente das orientações para o ano corrente:</p>
152
-
<olstyle="margin: 0 0 0 14px;padding: 0">
153
-
<listyle="margin-bottom: 3px"><strong>Declaração de Família WEB:</strong> a Declaração de Família Web deverá ser feita dentro do mês de aniversário do servidor, por meio do site: https://www.declaracaofamilia.iprem.prefeitura.sp.gov.br/Login. Após, deverá ser impressa e entregue no Setor de Vida Funcional, para arquivo em prontuário;</li>
154
-
<listyle="margin-bottom: 3px"><strong>Recadastramento Auxílio Transporte:</strong> Permanecem as mesmas orientações para aqueles que fazem jus ao recebimento do auxílio, lembrando que o recadastramento deverá ser efetuado no mês do aniversário, e o servidor deverá providenciar o recadastramento do Auxílio Transporte ANTES de efetuar o recadastramento anual (prova de vida);</li>
155
-
<listyle="margin-bottom: 3px"><strong>Recadastramento Anual (Prova de Vida):</strong> Permanecem as mesmas orientações, lembrando que o RG com data de expedição acima de 10 anos não será aceito, e o servidor deverá providenciar novo documento antes de efetuar o recadastramento;</li>
156
-
<listyle="margin-bottom: 3px"><strong>Declaração de Bens (SISPATRI):</strong> Permanecem as mesmas orientações, lembrando que deverá ser feita após o encerramento do prazo da Receita Federal, do dia 1 ao 30 do mês de Junho, por meio do site: https://controladoriageralbens.prefeitura.sp.gov.br/PaginasPublicas/login.aspx;</li>
157
-
<listyle="margin-bottom: 3px"><strong>Antecipação de 13º Salário:</strong> A solicitação poderá ser preenchida e entregue à Unidade de RH a partir do 1º dia útil do exercício a que se refere a antecipação, independente do mês de aniversário do servidor.</li>
158
-
<listyle="margin-bottom: 3px"><strong>Entrega de Atestados Médicos/Odontológicos com pedido de Afastamento a partir de 1 (um) dia:</strong> Reiteramos que, qualquer pedido de afastamento para tratamento de saúde (pessoal ou de familiar) deverá ser informado imediatamente à chefia, mediante apresentação do atestado médico/odontológico. Em seguida, a documentação deverá ser entregue ao Setor de Vida Funcional EM MÃOS ou digitalizada para o e-mail: rhvidafuncionaldremp@sme.prefeitura.sp.gov.br. Importante: O setor de Vida Funcional e a Chefia não se responsabilizam pelos atestados deixados no livro de ponto ou na pasta destinada exclusivamente às Declarações de Horário, bem como os que forem entregues fora do prazo legal para agendamento de perícia, se for o caso.</li>
<p class="description"><?phpesc_html_e( 'Notice shown at the end of the reregistration form and printed on the ficha PDF. Use "Replicate lists to children" to push it to descendant audiences.', 'ffcertificate' ); ?></p>
0 commit comments