Fixed issue #30
This commit is contained in:
parent
97d179514d
commit
de1fce5aac
@ -1,29 +1,30 @@
|
|||||||
<div class="tab-content container px-2 py-2 border">
|
<div class="tab-content container-fluid px-2 py-2 w-75 border">
|
||||||
<div class="panel-heading">
|
<div class="card w-100">
|
||||||
<mx:text id="TxtListUserForInscription"/> (<a href="javascript:void(0);" onclick="setCheckOptions('FManageRegister', 'user_id[]'); return false;" class="Navigation"><mx:text id="user_action"/></a>)
|
<div class="card-header text-center">
|
||||||
|
<h3><mx:text id="TxtListUserForInscription"/> (<a href="javascript:void(0);" onclick="setCheckOptions('FManageRegister', 'user_id[]'); return false;" class="Navigation"><mx:text id="user_action"/></a>)</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="card-body">
|
||||||
<form name="fictif" action="#">
|
<div class="row mb-0">
|
||||||
|
<form id="userTemp" name="userTemp" role="form" class="form text-center px-0" method="post" action="#">
|
||||||
<input type="hidden" name="selectcheckbox" value="<mx:text id="selectcheckbox"/>" />
|
<input type="hidden" name="selectcheckbox" value="<mx:text id="selectcheckbox"/>" />
|
||||||
<input type="hidden" name="confirmactivate" value="<mx:text id="confirmactivate"/>" />
|
<input type="hidden" name="confirmactivate" value="<mx:text id="confirmactivate"/>" />
|
||||||
<input type="hidden" name="confirmdelete" value="<mx:text id="confirmdelete"/>" />
|
<input type="hidden" name="confirmdelete" value="<mx:text id="confirmdelete"/>" />
|
||||||
<input type="hidden" name="urlAction1" mXattribut="value:urlAction1" />
|
<input type="hidden" name="urlAction1" mXattribut="value:urlAction1" />
|
||||||
<input type="hidden" name="urlAction2" mXattribut="value:urlAction2" />
|
<input type="hidden" name="urlAction2" mXattribut="value:urlAction2" />
|
||||||
</form>
|
</form>
|
||||||
<form class="form-inline" id="FManageRegister" name="FManageRegister" role="form" method="post" mXattribut="action:urlAction0">
|
</div>
|
||||||
<div class="row">
|
<form id="FManageRegister" name="FManageRegister" role="form" class="form text-center px-0" method="post" mXattribut="action:urlAction0">
|
||||||
<div class="table-responsive">
|
<table class="table table-sm table-responsive-sm table-bordered table-striped table-hover" id="tabInscriptions" mXattribut="summary:TxtListUserForInscription">
|
||||||
<table class="table table-responsive table-bordered table-striped table-hover" id="tabInscriptions" mXattribut="summary:TxtListUserForInscription">
|
|
||||||
<thead class="thead-default">
|
<thead class="thead-default">
|
||||||
<tr>
|
<tr>
|
||||||
<th><mx:text id="user_first_name_without_dots"/></th>
|
<th><mx:text id="user_first_name"/></th>
|
||||||
<th><mx:text id="user_last_name_without_dots"/></th>
|
<th><mx:text id="user_last_name"/></th>
|
||||||
<th><mx:text id="user_login_without_dots"/></th>
|
<th><mx:text id="user_login"/></th>
|
||||||
<th><mx:text id="user_group_without_dots"/></th>
|
<th><mx:text id="user_group"/></th>
|
||||||
<th><mx:text id="user_mail_without_dots"/></th>
|
<th><mx:text id="user_mail"/></th>
|
||||||
<!--<th><mx:text id="user_city_without_dots"/></th>-->
|
<!--<th><mx:text id="user_city_without_dots"/></th>-->
|
||||||
<!--<th><mx:text id="user_organisation_without_dots"/></th>-->
|
<!--<th><mx:text id="user_organisation_without_dots"/></th>-->
|
||||||
<th><mx:text id="TxtAction_without_dots"/></th>
|
<th data-orderable="false"><mx:text id="TxtAction"/></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -39,104 +40,25 @@
|
|||||||
<td class="action"><div class="boxcheck"><mx:checker id="vuser_action" /></div></td>
|
<td class="action"><div class="boxcheck"><mx:checker id="vuser_action" /></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
</mx:bloc id="ligne">
|
</mx:bloc id="ligne">
|
||||||
<tfoot class="tfoot-default">
|
|
||||||
<tr>
|
|
||||||
<th><mx:text id="user_first_name_without_dots"/></th>
|
|
||||||
<th><mx:text id="user_last_name_without_dots"/></th>
|
|
||||||
<th><mx:text id="user_login_without_dots"/></th>
|
|
||||||
<th><mx:text id="user_group_without_dots"/></th>
|
|
||||||
<th><mx:text id="user_mail_without_dots"/></th>
|
|
||||||
<!--<th><mx:text id="user_city_without_dots"/></th>-->
|
|
||||||
<!--<th><mx:text id="user_organisation_without_dots"/></th>-->
|
|
||||||
<th><mx:text id="TxtAction_without_dots"/></th>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
|
<div class="card-header text-center pb-0">
|
||||||
|
<h3><mx:text id="user_action_text"/></h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row mb-0">
|
||||||
|
<div class="input-group col-xs-12 col-sm-8 col-lg-12 p-0 m-0 justify-content-center">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-lg fa-group"></i><mx:text id="GroupChoiceDefaultActivate"/></span>
|
||||||
|
</div>
|
||||||
|
<mx:select id="GROUP"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<mx:text id="user_action_text"/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="card-footer border-0 bg-white text-center pb-0">
|
||||||
<p class="input-group col-xs-12 col-sm-4 col-lg-4">
|
|
||||||
<span class="input-group-addon"><span class="fa fa-user"></span><mx:text id="GroupChoiceDefaultActivate"/></span><mx:select id="GROUP"/>
|
|
||||||
<mx:formField id="user_accept" class="add"/>
|
<mx:formField id="user_accept" class="add"/>
|
||||||
<mx:formField id="user_delete" class="delete"/>
|
<mx:formField id="user_delete" class="delete"/>
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function()
|
|
||||||
{
|
|
||||||
$('#tabInscriptions').dataTable( {
|
|
||||||
"bPaginate": false,
|
|
||||||
"bFilter": false,
|
|
||||||
"bInfo": false,
|
|
||||||
// "sPaginationType": "full_numbers",
|
|
||||||
// "bAutoWidth": true,
|
|
||||||
// "bSort": false,
|
|
||||||
"aaSorting": [[ 0, "desc" ]],
|
|
||||||
// "iDisplayLength": 20,
|
|
||||||
// "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
|
|
||||||
"oLanguage": {
|
|
||||||
"sUrl": "data/message/fr/datatables.txt"
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
function Valid_register(the_val,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(document.fictif.selectcheckbox.value);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(the_val == 1)
|
|
||||||
{
|
|
||||||
var reponse = confirm(document.fictif.confirmactivate.value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var reponse = confirm(document.fictif.confirmdelete.value);
|
|
||||||
}
|
|
||||||
if (reponse == true)
|
|
||||||
{
|
|
||||||
if(the_val==1)
|
|
||||||
{
|
|
||||||
objectform.action=document.fictif.urlAction1.value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
objectform.action=document.fictif.urlAction2.value;
|
|
||||||
}
|
|
||||||
objectform.submit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
@ -46,14 +46,34 @@ Class UserTemp extends CoordinationObj
|
|||||||
*/
|
*/
|
||||||
function actionManageRegister()
|
function actionManageRegister()
|
||||||
{
|
{
|
||||||
/* On inclus la template (voir package.template.php) */
|
|
||||||
withBlocPath("UserTemp", "actionManageRegister");
|
|
||||||
|
|
||||||
global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
|
global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH;
|
||||||
|
|
||||||
/*Récupération des messages utilisateurs*/
|
/*Récupération des messages utilisateurs*/
|
||||||
addMessageFile("user.ini");
|
addMessageFile("user.ini");
|
||||||
|
|
||||||
|
mxPageTitle("titlAdminSubscriptions");
|
||||||
|
|
||||||
|
/* 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 defaut */
|
||||||
|
|
||||||
|
$arrayCallCss = array();
|
||||||
|
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";
|
||||||
|
mxCallCss($arrayCallCss);
|
||||||
|
|
||||||
|
$arrayCallJs = array();
|
||||||
|
$arrayCallJs[] = "data/javascript/jquery.dataTables/1.10.22/jquery.dataTables.min.js";
|
||||||
|
$arrayCallJs[] = "data/javascript/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.js";
|
||||||
|
mxCallJs($arrayCallJs);
|
||||||
|
|
||||||
|
$arrayRawJs[] = "\$(document).ready(function(){\$(\"#tabInscriptions\").dataTable({\"bPaginate\": false,\"bFilter\": false,\"bInfo\": false,\"aaSorting\": [[ 0, \"desc\" ]],\"oLanguage\": {\"sUrl\": \"data/message/".$currentCode."/datatables.txt\"}});}); ";
|
||||||
|
$arrayRawJs[] = "function Valid_register(the_val,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(document.userTemp.selectcheckbox.value);return false;}else{if(the_val == 1){var reponse = confirm(document.userTemp.confirmactivate.value);}else{var reponse = confirm(document.userTemp.confirmdelete.value);}if(reponse == true){if(the_val==1){objectform.action=document.userTemp.urlAction1.value;}else{objectform.action=document.userTemp.urlAction2.value;}objectform.submit();}else{return false;}}}";
|
||||||
|
mxRawJs($arrayRawJs);
|
||||||
|
|
||||||
|
/* On inclus la template (voir package.template.php) */
|
||||||
|
withBlocPath("UserTemp", "actionManageRegister");
|
||||||
|
|
||||||
/* Récuperation du noeud à administrer sinon noeud d'entrée de l'admin */
|
/* Récuperation du noeud à administrer sinon noeud d'entrée de l'admin */
|
||||||
$groupId=($this->getData("groupId")!="")?$this->getData("groupId"):1; /* Tous les Groupes par défaut */
|
$groupId=($this->getData("groupId")!="")?$this->getData("groupId"):1; /* Tous les Groupes par défaut */
|
||||||
/* Creation du Tree d'admin */
|
/* Creation du Tree d'admin */
|
||||||
@ -68,11 +88,6 @@ Class UserTemp extends CoordinationObj
|
|||||||
// --> recuperation du treeNode correspondant au noeurd
|
// --> recuperation du treeNode correspondant au noeurd
|
||||||
$tabTreeGroup[0]=$myTreeGroup; //--> treeNodeUnique....
|
$tabTreeGroup[0]=$myTreeGroup; //--> treeNodeUnique....
|
||||||
|
|
||||||
/* 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 defaut */
|
|
||||||
|
|
||||||
//Récupération de l'identifiant de la communauté : methode en fin de page
|
//Récupération de l'identifiant de la communauté : methode en fin de page
|
||||||
$nodeId = $this->recupCommunauty();
|
$nodeId = $this->recupCommunauty();
|
||||||
|
|
||||||
@ -103,8 +118,6 @@ Class UserTemp extends CoordinationObj
|
|||||||
//OBTENIR LE GROUPE DE L'UTILISATEUR
|
//OBTENIR LE GROUPE DE L'UTILISATEUR
|
||||||
// var_dump($tabNodeGroupUser[$i]->getGroupId());
|
// var_dump($tabNodeGroupUser[$i]->getGroupId());
|
||||||
//On récupère les données de l'utilisateur concerné
|
//On récupère les données de l'utilisateur concerné
|
||||||
// $titre = array(getMessage("mr"),getMessage("mrs"), getMessage("miss"));
|
|
||||||
// $GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_title", $titre[$currentUser->getTitle()]);
|
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_first_name", $currentUser->getFirstName());
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_first_name", $currentUser->getFirstName());
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_last_name", $currentUser->getLastName());
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_last_name", $currentUser->getLastName());
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_login", $currentUser->getLogin());
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_login", $currentUser->getLogin());
|
||||||
@ -121,9 +134,9 @@ Class UserTemp extends CoordinationObj
|
|||||||
$treeGroup = "";
|
$treeGroup = "";
|
||||||
for($n=(count($tabWayTreeGroup)-1);$n>=0;$n--){
|
for($n=(count($tabWayTreeGroup)-1);$n>=0;$n--){
|
||||||
if($n>0)
|
if($n>0)
|
||||||
$treeGroup .= "/ ".$tabWayTreeGroup[$n];
|
$treeGroup .= " / ".$tabWayTreeGroup[$n];
|
||||||
else
|
else
|
||||||
$treeGroup .= "/".$tabWayTreeGroup[$n]."";
|
$treeGroup .= " / ".$tabWayTreeGroup[$n]."";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$treeGroup = "Aucun";
|
$treeGroup = "Aucun";
|
||||||
@ -142,11 +155,11 @@ Class UserTemp extends CoordinationObj
|
|||||||
$GLOBALS["SYSTEM_CONTROL"]->messageSystem = "NoRegisterEntry";
|
$GLOBALS["SYSTEM_CONTROL"]->messageSystem = "NoRegisterEntry";
|
||||||
}
|
}
|
||||||
|
|
||||||
printTabTreeGroup($tabTreeGroup, 0, "GROUP","id_Group");
|
printTabTreeGroup($tabTreeGroup, 0, "GROUP", "id_Group", '', getMessage("TxtGroup"));
|
||||||
|
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_delete", "button", "boutton", getMessage("user_delete"), " class=\"form-control\" onclick=\"javascript:Valid_register(2,'FManageRegister','user_id[]');\"");
|
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_accept", "button", "boutton", getMessage("user_accept"), " class=\"form-control\" onclick=\"javascript:Valid_register(1,'FManageRegister','user_id[]');\"");
|
|
||||||
|
|
||||||
|
// <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();"/>
|
||||||
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_delete", "button", "boutton", getMessage("user_delete"), " class=\"form\" onclick=\"javascript:Valid_register(2,'FManageRegister','user_id[]');\"");
|
||||||
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_accept", "button", "boutton", getMessage("user_accept"), " class=\"form\" onclick=\"javascript:Valid_register(1,'FManageRegister','user_id[]');\"");
|
||||||
|
|
||||||
# Envoi du formulaire en fonction de l'action : encode le javascript
|
# Envoi du formulaire en fonction de l'action : encode le javascript
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction0", formatUrl($this->getId(),"UserTemp","execManageRegister"));
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlAction0", formatUrl($this->getId(),"UserTemp","execManageRegister"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user