30/12/2024 - 18h
parent
c44699df1d
commit
b29c50b4d0
|
@ -184,8 +184,10 @@ const Article = (props) => {
|
||||||
|
|
||||||
if (mylocal_document.img_path) {
|
if (mylocal_document.img_path) {
|
||||||
setarticle_avis_img_path(mylocal_document.img_path);
|
setarticle_avis_img_path(mylocal_document.img_path);
|
||||||
|
setimg_img_article_file(mylocal_document.img_path);
|
||||||
} else {
|
} else {
|
||||||
setarticle_avis_img_path("");
|
setarticle_avis_img_path("");
|
||||||
|
setimg_img_article_file("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -376,7 +378,7 @@ const Article = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(" ## form = ", form);
|
// console.log(" ## form = ", form);
|
||||||
var myurl = "";
|
var myurl = "";
|
||||||
|
|
||||||
if (selected_id && String(selected_id).length > 3) {
|
if (selected_id && String(selected_id).length > 3) {
|
||||||
|
@ -794,11 +796,8 @@ const Article = (props) => {
|
||||||
name='img_url'
|
name='img_url'
|
||||||
id='img_url'
|
id='img_url'
|
||||||
value={article_avis_img_path}
|
value={article_avis_img_path}
|
||||||
onChange={(e) => {
|
|
||||||
setarticle_avis_img_path(e.target.value);
|
|
||||||
setis_data_changed("1");
|
|
||||||
}}
|
|
||||||
className='disabled_style_width_100_percent'
|
className='disabled_style_width_100_percent'
|
||||||
|
disabled
|
||||||
|
|
||||||
></input>
|
></input>
|
||||||
</div>
|
</div>
|
||||||
|
@ -809,34 +808,19 @@ const Article = (props) => {
|
||||||
|
|
||||||
<div className="div_row_dialog">
|
<div className="div_row_dialog">
|
||||||
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
||||||
<b> Image Url (a poster) </b>
|
<b> Image </b>
|
||||||
</div>
|
</div>
|
||||||
----------------
|
|
||||||
<div className="div_row_dialog" >
|
<div className="div_row_dialog" >
|
||||||
|
|
||||||
<div className="div_row"> Import du logo <br />
|
<div className="div_row">
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
|
||||||
"background": "#c8cfd5",
|
|
||||||
"minWidth": "15rem", "color": "black", "width": "auto"
|
|
||||||
}}
|
|
||||||
id='menu_import_formation' name='menu_import_formation'>Choisir une image <br />
|
|
||||||
|
|
||||||
</Button><br />
|
|
||||||
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
||||||
<Tooltip className="tooltip_css" id="tooltip_2" />
|
|
||||||
|
|
||||||
<a data-tooltip-id="tooltip_2" data-tooltip-html="Respecter ces critères vous aide à avoir un meilleur affichage">
|
|
||||||
<i> Important : Taille du logo : longueur entre 140px et 250px et largeur entre 60px et 150px, au format PNG <br />
|
|
||||||
Le nom du fichier ne contient que des caractères alphanumériques </i>
|
|
||||||
</a>
|
|
||||||
</nav>
|
</nav>
|
||||||
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
||||||
<input type="file"
|
<input type="file"
|
||||||
accept=".png"
|
accept=".png, .jpg"
|
||||||
ref={hiddenFileInput_logo}
|
ref={hiddenFileInput_logo}
|
||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
name="liste_formation_file"
|
name="liste_formation_file"
|
||||||
|
@ -844,7 +828,9 @@ const Article = (props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{img_img_article_file && <nav> Fichier à importer : {img_img_article_file.name} <br />
|
{img_img_article_file && <nav> Fichier à importer : {img_img_article_file.name} <br />
|
||||||
<img src={img_img_article_file} alt={""} />
|
<nav style={{ maxWidth: '20rem', margin: 'auto' }}>
|
||||||
|
<img src={img_img_article_file} style={{ "width": "100%" }} />
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
@ -855,38 +841,23 @@ const Article = (props) => {
|
||||||
|
|
||||||
{String(handleSubmission_img_article_api) === "false" && <div className="koUpdateData"> {handleSubmission_img_article_message}</div>}
|
{String(handleSubmission_img_article_api) === "false" && <div className="koUpdateData"> {handleSubmission_img_article_message}</div>}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<Tooltip className="tooltip_css" id="tooltip_taille_img" />
|
||||||
|
<a data-tooltip-id="tooltip_taille_img" data-tooltip-html=" <i> longueur entre 200px et 1000px et largeur entre 200px et 1000px, au format PNG ou JPG <br />
|
||||||
|
Le nom du fichier ne contient que des caractères alphanumériques, sans espaces </i>">
|
||||||
|
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
||||||
|
"background": "#c8cfd5",
|
||||||
|
"minWidth": "15rem", "color": "black", "width": "auto"
|
||||||
|
}}
|
||||||
|
id='menu_import_formation' name='menu_import_formation'>Choisir une image <FcInfo style={{fontSize:"14px"}}/> <br />
|
||||||
|
|
||||||
|
</Button>
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div className="div_row">
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
|
||||||
|
|
||||||
<div className="div_row_gauche " style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
|
||||||
<Button variant="contained" className="btn_modif" onClick={Annule_img_article_img}>Annuler
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
|
||||||
<Button variant="contained" className="btn_enreg" onClick={Send_img_article_Img}>Enregistrer
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>}
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
---------------
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -894,7 +865,7 @@ const Article = (props) => {
|
||||||
|
|
||||||
<div className="div_row_dialog">
|
<div className="div_row_dialog">
|
||||||
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
||||||
<b> Meta description u</b>
|
<b> Meta description </b>
|
||||||
<div className="div_row_dialog" >
|
<div className="div_row_dialog" >
|
||||||
|
|
||||||
<TextField
|
<TextField
|
||||||
|
|
|
@ -810,14 +810,6 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
form.append('img_file_name', "");
|
form.append('img_file_name', "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!article_avis_img_path || String(article_avis_img_path).trim() === "") {
|
|
||||||
alert(" Vous devez saisir une image à afficher avec l'article ");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
form.append("img_path", article_avis_img_path);
|
|
||||||
|
|
||||||
if (article_avis_date_publication.trim() === "") {
|
if (article_avis_date_publication.trim() === "") {
|
||||||
alert(" Vous devez saisir la date de naissance de l'apprenant");
|
alert(" Vous devez saisir la date de naissance de l'apprenant");
|
||||||
return;
|
return;
|
||||||
|
@ -854,7 +846,7 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
form.append("meta_description", state);
|
form.append("meta_description", state);
|
||||||
|
|
||||||
|
|
||||||
console.log(" ## form = ", form);
|
// console.log(" ## form = ", form);
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_articles_avis/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_articles_avis/";
|
||||||
|
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
|
@ -1246,11 +1238,8 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
type='text'
|
type='text'
|
||||||
name='img_url'
|
name='img_url'
|
||||||
id='img_url'
|
id='img_url'
|
||||||
value={article_avis_img_path}
|
disabled
|
||||||
onChange={(e) => {
|
|
||||||
setarticle_avis_img_path(e.target.value);
|
|
||||||
setis_data_changed("1");
|
|
||||||
}}
|
|
||||||
className='disabled_style_width_100_percent'
|
className='disabled_style_width_100_percent'
|
||||||
|
|
||||||
></input>
|
></input>
|
||||||
|
@ -1260,39 +1249,22 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_dialog">
|
<div className="div_row_dialog">
|
||||||
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
||||||
<b> Image Url (a poster) </b>
|
<b> Image </b>
|
||||||
</div>
|
</div>
|
||||||
----------------
|
|
||||||
<div className="div_row_dialog" >
|
<div className="div_row_dialog" >
|
||||||
|
|
||||||
<div className="div_row"> Import du logo <br />
|
<div className="div_row">
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
|
||||||
"background": "#c8cfd5",
|
|
||||||
"minWidth": "15rem", "color": "black", "width": "auto"
|
|
||||||
}}
|
|
||||||
id='menu_import_formation' name='menu_import_formation'>Choisir une image <br />
|
|
||||||
|
|
||||||
</Button><br />
|
|
||||||
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
||||||
<Tooltip className="tooltip_css" id="tooltip_2" />
|
|
||||||
|
|
||||||
<a data-tooltip-id="tooltip_2" data-tooltip-html="Respecter ces critères vous aide à avoir un meilleur affichage">
|
|
||||||
<i> Important : Taille du logo : longueur entre 140px et 250px et largeur entre 60px et 150px, au format PNG <br />
|
|
||||||
Le nom du fichier ne contient que des caractères alphanumériques </i>
|
|
||||||
</a>
|
|
||||||
</nav>
|
</nav>
|
||||||
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
||||||
<input type="file"
|
<input type="file"
|
||||||
accept=".png"
|
accept=".png, .jpg"
|
||||||
ref={hiddenFileInput_logo}
|
ref={hiddenFileInput_logo}
|
||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
name="liste_formation_file"
|
name="liste_formation_file"
|
||||||
|
@ -1300,7 +1272,9 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{img_img_article_file && <nav> Fichier à importer : {img_img_article_file.name} <br />
|
{img_img_article_file && <nav> Fichier à importer : {img_img_article_file.name} <br />
|
||||||
<img src={img_img_article_file} alt={""} />
|
<nav style={{ maxWidth: '20rem', margin: 'auto' }}>
|
||||||
|
<img src={img_img_article_file} style={{ "width": "100%" }} />
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
@ -1314,40 +1288,25 @@ const RechercheArticles_new_v2 = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
<Tooltip className="tooltip_css" id="tooltip_taille_img" />
|
||||||
|
<a data-tooltip-id="tooltip_taille_img" data-tooltip-html=" <i> longueur entre 200px et 1000px et largeur entre 200px et 1000px, au format PNG ou JPG <br />
|
||||||
|
Le nom du fichier ne contient que des caractères alphanumériques, sans espaces </i>">
|
||||||
|
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
||||||
|
"background": "#c8cfd5",
|
||||||
|
"minWidth": "15rem", "color": "black", "width": "auto"
|
||||||
|
}}
|
||||||
|
id='menu_import_formation' name='menu_import_formation'>Choisir une image <FcInfo style={{fontSize:"14px"}}/> <br />
|
||||||
|
|
||||||
<div className="div_row">
|
</Button>
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
</a>
|
||||||
|
<br />
|
||||||
</div>
|
|
||||||
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
|
||||||
|
|
||||||
<div className="div_row_gauche " style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
|
||||||
<Button variant="contained" className="btn_modif" onClick={Annule_img_article_img}>Annuler
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
|
||||||
<Button variant="contained" className="btn_enreg" onClick={Send_img_article_Img}>Enregistrer
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>}
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
---------------
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_dialog">
|
<div className="div_row_dialog">
|
||||||
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
||||||
<b> Meta description </b>
|
<b> Meta description </b>
|
||||||
|
|
Loading…
Reference in New Issue