Commit 67ffd211 authored by David Surville's avatar David Surville
Browse files

Possibilité de gérer le titre pour chaque type d'authentification dans la configuration

parent 55716a44
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -13,9 +13,11 @@ use Zend\View\Renderer\PhpRenderer;
 */
class CasConnectViewHelper extends AbstractConnectViewHelper
{
    const TYPE = 'cas';
    const TITLE = "Authentification centralisée";

    public function __construct()
    {
        $this->setType('cas');
        $this->setTitle("Authentification centralisée");
        $this->setType(self::TYPE);
    }
}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -18,10 +18,12 @@ class CasConnectViewHelperFactory
        $config = $moduleOptions->getCas();

        $enabled = isset($config['enabled']) && (bool) $config['enabled'];
        $title = $config['title'] ?? null;
        $description = $config['description'] ?? null;

        $helper = new CasConnectViewHelper();
        $helper->setEnabled($enabled);
        $helper->setTitle($title ?? CasConnectViewHelper::TITLE);
        $helper->setDescription($description);

        return $helper;
+4 −2
Original line number Diff line number Diff line
@@ -13,9 +13,11 @@ use Zend\View\Renderer\PhpRenderer;
 */
class LocalConnectViewHelper extends AbstractConnectViewHelper
{
    const TYPE = 'local';
    const TITLE = "Avec un compte local (ldap/db)";

    public function __construct()
    {
        $this->setType('local');
        $this->setTitle("Avec un compte local (ldap/db) ");
        $this->setType(self::TYPE);
    }
}
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -18,13 +18,15 @@ class LocalConnectViewHelperFactory
    {
        /** @var ModuleOptions $moduleOptions */
        $moduleOptions = $container->get('unicaen-auth_module_options');
        $config = $moduleOptions->getDb();
        $config = $moduleOptions->getLocal();

        $enabled = isset($config['enabled']) && (bool) $config['enabled'];
        $title = $config['title'] ?? null;
        $description = $config['description'] ?? null;

        $helper = new LocalConnectViewHelper();
        $helper->setEnabled($enabled);
        $helper->setTitle($title ?? LocalConnectViewHelper::TITLE);
        $helper->setDescription($description);
        $helper->setPasswordReset(true);

+4 −2
Original line number Diff line number Diff line
@@ -13,9 +13,11 @@ use Zend\View\Renderer\PhpRenderer;
 */
class ShibConnectViewHelper extends AbstractConnectViewHelper
{
    const TYPE = 'shib';
    const TITLE = "Via la fédération d'identité";

    public function __construct()
    {
        $this->setType('shib');
        $this->setTitle("Via la fédération d'identité");
        $this->setType(self::TYPE);
    }
}
 No newline at end of file
Loading