Disabled account edit and status in adminUser coordination object for guest account

This commit is contained in:
Rooty 2021-04-18 13:07:53 +02:00
parent c06869fb30
commit 35795d22ec
3 changed files with 19 additions and 4 deletions

View File

@ -1064,6 +1064,13 @@ form#authSession.form div.input-group-prepend span i.fa{
border: 1px solid #c8c8c8;
}
#data div.tab-content.container-fluid div.card.w-100 div.card-body div table.table tbody tr.odd td span a span.isdisabled{
color: currentColor;
cursor: default;
opacity: 0.5;
text-decoration: none;
}
#tabListNews tr {
line-height: 12px;
}

View File

@ -129,7 +129,7 @@
<td class="py-0 align-middle"><span><a mXattribut="href:vmailto" class="fa fa-envelope"><mx:text id="vuser_mail"/></a></span></td>
<td class="py-0 align-middle"><span class="float-right"><a mXattribut="href:url_account_active" class="fa fa-lg fa-<mx:text id="vuser_account_active"/>"></a></span></td>
<td class="py-0 align-middle">
<span><a mXattribut="href:url_user"><span class="fa fa-lg fa-edit"></span></a></span>
<span><a mXattribut="href:url_user"><span class="fa fa-lg fa-edit<mx:text id="vuser_account_active_style"/>"></span></a></span>
</td>
</tr>
</mx:bloc id="ligne">

View File

@ -185,15 +185,23 @@ Class AdminUser extends CoordinationObj
$currentUser=$tabUser[$i];
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.BtnUpdate",getMessage("BtnUpdate"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.BtnDelete",getMessage("BtnDelete"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.url_user",formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","",$currentUser->getId()));
// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.url_user",formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","",$currentUser->getId()));
// $GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.del_user",formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","",$currentUser->getId()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_first_name", htmlentitiesconv($currentUser->getFirstName()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_last_name", htmlentitiesconv($currentUser->getLastName()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_login", htmlentitiesconv($currentUser->getLogin()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_mail", htmlentitiesconv($currentUser->getMail()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.vmailto", "mailto:".htmlentitiesconv($currentUser->getMail()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.url_account_active",formatUrl($this->getId(),"AdminUser","execAccountActiveAdmin","",$currentUser->getId()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_account_active", ($currentUser->getAccountActive()=="on")?"toggle-on text-success":"toggle-off text-danger" );
if( htmlentitiesconv($currentUser->getLogin()) != "Guest" )
{
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.url_user",formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","",$currentUser->getId()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.url_account_active",formatUrl($this->getId(),"AdminUser","execAccountActiveAdmin","",$currentUser->getId()));
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_account_active", ($currentUser->getAccountActive()=="on")?"toggle-on text-success":"toggle-off text-danger" );
} else {
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_account_active", ($currentUser->getAccountActive()=="on")?"toggle-on text-secondary":"toggle-off text-secondary" );
$GLOBALS["SYSTEM_TEMPLATE"]->MxText("ligne.vuser_account_active_style", " isdisabled" );
}
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("ligne.vuser_id", "user".$currentUser->getId());
/* Pour récuperer les libellés */