Fixed request #51. Add textareas for community descriptions.
This commit is contained in:
parent
9e64153599
commit
c47fc5be61
@ -29,6 +29,7 @@ TxtNodeChoose = "(*) Choisissez l'espace"
|
||||
TxtDeplacer = "Déplacer dans"
|
||||
|
||||
TxtCommValidateCreate = "Valider la création de la communauté"
|
||||
TxtDetailsComm = "Descriptions de la communauté"
|
||||
TxtTemplateChoice = "Template par défaut"
|
||||
TxtTemplateChoiceNode = "Template de l'espace"
|
||||
TxtTemplateAvailNode = "Template(s) disponible(s) pour l'espace :"
|
||||
|
@ -221,6 +221,7 @@ etape2 = "Etape 2"
|
||||
etape3 = "Etape 3"
|
||||
etape4 = "Etape 4"
|
||||
etape5 = "Etape 5"
|
||||
etape6 = "Etape 6"
|
||||
TxtValid = "Valider"
|
||||
|
||||
TxtInscription = "Veuillez saisir les informations pour votre pré-inscription, l'administrateur de la communauté se chargera de finaliser l'inscription."
|
||||
|
@ -204,7 +204,7 @@
|
||||
<h3><mx:text id="etape4"/><mx:text id="double_dots"/><mx:text id="TxtTemplateChoiceNode"/></h3>
|
||||
</div>
|
||||
<div class="card-body center-block">
|
||||
<div class="row">
|
||||
<div class="row justify-content-center">
|
||||
<p class="input-group col-xs-12 col-sm-8 col-lg-4">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-user required"></span><mx:text id="TxtTemplateAvailNode"/></span><mx:select id="TEMPLATE_ADMIN" id="template" onchange="javascript:imgTemplate();"/>
|
||||
</p>
|
||||
@ -215,9 +215,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-100">
|
||||
<div class="card-header">
|
||||
<h3><mx:text id="etape5"/><mx:text id="double_dots"/><mx:text id="TxtDetailsComm"/></h3>
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<h3><mx:text id="lblTextComResume"/></h3>
|
||||
</div>
|
||||
<div class="card-body text-left">
|
||||
<textarea class="form p-0 m-0" id="contentResumeInfos" name="contentResumeInfos" rows="12"></textarea>
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<h3><mx:text id="lblTextComComplete"/></h3>
|
||||
</div>
|
||||
<div class="card-body text-left">
|
||||
<textarea class="form p-0 m-0" id="contentTextInfos" name="contentTextInfos" rows="12"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-100">
|
||||
<div class="card-header">
|
||||
<h3><mx:text id="etape5"/><mx:text id="double_dots"/><mx:text id="TxtCommValidateCreate"/></h3>
|
||||
<h3><mx:text id="etape6"/><mx:text id="double_dots"/><mx:text id="TxtCommValidateCreate"/></h3>
|
||||
</div>
|
||||
<div class="card-footer border-0 bg-white text-center">
|
||||
<input type="reset" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" name="BtnReset" onclick="this.form.reset();" title="<mx:text id="ResetChange"/>" value="<mx:text id="BtnReset"/>"/>
|
||||
|
@ -56,6 +56,7 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
|
||||
addMessageFile("main.ini");
|
||||
addMessageFile("object.ini");
|
||||
addMessageFile("adminnode.ini");
|
||||
addMessageFile("adminhome.ini");
|
||||
|
||||
/* gestion du lib en fonction de la langue courante */
|
||||
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
|
||||
@ -66,20 +67,27 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
|
||||
|
||||
$arrayCallCss = array();
|
||||
$arrayCallCss[] = "data/css/bootstrap-datepicker/1.9.0/bootstrap-datepicker3.min.css";
|
||||
$arrayCallCss[] = "data/javascript/summernote/0.8.18/summernote-bs4.min.css";
|
||||
mxCallCss($arrayCallCss);
|
||||
|
||||
$arrayCallJs = array();
|
||||
$arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/bootstrap-datepicker.min.js";
|
||||
$arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.".$currentCode.".min.js";
|
||||
$arrayCallJs[] = "data/javascript/summernote/0.8.18/summernote-bs4.min.js";
|
||||
$arrayCallJs[] = "data/javascript/summernote/plugins/file/201910/summernote-file.js";
|
||||
$arrayCallJs[] = "data/javascript/summernote/0.8.18/lang/summernote-fr-FR.min.js";
|
||||
mxCallJs($arrayCallJs);
|
||||
|
||||
$arrayRawJs[] = "\$('.datepicker').datepicker();";
|
||||
$arrayRawJs[] = "function imgPicto(){if(document.getElementById){if(document.getElementById(\"fmNodeAdd\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoObject\").src=\"data/image/icons/node/\"+document.getElementById(\"fmNodeAdd\").iconeN.options[(document.getElementById(\"fmNodeAdd\").iconeN.selectedIndex)].value;}}else if(document.all){if(document.all[\"fmNodeAdd\"]){document.all[\"pictoObject\"].src=\"data/image/icons/node/\"+document.all[\"fmNodeAdd\"].iconeN.options[(document.all[\"fmNodeAdd\"].iconeN.selectedIndex)].value;}}}function Valid_register(the_form,the_field){var objectform = document.forms[the_form];var nbr = objectform.length;var flag = 0;for(z=0 ; z < nbr; z++){if(objectform.elements[z].checked == true && objectform.elements[z].name == the_field){flag=1;}}if(flag == 0){alert('<mx:text id=\"selectbriques\"/>');return false;}objectform.submit();}function imgTemplate(){if(document.getElementById){if(document.getElementById(\"fmNodeAdd\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoTemplate\").src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}else if(document.all){if(document.all[\"fmNodeAdd\"]){var obj=document.all[\"template\"];document.all[\"pictoTemplate\"].src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}}imgTemplate();function setSelectOptions(the_form, the_select, do_check){var selectObject = document.forms[the_form].elements[the_select];var selectCount = selectObject.length;for (var i = 0; i < selectCount; i++){selectObject.options[i].selected = do_check;}return true;}function setCheckOptions(the_form, the_select){var selectObject = document.forms[the_form];var selectCount = selectObject.length;for (var i = 0; i < selectCount; i++) {if(selectObject.elements[i].name == the_select){if(selectObject.elements[i].checked == true){selectObject.elements[i].checked = false;}else{selectObject.elements[i].checked = true;}}}return true;}";
|
||||
$arrayRawJs[] = "function imgPicto(){if(document.getElementById){if(document.getElementById(\"fmNodeAdd\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoObject\").src=\"data/image/icons/node/\"+document.getElementById(\"fmNodeAdd\").iconeN.options[(document.getElementById(\"fmNodeAdd\").iconeN.selectedIndex)].value;}}else if(document.all){if(document.all[\"fmNodeAdd\"]){document.all[\"pictoObject\"].src=\"data/image/icons/node/\"+document.all[\"fmNodeAdd\"].iconeN.options[(document.all[\"fmNodeAdd\"].iconeN.selectedIndex)].value;}}}function Valid_register(the_form,the_field){var objectform = document.forms[the_form];var nbr = objectform.length;var flag = 0;for(z=0 ; z < nbr; z++){if(objectform.elements[z].checked == true && objectform.elements[z].name == the_field){flag=1;}}if(flag == 0){alert('<mx:text id=\"selectbriques\"/>');return false;}objectform.submit();}function imgTemplate(){if(document.getElementById){if(document.getElementById(\"fmNodeAdd\")){var obj=document.getElementById(\"template\");document.getElementById(\"pictoTemplate\").src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}else if(document.all){if(document.all[\"fmNodeAdd\"]){var obj=document.all[\"template\"];document.all[\"pictoTemplate\"].src=\"data/template/\"+obj.options[(obj.selectedIndex)].value+\"/preview.png\";}}}imgTemplate();function setSelectOptions(the_form, the_select, do_check){var selectObject = document.forms[the_form].elements[the_select];var selectCount = selectObject.length;for (var i = 0; i < selectCount; i++){selectObject.options[i].selected = do_check;}return true;}function setCheckOptions(the_form, the_select){var selectObject = document.forms[the_form];var selectCount = selectObject.length;for (var i = 0; i < selectCount; i++) {if(selectObject.elements[i].name == the_select){if(selectObject.elements[i].checked == true){selectObject.elements[i].checked = false;}else{selectObject.elements[i].checked = true;}}}return true;}\$(document).ready( function(){\$('#contentResumeInfos').summernote({lang: 'fr_FR',toolbar: [['style', ['style','fontsize']],['font', ['bold', 'underline', 'clear']],['fontname', ['fontname']],['color',['backcolor','color']],['para', ['style','ul', 'ol', 'paragraph']],['table', ['table']],['hr', ['hr']],/* File plugin not enabled */ /* ['insert', ['file','link', 'picture', 'video']], */ ['insert', ['link', 'picture', 'video']],['view', ['fullscreen', 'codeview']],['misc', ['undo', 'redo']],],height: 180,disableResizeEditor: true, /* disable resizing editor */ airMode: false,});});\$(document).ready( function(){\$('#contentTextInfos').summernote({lang: 'fr_FR',toolbar: [['style', ['style','fontsize']],['font', ['bold', 'underline', 'clear']],['fontname', ['fontname']],['color',['backcolor','color']],['para', ['style','ul', 'ol', 'paragraph']],['table', ['table']],['hr', ['hr']],/* File plugin not enabled */ /* ['insert', ['file','link', 'picture', 'video']], */ ['insert', ['link', 'picture', 'video']],['view', ['fullscreen', 'codeview']],['misc', ['undo', 'redo']],],height: 650,disableResizeEditor: true, /* disable resizing editor */ airMode: false,});});";
|
||||
mxRawJs($arrayRawJs);
|
||||
|
||||
|
||||
/* On inclus la template (voir package.template.php) */
|
||||
WithBlocPath("AddCom", "actionadmin");
|
||||
|
||||
//$this->tabeCreate();
|
||||
$text =getMessage("NoText");
|
||||
|
||||
# Affichage de la liste déroulante
|
||||
# Détermine le chemin des icônes
|
||||
$chemintotal = $GLOBALS['CONF_DATA_PATH']."data/image/icons/node/";
|
||||
@ -233,7 +241,7 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
|
||||
asort($tabIcone);
|
||||
$GLOBALS['SYSTEM_TEMPLATE']->MxSelect("TEMPLATE_ADMIN", "template", $tabIcone, $tabIcone, "", 7, "", "class=\"form\"");
|
||||
/* Fin Affichage des templates */
|
||||
|
||||
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("BtnAdd", "button", "boutton", getMessage("BtnAdd"), "class=\"form\"");
|
||||
# Récupération des étiquettes du formulaire
|
||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction", formatUrl($this->getId(),"AddCom","execAdmin",""));
|
||||
@ -252,26 +260,21 @@ function execAdmin()
|
||||
addMessageFile("main.ini");
|
||||
addMessageFile("object.ini");
|
||||
addMessageFile("adminnode.ini");
|
||||
addMessageFile("adminhome.ini");
|
||||
|
||||
/* gestion du lib en fonction de la langue courante */
|
||||
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
|
||||
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
|
||||
/* fin récupération des codes par défaut */
|
||||
|
||||
// var_dump($_POST);
|
||||
// exit(0);
|
||||
|
||||
$chaine="";
|
||||
if($_POST)
|
||||
{
|
||||
foreach($_POST as $cle=>$val)
|
||||
{
|
||||
// echo "cle = ".$cle." val =".$val."<br>";
|
||||
// if($val=="" && ($cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country"))
|
||||
if($val=="" && ($cle !="NodeEntry_type" && $cle !="NodeEntry_typereg" && $cle !="NodeEntry_domain" && $cle !="user_fax" && $cle !="user_mastodon" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_msn" && $cle !="user_website"))
|
||||
if($val=="" && ($cle !="NodeEntry_type" && $cle !="NodeEntry_typereg" && $cle !="NodeEntry_domain" && $cle !="user_fax" && $cle !="user_mastodon" && $cle !="user_jabber" && $cle !="user_facebook" && $cle !="user_msn" && $cle !="user_website" && $cle="contentResumeInfos" && $cle="contentTextInfos"))
|
||||
{
|
||||
$chaine .= getMessage($cle).", ";
|
||||
// var_dump(getMessage($cle));
|
||||
}
|
||||
}
|
||||
if($chaine!="")
|
||||
@ -625,6 +628,14 @@ function execAdmin()
|
||||
if( DATA_ACCES_CACHE_PERMISSION )
|
||||
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
|
||||
|
||||
|
||||
# Insertion des informations de description de la communauté en bdd
|
||||
$sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (textentrynode_text, textentrynode_resume, node_id, langue_id) VALUES ('".$_POST['contentTextInfos']."','".$_POST['contentResumeInfos']."',".recupCommunity().",".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId().")";
|
||||
|
||||
# Exécution de Requete
|
||||
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
|
||||
# Destruction des éléments
|
||||
$GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult();
|
||||
#------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Redirection vers le formulaire
|
||||
systemRedirect(formatUrl($this->getId(),"AddCom","actionAdmin", "msgSave"));
|
||||
|
@ -321,7 +321,7 @@ Class Home extends CoordinationObj
|
||||
$sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (textentrynode_text, textentrynode_resume, node_id, langue_id) VALUES ('".$_POST['contentTextInfos']."','".$_POST['contentResumeInfos']."',".recupCommunity().",".$GLOBALS["SYSTEM_USER_SESSION"]->langue->getId().")";
|
||||
|
||||
# Exécution de Requete
|
||||
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
|
||||
$result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql);
|
||||
}
|
||||
|
||||
# Destruction des éléments
|
||||
|
Loading…
x
Reference in New Issue
Block a user