14/12/2023 - 22h
parent
4eb16af0ec
commit
218367e94c
|
@ -50,6 +50,10 @@ const Config_Documents = (props) => {
|
|||
const [one_editor_tochange, setone_editor_tochange] = useState("");
|
||||
|
||||
|
||||
const one_editorRef_corp_mail = useRef(null);
|
||||
const [one_editorRef_corp_mail_limite, setone_editorRef_corp_mail_limite] = useState(1000);
|
||||
const [one_field_corp_mail, setone_field_corp_mail] = useState("");
|
||||
|
||||
|
||||
var date_today_90j = new Date();
|
||||
date_today_90j.setDate(date_today_90j.getDate() + 90);
|
||||
|
@ -350,6 +354,8 @@ const Config_Documents = (props) => {
|
|||
|
||||
const [p_detail_joint_pdf, setp_detail_joint_pdf] = useState(false);
|
||||
|
||||
const [p_detail_default_version, setp_detail_default_version] = useState(false);
|
||||
|
||||
|
||||
|
||||
const [p_one_detail_cible, setp_one_detail_cible] = useState("");
|
||||
|
@ -381,6 +387,11 @@ const Config_Documents = (props) => {
|
|||
setp_one_detail_duplicate("");
|
||||
setp_one_detail_type_doc("");
|
||||
setone_field_programme();
|
||||
setone_field_corp_mail();
|
||||
setp_detail_joint_pdf(false);
|
||||
setp_detail_default_version(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -435,6 +446,30 @@ const Config_Documents = (props) => {
|
|||
setp_detail_sujet(mylocal_document.sujet);
|
||||
}
|
||||
|
||||
|
||||
// ----
|
||||
setp_detail_joint_pdf(false);
|
||||
if (mylocal_document.joint_pdf) {
|
||||
if (String(mylocal_document.joint_pdf) === "1")
|
||||
setp_detail_joint_pdf(true);
|
||||
}
|
||||
|
||||
p_detail_default_version(false);
|
||||
if (mylocal_document.default_version) {
|
||||
if (String(mylocal_document.default_version) === "1")
|
||||
p_detail_default_version(true);
|
||||
}
|
||||
|
||||
setone_field_corp_mail("");
|
||||
if (mylocal_document.corps_mail) {
|
||||
setone_field_corp_mail(mylocal_document.corps_mail);
|
||||
}
|
||||
|
||||
|
||||
// ---
|
||||
|
||||
|
||||
|
||||
setfield_programme("");
|
||||
if (mylocal_document.contenu_doc) {
|
||||
setp_detail_contenu_doc(mylocal_document.contenu_doc);
|
||||
|
@ -928,6 +963,23 @@ const Config_Documents = (props) => {
|
|||
return;
|
||||
}
|
||||
|
||||
//-----
|
||||
|
||||
if (p_detail_default_version)
|
||||
form.append("default_version", "1");
|
||||
else {
|
||||
form.append("default_version", "0");
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_detail_joint_pdf)
|
||||
form.append("joint_pdf", "1");
|
||||
else {
|
||||
form.append("joint_pdf", "0");
|
||||
return;
|
||||
}
|
||||
// -------
|
||||
|
||||
|
||||
if (p_one_detail_nom)
|
||||
form.append("nom", p_one_detail_nom);
|
||||
|
@ -958,6 +1010,19 @@ const Config_Documents = (props) => {
|
|||
form.append("contenu_doc", "");
|
||||
}
|
||||
|
||||
if (one_editorRef_corp_mail) {
|
||||
var corps_mail = one_editorRef_corp_mail.current.getContent();
|
||||
corps_mail = corps_mail.replace('<', '<');
|
||||
corps_mail = corps_mail.replace('>', '>');
|
||||
corps_mail = corps_mail.replace('≤', '<=');
|
||||
corps_mail = corps_mail.replace('≥', '>=');
|
||||
form.append("corps_mail", corps_mail);
|
||||
}
|
||||
else {
|
||||
form.append("corps_mail", "");
|
||||
}
|
||||
|
||||
|
||||
//console.log(" Add_one_Partner_Document affectation form == ", form);
|
||||
|
||||
|
||||
|
@ -2752,6 +2817,22 @@ const Config_Documents = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row_gauche texte_area_filter" >
|
||||
Version par defaut <br />
|
||||
|
||||
<Checkbox
|
||||
name="document_join_pdf"
|
||||
// className="disabled_style"
|
||||
checked={p_detail_joint_pdf}
|
||||
onChange={(e) => {
|
||||
p_detail_default_version(e.target.checked);
|
||||
setpartner_document_data_changed("1");
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="div_row"> </div>
|
||||
<div className="div_row_droite texte_area_filter" style={{ "textAlign": "left" }}>
|
||||
|
@ -2812,45 +2893,73 @@ const Config_Documents = (props) => {
|
|||
className="detail_class_submenu" id='droit_acces' name='droit_acces'>Corps du mail </Button>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
{p_detail_joint_pdf === true && String(document_principal_ou_corp_mail) === "2" &&
|
||||
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||
Coprs du mail
|
||||
|
||||
<div className="titre_training_text"> Modifier le Coprs du mail </div>
|
||||
<Editor
|
||||
id="corps_contente"
|
||||
name="corps_contente"
|
||||
onInit={(evt, editor) => one_editorRef_corp_mail.current = editor}
|
||||
initialValue={one_field_corp_mail}
|
||||
onKeyUp={editor_keyup}
|
||||
onEditorChange={(newValue, editor) => {
|
||||
|
||||
}}
|
||||
init={{
|
||||
resize: false,
|
||||
height: 700,
|
||||
menubar: true,
|
||||
plugins: [
|
||||
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace',
|
||||
'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount',
|
||||
'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks',
|
||||
|
||||
],
|
||||
toolbar: 'undo redo | casechange blocks | bold italic backcolor | ' +
|
||||
'alignleft aligncenter alignright alignjustify | ' +
|
||||
'bullist numlist checklist outdent indent | removeformat | a11ycheck code table help',
|
||||
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(document_principal_ou_corp_mail) !== "2" &&
|
||||
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||
<div className="titre_training_text"> Modifier le contenu du document </div>
|
||||
<Editor
|
||||
id="document_contente"
|
||||
name="document_contente"
|
||||
onInit={(evt, editor) => one_editorRef_programme.current = editor}
|
||||
initialValue={one_field_programme}
|
||||
onKeyUp={editor_keyup}
|
||||
onEditorChange={(newValue, editor) => {
|
||||
|
||||
{String(document_principal_ou_corp_mail) !== "2" && <div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||
<div className="titre_training_text"> Modifier le contenu du document </div>
|
||||
<Editor
|
||||
id="document_contente"
|
||||
name="document_contente"
|
||||
onInit={(evt, editor) => one_editorRef_programme.current = editor}
|
||||
initialValue={one_field_programme}
|
||||
onKeyUp={editor_keyup}
|
||||
onEditorChange={(newValue, editor) => {
|
||||
}}
|
||||
init={{
|
||||
resize: false,
|
||||
height: 700,
|
||||
menubar: true,
|
||||
plugins: [
|
||||
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace',
|
||||
'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount',
|
||||
'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks',
|
||||
|
||||
}}
|
||||
init={{
|
||||
resize: false,
|
||||
height: 700,
|
||||
menubar: true,
|
||||
plugins: [
|
||||
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace',
|
||||
'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount',
|
||||
'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks',
|
||||
],
|
||||
toolbar: 'undo redo | casechange blocks | bold italic backcolor | ' +
|
||||
'alignleft aligncenter alignright alignjustify | ' +
|
||||
'bullist numlist checklist outdent indent | removeformat | a11ycheck code table help',
|
||||
|
||||
],
|
||||
toolbar: 'undo redo | casechange blocks | bold italic backcolor | ' +
|
||||
'alignleft aligncenter alignright alignjustify | ' +
|
||||
'bullist numlist checklist outdent indent | removeformat | a11ycheck code table help',
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
|
||||
}}
|
||||
/>
|
||||
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }'
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue