diff --git a/src/components/Config_Document.js b/src/components/Config_Document.js
index 7f79986..88cd2c9 100644
--- a/src/components/Config_Document.js
+++ b/src/components/Config_Document.js
@@ -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) => {
+
+ Version par defaut
+
+ {
+ p_detail_default_version(e.target.checked);
+ setpartner_document_data_changed("1");
+ }}
+
+ />
+
+
+
@@ -2812,45 +2893,73 @@ const Config_Documents = (props) => {
className="detail_class_submenu" id='droit_acces' name='droit_acces'>Corps du mail
}
-
+
{p_detail_joint_pdf === true && String(document_principal_ou_corp_mail) === "2" &&
- Coprs du mail
+
+
Modifier le Coprs du mail
+
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; }'
+ }}
+ />
+
}
+ {String(document_principal_ou_corp_mail) !== "2" &&
+
+
Modifier le contenu du document
+
one_editorRef_programme.current = editor}
+ initialValue={one_field_programme}
+ onKeyUp={editor_keyup}
+ onEditorChange={(newValue, editor) => {
- {String(document_principal_ou_corp_mail) !== "2" &&
-
Modifier le contenu du document
-
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; }'
- }}
- />
-
- }
+ }