Commit 73257b26 authored by Michael Danielczok's avatar Michael Danielczok

feat: New Attribute for Loigin and RegistrationsSignUp controls: header.

fix: Per default is login container 100% wide, like registrations.
refactor: Code style.
parent 14b4efe4
......@@ -19,6 +19,7 @@
.quiqqer-fu-login-container {
position: relative;
width: 100%;
}
.quiqqer-fu-login-container h2 {
......
......@@ -15,7 +15,9 @@
{else}
<section class="quiqqer-fu-login-container" style="display: none">
<h2>{locale group="quiqqer/frontend-users" var="control.login.title"}</h2>
{if $this->getAttribute('header')}
<h2>{locale group="quiqqer/frontend-users" var="control.login.title"}</h2>
{/if}
<div class="quiqqer-fu-login-social">
{foreach $authenticators as $entry}
......
......@@ -30,12 +30,13 @@ class Login extends QUI\Control
'authenticators' => [],
'Authenticator' => false, // currently executed Registrar
'mail' => true, // show mail authenticator
'passwordReset' => true // show password reset
'passwordReset' => true, // show password reset
'header' => true // show header title
]);
$this->setAttributes($attributes);
$this->addCSSFile(dirname(__FILE__).'/Login.css');
$this->addCSSFile(dirname(__FILE__) . '/Login.css');
$this->addCSSClass('quiqqer-fu-login');
$this->setJavaScriptControl(
......@@ -124,7 +125,7 @@ class Login extends QUI\Control
'showPasswordReset' => $showPasswordReset
]);
return $Engine->fetch(dirname(__FILE__).'/Login.html');
return $Engine->fetch(dirname(__FILE__) . '/Login.html');
}
/**
......
......@@ -12,7 +12,9 @@
{locale group="quiqqer/frontend-users" var="message.types.registration.already_registered"}
</div>
{else}
<h2>{locale group="quiqqer/frontend-users" var="control.registration.sign.up.title"}</h2>
{if $this->getAttribute('header')}
<h2>{locale group="quiqqer/frontend-users" var="control.registration.sign.up.title"}</h2>
{/if}
{if $msgSuccess}
<div class="message-success">
......
......@@ -37,14 +37,15 @@ class RegistrationSignUp extends QUI\Control
'Registrar' => false, // currently executed Registrar
'content' => '', // right content
'registration-trial' => false // use registration trial
'registration-trial' => false, // use registration trial
'header' => true // how header title
]);
$this->setAttributes($attributes);
$this->id = QUI\FrontendUsers\Handler::getInstance()->createRegistrationId();
$this->addCSSFile(\dirname(__FILE__).'/RegistrationSignUp.css');
$this->addCSSFile(\dirname(__FILE__) . '/RegistrationSignUp.css');
$this->addCSSClass('quiqqer-fu-registrationSignUp');
$this->setJavaScriptControl(
......@@ -117,7 +118,7 @@ class RegistrationSignUp extends QUI\Control
]);
$Engine->assign([
'captchaHTML' => $Engine->fetch(\dirname(__FILE__).'/RegistrationSignUp.Captcha.html')
'captchaHTML' => $Engine->fetch(\dirname(__FILE__) . '/RegistrationSignUp.Captcha.html')
]);
// default stuff
......@@ -183,7 +184,7 @@ class RegistrationSignUp extends QUI\Control
case 'userdelete':
$msgSuccess = QUI::getLocale()->get(
'quiqqer/frontend-users',
'RegistrationSignUp.message.success.'.$_GET['success']
'RegistrationSignUp.message.success.' . $_GET['success']
);
$showLoggedInWarning = false;
......@@ -198,7 +199,7 @@ class RegistrationSignUp extends QUI\Control
case 'userdelete':
$msgError = QUI::getLocale()->get(
'quiqqer/frontend-users',
'RegistrationSignUp.message.error.'.$_GET['error']
'RegistrationSignUp.message.error.' . $_GET['error']
);
$showLoggedInWarning = false;
......@@ -231,7 +232,7 @@ class RegistrationSignUp extends QUI\Control
'redirect' => $redirect
]);
return $Engine->fetch(\dirname(__FILE__).'/RegistrationSignUp.html');
return $Engine->fetch(\dirname(__FILE__) . '/RegistrationSignUp.html');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment