Fixed template lcube6 for tool configuration of coordinationobj object

This commit is contained in:
Rooty 2020-12-13 22:05:18 +01:00
parent e5ce80d988
commit c62193c0e1
3 changed files with 91 additions and 89 deletions

View File

@ -20,7 +20,7 @@ methodactionuser = "Utiliser"
classinstallmanager = "Installeur"
methodactioninstall = "Administrer"
classhome = "Texte d'accueil de communauté"
classHome = "Texte d'accueil de communauté"
classusermodif = "Mon compte personnel"
classadminnode = "Gestion des espaces"
TxtFormNode = "Configuration de l'outil de gestion des espaces"

View File

@ -1,12 +1,4 @@
<script type="text/javascript">window.parent.document.title = "----------";</script>
<form id="configObject" method="post" mXattribut="action:urlAction">
<input type="hidden" name="urlReturn" mXattribut="value:urlActionReturn"/>
<input type="hidden" name="contentType" mXattribut="value:contentType"/>
<input type="hidden" name="objectId" mXattribut="value:objectId"/>
<div class="tabe">
<ul>
<li id="startTabe" class="WindowTabeData"></li>
<ul class="nav container-fluid nav-tabs w-75 border-bottom-0">
<mx:bloc id="TabeB">
<li mXattribut="class:TabeView">
<a mXattribut="href:UrlTabeView" mXattribut="class:ClassTabeView">
@ -15,69 +7,64 @@
</a>
</li>
</mx:bloc id="TabeB">
<li id="endTabe" class="WindowTabeData"></li>
</ul>
</div>
<fieldset class="framebox">
<div class="box">
<!-- <div class="legend"><h2><mx:text id="TabeBTabeNameView"/></h2><p><mx:text id="configurationObject"/> (<mx:text id="TxtContentType"/>)</p></div> -->
<div class="tabe">
<ul>
<li id="startTabe" class="WindowTabeData"></li>
</ul>
<div class="tab-content container-fluid px-2 py-2 w-75 border">
<ul class="nav container-fluid nav-tabs border-bottom-0">
<mx:bloc id="TabeSecond">
<li mXattribut="class:TabeView">
<a mXattribut="href:UrlTabeView" mXattribut="class:ClassTabeView"><i class="mr-1 fa fa-lg fa-<mx:text id="pictoTabe"/>"></i><mx:text id="TabeNameView"/></a>
</li>
</mx:bloc id="TabeSecond">
<li id="endTabe" class="WindowTabeData"></li>
</ul>
<div class="tab-content container-fluid px-2 py-2 w-100 border">
<form id="configObject" role="form" class="form text-center px-0" method="post" mXattribut="action:urlAction">
<input type="hidden" name="urlReturn" mXattribut="value:urlActionReturn"/>
<input type="hidden" name="contentType" mXattribut="value:contentType"/>
<input type="hidden" name="objectId" mXattribut="value:objectId"/>
<div class="card w-100 mb-0">
<div class="card-header">
<h3><mx:text id="TxtFormLegend"/></h3>
</div>
<div class="fieldset">
<div class="legend"><mx:text id="TxtFormLegend"/></div>
<div>
<div class="field"><label for="iconeN" class="require"><mx:text id="TxtImage"/></label><img name="pictoObject" id="pictoObject" src="data/template/<mx:text id="CurrentTemplate"/>/media/picto/object/defaultobject.gif" alt="Picto"/><mx:select id="icone" class="selectsmall"/></div>
<div class="field"><label for="nameInput" class="require"><mx:text id="nameObject"/></label>
<div class="card-body">
<div class="row mb-2">
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-lg fa-file-picture-o"></i></span>
</div>
<mx:select id="icone"/>
<div class="input-group-append">
<span class="input-group-text"><img name="pictoObject" id="pictoObject" src="data/image/icons/object/defaultobject.gif" alt="Picto"/></span>
</div>
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0">
<mx:bloc id="blocName">
<div style="float:right;"><mx:image id="pictoLanguage"/><input type="text" mXattribut="value:namelanguagevalue" mXattribut="name:nameInput" id="nameInput"/></div>
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa"><mx:image id="pictoLanguage"/></i></span>
</div>
<mx:formField id="nameInput"/>
</mx:bloc id="blocName">
</div>
<div class="field"><label for="resume"><mx:text id="resumeLanguage"/> :</label><textarea class="textareacomm" name="resume" id="resume"><mx:text id="resumeValue"/></textarea></div>
<div class="field"><label for="keyword"><mx:text id="keyword"/> :</label><textarea class="textareacomm" name="keyWord" id="keyword"><mx:text id="keyWordValue"/></textarea></div>
</div>
<div class="row mb-2">
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0">
<mx:formField id="resumeValue"/>
</div>
<div class="input-group col-xs-12 col-sm-8 col-lg-6 p-0 m-0">
<mx:formField id="keyWordValue"/>
</div>
</div>
<div class="field"><label for="node" class="require"><mx:text id="TxtNode"/></label><mx:select id="NODE" id="node"/></div>
</div>
<div class="action">
<input type="submit" name="BtnValid" mXattribut="value:BtnValid" class="add"/>
<div class="row mb-0">
<mx:text id="TxtNode"/></label><mx:select id="NODE" id="node"/></div>
</div>
</div>
<div class="info"><mx:text id="TxtField"/></div>
<div class="card-footer border-0 bg-white text-center pb-0">
<input type="reset" name="BtnReset" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" title="<mx:text id="BtnReset"/>" value="<mx:text id="BtnReset"/>" onclick="this.form.reset();"/>
<input type="button" name="BtnReturn" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" value="<mx:text id="BtnReturn"/>" onclick="history.back();"/>
<input type="submit" name="BtnValid" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" MxAttribut="value:BtnValid"/>
</div>
</div>
</form>
</div>
</div>
</fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
function imgPicto()
{
// cas ns6
if (document.getElementById)
{
if (document.getElementById("configObject"))
{
document.getElementById("pictoObject").src="data/template/<mx:text id="CurrentTemplate"/>/media/picto/object/"+document.getElementById("configObject").iconeN.options[(document.getElementById("configObject").iconeN.selectedIndex)].value;
}
}
// cas ie 5.5
else if (document.all)
{
if (document.all["configObject"])
{
document.all["pictoObject"].src="data/template/<mx:text id="CurrentTemplate"/>/media/picto/object/"+document.all["configObject"].iconeN.options[(document.all["configObject"].iconeN.selectedIndex)].value;
}
}
}
imgPicto();
// ]]>
</script>

