diff --git a/data/template/qware/object_printing/userprint/auth.mxt b/data/template/qware/object_printing/userprint/auth.mxt
index 246db0a..047b4ed 100755
--- a/data/template/qware/object_printing/userprint/auth.mxt
+++ b/data/template/qware/object_printing/userprint/auth.mxt
@@ -17,10 +17,12 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/lib/object_printing/userprint/userprint.php b/lib/object_printing/userprint/userprint.php
index c8951f7..bf14caf 100755
--- a/lib/object_printing/userprint/userprint.php
+++ b/lib/object_printing/userprint/userprint.php
@@ -86,26 +86,32 @@ class UserPrint extends Printing
}
$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);
-
- $MaTemplate->MxAttribut("urlActionNewAccount", Navigation::formatUrl($urlArray["id"],"Home","formLecture","",recupCommunity()));
// var_dump($node->getCType());
// var_dump($node->getRegisterEnable());
- if( $node->getRegisterEnable() )
+ if( $node->getRegisterEnable() == 'on')
{
+ /* Création de l'URL pour nouveau compte */
+ $urlNewAccount = $_SERVER['SCRIPT_NAME'];
+ $urlNewAccount.= "?system=authNewAccount";
+ $urlNewAccount = addIdToUrl($urlNewAccount);
+
+ $MaTemplate->MxAttribut("blocRegister".".urlActionNewAccount", Navigation::formatUrl($urlArray["id"],"Home","formLecture","",recupCommunity()));
+
+// $MaTemplate->MxAttribut("blocRegister".".urlActionNewAccount", $urlNewAccount);
+ $MaTemplate->MxText("blocRegister".".NEWACCOUNT", getMessage("UserPrintNewAccount"));
+
if ($node->getCType() == "asso")
{
$MaTemplate->MxText("blocSubscription".".NEWSUBSCRIPTION", getMessage("UserPrintNewSubscription"));
$MaTemplate->MxAttribut("blocSubscription".".urlActionNewSubscription", Navigation::formatUrl($urlArray["id"], "Home", "formLectureAdh", "", recupCommunity()));
+ } else {
+ $MaTemplate->MxBloc("blocSubscription", "delete");
}
- }
- else
+ } else {
$MaTemplate->MxBloc("blocSubscription", "delete");
+ $MaTemplate->MxBloc("blocRegister", "delete");
+ }
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
@@ -120,8 +126,6 @@ class UserPrint extends Printing
$MaTemplate->MxFormField("login", "text", "login", "", "title='".getMessage("tipUserPrintLogin")."'");
$MaTemplate->MxText("PASSWORD", getMessage("UserPrintPassword"));
$MaTemplate->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
- $MaTemplate->MxAttribut("urlActionNewAccount", $urlNewAccount);
- $MaTemplate->MxText("NEWACCOUNT", getMessage("UserPrintNewAccount"));
$MaTemplate->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
$MaTemplate->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
$MaTemplate->MxAttribut("urlActionLogin", $url);