Commit a1534b23 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

Do not display empty extra login container (bug #1023791)



Change-Id: I36b2043fb1dd8c65f231157bdab87d5fad05f204
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent 57ad8a36
...@@ -1078,14 +1078,15 @@ function auth_get_login_form() { ...@@ -1078,14 +1078,15 @@ function auth_get_login_form() {
); );
$extraelements = array_merge(array('label' => $loginlabel), $extraelements); $extraelements = array_merge(array('label' => $loginlabel), $extraelements);
} }
$extraelements = array( if (count($extraelements)) {
'login_extra' => array( $extraelements = array(
'type' => 'container', 'login_extra' => array(
'class' => 'login_extra', 'type' => 'container',
'elements' => $extraelements 'class' => 'login_extra',
) 'elements' => $extraelements
); )
);
}
// Replace or supplement the standard login form elements // Replace or supplement the standard login form elements
if ($showbasicform) { if ($showbasicform) {
$elements = array_merge($elements, $extraelements); $elements = array_merge($elements, $extraelements);
...@@ -1803,14 +1804,15 @@ function auth_generate_login_form() { ...@@ -1803,14 +1804,15 @@ function auth_generate_login_form() {
); );
$extraelements = array_merge(array('label' => $loginlabel), $extraelements); $extraelements = array_merge(array('label' => $loginlabel), $extraelements);
} }
$extraelements = array( if (count($extraelements)) {
'login_extra' => array( $extraelements = array(
'type' => 'container', 'login_extra' => array(
'class' => 'login_extra', 'type' => 'container',
'elements' => $extraelements 'class' => 'login_extra',
) 'elements' => $extraelements
); )
);
}
// Replace or supplement the standard login form elements // Replace or supplement the standard login form elements
if ($showbasicform) { if ($showbasicform) {
$elements = array_merge($elements, $extraelements); $elements = array_merge($elements, $extraelements);
......
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