View File

@ -498,9 +498,14 @@ var $archivage= null;
function configurePrint($url, $urlReturn, $groupIdPass, $nodeIdPass, $tabForbiddenPass)
{
/* gestion de la Template */
addMessageFile("AdminObject.ini");
addMessageFile("adminobject.ini");
addMessageFile("adminnode.ini");
addMessageFile("object.ini");
/* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* Récuperation du noeud à administrer sinon noeud d'entrée de l'admin */
$nodeId=($this->getData("nodeId")!="")?$this->getData("nodeId"):eid();
$groupId=($this->getData("groupId")!="")?$this->getData("groupId"):1; /* Tous les Groupes par défaut */
@ -521,7 +526,8 @@ var $archivage= null;
// --> recuperation du treeNode correspondant au noeurd
$tabTreeNode[0]=$myTree; //--> treeNodeUnique....
printTabTreeNode($tabTreeNode, $this->getNode(), "NODE", "node_id", false, '');
// printTabTreeNode($tabTreeNode, $this->getNode(), "NODE", "node_id", false, '');
printTabTreeNode($tabTreeNode, $this->getNode(), "NODE", "node_id", false, "", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("TxtNodeIn"), ENT_QUOTES)."\"");
/* -- Fin d'affichage des noeud d'ajout */
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("urlAction", $url);
@ -531,11 +537,23 @@ var $archivage= null;
$name =getMessage("class".$value);
$name =( (isset($name)) && ($name!="") )?$name:$value;
// var_dump($value);
// var_dump($name);
// var_dump($this->getId());
// var_dump($this->getName($currentCode));
// var_dump($this->getIcone());
$GLOBALS['SYSTEM_TEMPLATE']->MxText("TxtContentType", $name);
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("contentType", get_class($this));
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("objectId", $this->getId());
$GLOBALS['SYSTEM_TEMPLATE']->MxText("resumeValue", $this->getResume());
// $GLOBALS['SYSTEM_TEMPLATE']->MxText("resumeValue", $this->getResume());
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("resumeValue", "textarea", "resumeValue", $this->getResume(), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("resumeObject"), ENT_QUOTES)."\"", getMessage("resumeObject"));
$GLOBALS['SYSTEM_TEMPLATE']->MxText("keyWordValue", $this->getKeyWord());
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("keyWordValue", "textarea", "keyWordValue", $this->getKeyWord(), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("keywordObject"), ENT_QUOTES)."\"", getMessage("keywordObject"));
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("parutionValue", $this->getParution());
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("archivageValue", $this->getArchivage());
@ -554,21 +572,18 @@ var $archivage= null;
}
@closedir($handle);
asort($tabIcone);
$GLOBALS['SYSTEM_TEMPLATE']->MxSelect("icone", "iconeN", $this->getIcone(), $tabIcone, '', '', 'onchange="javascript:imgPicto();" id="iconeN" ');
/* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
if ( $this->getIcone() == "") $nodeIcone = "defaultobject.gif"; else $nodeIcone = $this->getIcone();
$GLOBALS['SYSTEM_TEMPLATE']->MxSelect("icone", "iconeN", $nodeIcone, $tabIcone, 'Icône de l\'espace', '', 'onchange="javascript:imgPicto();" id="iconeN"', "class=\"form\" title=\"".htmlspecialchars(getMessage("TxtImage"), ENT_QUOTES)."\"", getMessage("TxtImage"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxImage("pictoObject", $chemintotal.$nodeIcone, $nodeIcone, "name=\"pictoObject\" id=\"pictoObject\"");
for ($i=0; $i<count($tab);$i++)
{
$img =$tab[$i]->getIcone();
$GLOBALS['SYSTEM_TEMPLATE']->MxImage("blocName.pictoLanguage", $img);
$GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("blocName.nameInput", "name".$tab[$i]->getCode());
$GLOBALS["SYSTEM_TEMPLATE"]->MxImage("blocName.pictoLanguage", $img);
//Récupère le nom de l'objet dans la langue correspondante à la boucle
$testnamenodeprint = $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("blocName.namelanguagevalue", htmlentitiesconv($this->getName($tab[$i]->getCode(), ENT_QUOTES)));
//var_dump($testnamenodeprint);
// $GLOBALS['SYSTEM_TEMPLATE']->MxAttribut("blocName.nameInput", "name".$tab[$i]->getCode());
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("blocName.nameInput", "text", "name".$tab[$i]->getCode(), $this->getName($tab[$i]->getCode()), "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("nameObjectList"), ENT_QUOTES)."\"", getMessage("nameObjectList"));
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocName", "loop");
}
return "";