Fixed issue #62.

This commit is contained in:
Rooty 2021-04-07 10:54:26 +02:00
parent 661a54c6f9
commit ec8c698e56
2 changed files with 18 additions and 12 deletions

View File

@ -18,7 +18,9 @@
<button type="submit" id="btnLogin" class="btn btn-block btn-outline-secondary btn-lg btn-sm" aria-pressed="true" mXattribut="value:BtnEnter" mXattribut="title:titleButton"><i class="fa fa-lg fa-sign-in"></i><mx:text id="auth"/></button>
<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="href:urlActionNewAccount"><i class="fa fa-lg fa-community"></i> <mx:text id="NEWACCOUNT"/></a> <!--community group users-->
<mx:bloc id="blocSubscription">
<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="href:urlActionNewSubscription"><i class="fa fa-lg fa-handshake-o"></i> <mx:text id="NEWSUBSCRIPTION"/></a> <!--handshake-o -->
</mx:bloc id="blocSubscription">
<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="href:urlActionForgotPassword"><i class="fa fa-lg fa-cut-key"></i> <mx:text id="FORGOTPASSWORD"/></a> <!--cut-key-->
</form>
</div>

View File

@ -65,10 +65,10 @@ class UserPrint extends Printing
global $SERVER_NAME, $SCRIPT_NAME, $CONF_AUTH_SECURE;
if ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
{
$MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/userprint/auth.mxt");
$MaTemplate = new ModeliXeQware($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_printing/userprint/auth.mxt");
$MaTemplate->SetModeliXe(true);
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
$GLOBALS['SYSTEM_TEMPLATE']->MxText("imgPath", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']);
/* création de l'url de login */
@ -81,22 +81,27 @@ class UserPrint extends Printing
{
if ($tabObject[$i][0]->getClassName()=="Home")
{
// var_dump($tabObject[$i][1]->getId());
$urlArray["id"]=$tabObject[$i][1]->getId();
}
}
$node=$GLOBALS["SYSTEM_USER_SESSION"]->getNode(recupCommunity());
/* Création de l'URL pour nouveau compte */
$urlNewAccount = $_SERVER['SCRIPT_NAME'];
$urlNewAccount.= "?system=authNewAccount";
$urlNewAccount = addIdToUrl($urlNewAccount);
// if( isset($_SERVER["HTTPS"]) )
// $proto = "https://";
// else
// $proto = "http://";
// $MaTemplate->MxAttribut("urlActionNewAccount", $proto."www.fab-l3.org/wwwfab_lorg-142-les_communautes-formlecture-2.htm?abs=1&amp;param=139");
$MaTemplate->MxAttribut("urlActionNewAccount", formatUrl($urlArray["id"],"Home","formLecture","",recupCommunity()));
$MaTemplate->MxAttribut("urlActionNewSubscription", formatUrl($urlArray["id"],"Home","formLectureAdh","",recupCommunity()));
// var_dump($node->getCType());
if ($node->getCType() == "asso")
{
$MaTemplate->MxText("blocSubscription".".NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
$MaTemplate->MxAttribut("blocSubscription".".urlActionNewSubscription", formatUrl($urlArray["id"], "Home", "formLectureAdh", "", recupCommunity()));
}
else
$MaTemplate->MxBloc("blocSubscription", "delete");
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
@ -113,7 +118,6 @@ class UserPrint extends Printing
$MaTemplate->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
$MaTemplate->MxAttribut("urlActionNewAccount", $urlNewAccount);
$MaTemplate->MxText("NEWACCOUNT", getMessage("UserPrintNewAccount"));
$MaTemplate->MxText("NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
$MaTemplate->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
$MaTemplate->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
$MaTemplate->MxAttribut("urlActionLogin", $url);