- added translation=no wrapper for all Editor components;

This commit is contained in:
Vitalii Kiiko
2025-03-27 11:33:52 +01:00
parent 645f03abb0
commit b8c0a869ee
9 changed files with 62 additions and 52 deletions

View File

@@ -145,7 +145,7 @@ const FormFieldRepeaterFaq = ({
const header = renderHeader(); const header = renderHeader();
const faqOptionTemplate = (option) => { const faqOptionTemplate = (option) => {
return DOMPurify.sanitize(option.title, {ALLOWED_TAGS: ['#text']}); return DOMPurify.sanitize(option.title, { ALLOWED_TAGS: ['#text'] });
} }
useEffect(() => { useEffect(() => {
@@ -236,33 +236,39 @@ const FormFieldRepeaterFaq = ({
onHide={hideEditDialog}> onHide={hideEditDialog}>
<div className="appForm__field"> <div className="appForm__field">
<label for="faqTitle">{__('Titolo FAQ', 'gepafin')}</label> <label for="faqTitle">{__('Titolo FAQ', 'gepafin')}</label>
<Editor <div translate="no">
id="faqTitle" <Editor
value={title} id="faqTitle"
headerTemplate={header} value={title}
onTextChange={(e) => onChangeEditItem(e.htmlValue, 'title')} headerTemplate={header}
style={{ height: 80 * 1 }} onTextChange={(e) => onChangeEditItem(e.htmlValue, 'title')}
/> style={{ height: 80 * 1 }}
/>
</div>
</div> </div>
<div className="appForm__field"> <div className="appForm__field">
<label for="faqValue">{__('Domanda', 'gepafin')}</label> <label for="faqValue">{__('Domanda', 'gepafin')}</label>
<Editor <div translate="no">
id="faqValue" <Editor
value={question} id="faqValue"
headerTemplate={header} value={question}
onTextChange={(e) => onChangeEditItem(e.htmlValue, 'value')} headerTemplate={header}
style={{ height: 80 * 1 }} onTextChange={(e) => onChangeEditItem(e.htmlValue, 'value')}
/> style={{ height: 80 * 1 }}
/>
</div>
</div> </div>
<div className="appForm__field"> <div className="appForm__field">
<label for="faqResponse">{__('Risposta', 'gepafin')}</label> <label for="faqResponse">{__('Risposta', 'gepafin')}</label>
<Editor <div translate="no">
id="faqResponse" <Editor
value={answer} id="faqResponse"
headerTemplate={header} value={answer}
onTextChange={(e) => onChangeEditItem(e.htmlValue, 'response')} headerTemplate={header}
style={{ height: 80 * 2 }} onTextChange={(e) => onChangeEditItem(e.htmlValue, 'response')}
/> style={{ height: 80 * 2 }}
/>
</div>
</div> </div>
<div className="appForm__field"> <div className="appForm__field">
<label>{__('Pubblicato?', 'gepafin')}</label> <label>{__('Pubblicato?', 'gepafin')}</label>

View File

@@ -89,12 +89,12 @@ const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
display="chip" display="chip"
placeholder={__('Scegli', 'gepafin')}/> placeholder={__('Scegli', 'gepafin')}/>
} else if (setting.name === 'text') { } else if (setting.name === 'text') {
return <Editor return <div translate="no"><Editor
value={setting.value} value={setting.value}
headerTemplate={header} headerTemplate={header}
onTextChange={(e) => changeFn(e.htmlValue, setting.name)} onTextChange={(e) => changeFn(e.htmlValue, setting.name)}
style={{ height: 80 * 4 }} style={{ height: 80 * 4 }}
/> /></div>
} else if (setting.name === 'step') { } else if (setting.name === 'step') {
return <InputText id={setting.name} return <InputText id={setting.name}
keyfilter="int" keyfilter="int"

View File

@@ -865,7 +865,7 @@ const DomandaEditInstructorManager = () => {
? <Button ? <Button
type="button" type="button"
disabled={APP_EVALUATION_FLOW_ID === '1' disabled={APP_EVALUATION_FLOW_ID === '1'
&& (!['EVALUATION', 'ADMISSIBLE', 'APPOINTMENT', 'TECHNICAL_EVALUATION'].includes(data.applicationStatus) && (!['EVALUATION', 'ADMISSIBLE', 'NDG', 'APPOINTMENT', 'TECHNICAL_EVALUATION'].includes(data.applicationStatus)
|| evaluationBlockedForUser(data))} || evaluationBlockedForUser(data))}
onClick={initiateRejecting} onClick={initiateRejecting}
label={__('Respingi domanda', 'gepafin')} label={__('Respingi domanda', 'gepafin')}
@@ -1110,7 +1110,7 @@ const DomandaEditInstructorManager = () => {
</div> </div>
<h3>{__('Note', 'gepafin')}</h3> <h3>{__('Note', 'gepafin')}</h3>
<div> <div translate="no">
<Editor <Editor
value={data.note} value={data.note}
readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)} readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)}
@@ -1272,14 +1272,16 @@ const DomandaEditInstructorManager = () => {
</div> : null} </div> : null}
<div className="appForm__field"> <div className="appForm__field">
<label>{__('Motivazione', 'gepafin')}</label> <label>{__('Motivazione', 'gepafin')}</label>
<Editor <div translate="no">
value={motivation} <Editor
readOnly={loading} value={motivation}
placeholder={__('Digita qui il messagio', 'gepafin')} readOnly={loading}
headerTemplate={header} placeholder={__('Digita qui il messagio', 'gepafin')}
onTextChange={(e) => setMotivation(e.htmlValue)} headerTemplate={header}
style={{ height: 80 * 3, width: '100%' }} onTextChange={(e) => setMotivation(e.htmlValue)}
/> style={{ height: 80 * 3, width: '100%' }}
/>
</div>
</div> </div>
</Dialog> </Dialog>

View File

@@ -1112,7 +1112,7 @@ const DomandaEditPreInstructor = () => {
</div> </div>
<h3>{__('Note', 'gepafin')}</h3> <h3>{__('Note', 'gepafin')}</h3>
<div> <div translate="no">
<Editor <Editor
value={data.note} value={data.note}
readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)} readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)}
@@ -1274,14 +1274,16 @@ const DomandaEditPreInstructor = () => {
</div> : null} </div> : null}
<div className="appForm__field"> <div className="appForm__field">
<label>{__('Motivazione', 'gepafin')}</label> <label>{__('Motivazione', 'gepafin')}</label>
<Editor <div translate="no">
value={motivation} <Editor
readOnly={loading} value={motivation}
placeholder={__('Digita qui il messagio', 'gepafin')} readOnly={loading}
headerTemplate={header} placeholder={__('Digita qui il messagio', 'gepafin')}
onTextChange={(e) => setMotivation(e.htmlValue)} headerTemplate={header}
style={{ height: 80 * 3, width: '100%' }} onTextChange={(e) => setMotivation(e.htmlValue)}
/> style={{ height: 80 * 3, width: '100%' }}
/>
</div>
</div> </div>
</Dialog> </Dialog>

View File

@@ -222,7 +222,7 @@ const SoccorsoAddInstructorManager = () => {
<div className="appPageSection columns"> <div className="appPageSection columns">
<div> <div>
<h3>{__('Pec/Email', 'gepafin')}</h3> <h3>{__('Pec/Email', 'gepafin')}</h3>
<div style={{marginBottom: '30px'}}> <div style={{ marginBottom: '30px' }} translate="no">
<Editor <Editor
value={formData.note} value={formData.note}
placeholder={__('Digita qui il messagio', 'gepafin')} placeholder={__('Digita qui il messagio', 'gepafin')}
@@ -236,7 +236,7 @@ const SoccorsoAddInstructorManager = () => {
</div> </div>
<h3>{__('Tempo per la Risposta (giorni)', 'gepafin')}</h3> <h3>{__('Tempo per la Risposta (giorni)', 'gepafin')}</h3>
<div style={{marginBottom: '30px'}}> <div style={{ marginBottom: '30px' }}>
<InputNumber <InputNumber
keyfilter="int" keyfilter="int"
value={formData.responseDays} value={formData.responseDays}
@@ -297,7 +297,7 @@ const SoccorsoAddInstructorManager = () => {
<div className="appPageSection__message warning"> <div className="appPageSection__message warning">
<i className="pi pi-exclamation-triangle"></i> <i className="pi pi-exclamation-triangle"></i>
<span className="summary">{__('Attenzione', 'gepafin')}</span> <span className="summary">{__('Attenzione', 'gepafin')}</span>
<span>{__("L'invio della richiesta di integrazione sospenderà il termine di valutazione della domanda.", 'gepafin')}</span> <span>{__('L\'invio della richiesta di integrazione sospenderà il termine di valutazione della domanda.', 'gepafin')}</span>
</div> </div>
<div className="appPageSection__hr"> <div className="appPageSection__hr">

View File

@@ -222,7 +222,7 @@ const SoccorsoAddPreInstructor = () => {
<div className="appPageSection columns"> <div className="appPageSection columns">
<div> <div>
<h3>{__('Pec/Email', 'gepafin')}</h3> <h3>{__('Pec/Email', 'gepafin')}</h3>
<div style={{marginBottom: '30px'}}> <div style={{marginBottom: '30px'}} translate="no">
<Editor <Editor
value={formData.note} value={formData.note}
placeholder={__('Digita qui il messagio', 'gepafin')} placeholder={__('Digita qui il messagio', 'gepafin')}

View File

@@ -377,7 +377,7 @@ const SoccorsoEditBeneficiario = () => {
<h2>{__('Documenti aggiuntivi', 'gepafin')}</h2> <h2>{__('Documenti aggiuntivi', 'gepafin')}</h2>
<div className="appPageSection"> <div className="appPageSection">
<h3>{__('Notes', 'gepafin')}</h3> <h3>{__('Notes', 'gepafin')}</h3>
<div style={{ marginBottom: '30px', width: '100%', position: 'relative' }}> <div style={{ marginBottom: '30px', width: '100%', position: 'relative' }} translate="no">
<BlockingOverlay shouldDisplay={data.status !== 'AWAITING'}/> <BlockingOverlay shouldDisplay={data.status !== 'AWAITING'}/>
<Editor <Editor
value={data.amendmentNotes} value={data.amendmentNotes}

View File

@@ -462,7 +462,7 @@ const SoccorsoEditInstructorManager = () => {
<h2>{__('Documenti aggiuntivi', 'gepafin')}</h2> <h2>{__('Documenti aggiuntivi', 'gepafin')}</h2>
<div className="appPageSection"> <div className="appPageSection">
<h3>{__('Notes', 'gepafin')}</h3> <h3>{__('Notes', 'gepafin')}</h3>
<div style={{ marginBottom: '30px', width: '100%', position: 'relative' }}> <div style={{ marginBottom: '30px', width: '100%', position: 'relative' }} translate="no">
<BlockingOverlay shouldDisplay={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}/> <BlockingOverlay shouldDisplay={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}/>
<Editor <Editor
value={data.amendmentNotes} value={data.amendmentNotes}
@@ -566,7 +566,7 @@ const SoccorsoEditInstructorManager = () => {
onHide={hideCloseAmendDialog}> onHide={hideCloseAmendDialog}>
<div className="appForm__field"> <div className="appForm__field">
<label>{__('Motivazioni', 'gepafin')}</label> <label>{__('Motivazioni', 'gepafin')}</label>
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }} translate="no">
<BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/> <BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/>
<Editor <Editor
value={internalNote} value={internalNote}

View File

@@ -462,7 +462,7 @@ const SoccorsoEditPreInstructor = () => {
<h2>{__('Documenti aggiuntivi', 'gepafin')}</h2> <h2>{__('Documenti aggiuntivi', 'gepafin')}</h2>
<div className="appPageSection"> <div className="appPageSection">
<h3>{__('Notes', 'gepafin')}</h3> <h3>{__('Notes', 'gepafin')}</h3>
<div style={{ marginBottom: '30px', width: '100%', position: 'relative' }}> <div style={{ marginBottom: '30px', width: '100%', position: 'relative' }} translate="no">
<BlockingOverlay shouldDisplay={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}/> <BlockingOverlay shouldDisplay={['CLOSE', 'AWAITING', 'EXPIRED'].includes(data.status)}/>
<Editor <Editor
value={data.amendmentNotes} value={data.amendmentNotes}
@@ -566,7 +566,7 @@ const SoccorsoEditPreInstructor = () => {
onHide={hideCloseAmendDialog}> onHide={hideCloseAmendDialog}>
<div className="appForm__field"> <div className="appForm__field">
<label>{__('Motivazioni', 'gepafin')}</label> <label>{__('Motivazioni', 'gepafin')}</label>
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }} translate="no">
<BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/> <BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/>
<Editor <Editor
value={internalNote} value={internalNote}