Skip to content
Snippets Groups Projects
Commit e7c1d8ba authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Resolve #359. The login button was disappearing in mobile devices. Reordered...

Resolve #359. The login button was disappearing in mobile devices. Reordered the form a bit too for those devices, so that the view is better.
parent 79b28c3a
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,8 @@ if ($this->data['errorcode'] !== null) {
<form action="?" method="post" name="f">
<table>
<tr>
<td rowspan="2">
<img id="loginicon" alt=""
<td rowspan="2" id="loginicon">
<img alt=""
src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" />
</td>
<td><label for="username"><?php echo $this->t('{login:username}'); ?></label></td>
......@@ -58,7 +58,7 @@ if ($this->data['errorcode'] !== null) {
if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) {
// display the "remember my username" checkbox
?>
<td>
<td id="regular_remember_username">
<input type="checkbox" id="remember_username" tabindex="4"
<?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?>
name="remember_username" value="Yes"/>
......@@ -68,6 +68,22 @@ if ($this->data['errorcode'] !== null) {
}
?>
</tr>
<?php
if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) {
// display the "remember my username" checkbox
?>
<tr id="mobile_remember_username">
<td>&nbsp;</td>
<td>
<input type="checkbox" id="remember_username" tabindex="4"
<?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?>
name="remember_username" value="Yes"/>
<small><?php echo $this->t('{login:remember_username}'); ?></small>
</td>
</tr>
<?php
}
?>
<tr>
<td><label for="password"><?php echo $this->t('{login:password}'); ?></label></td>
<td>
......@@ -77,7 +93,7 @@ if ($this->data['errorcode'] !== null) {
if ($this->data['rememberMeEnabled']) {
// display the remember me checkbox (keep me logged in)
?>
<td>
<td id="regular_remember_me">
<input type="checkbox" id="remember_me" tabindex="5"
<?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?>
name="remember_me" value="Yes"/>
......@@ -88,6 +104,22 @@ if ($this->data['errorcode'] !== null) {
?>
</tr>
<?php
if ($this->data['rememberMeEnabled']) {
// display the remember me checkbox (keep me logged in)
?>
<tr>
<td></td>
<td id="mobile_remember_me">
<input type="checkbox" id="remember_me" tabindex="5"
<?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?>
name="remember_me" value="Yes"/>
<small><?php echo $this->t('{login:remember_me}'); ?></small>
</td>
</tr>
<?php
}
?>
<?php
if (array_key_exists('organizations', $this->data)) {
?>
<tr>
......@@ -120,16 +152,24 @@ if ($this->data['errorcode'] !== null) {
<?php
}
?>
<tr>
<tr id="regularsubmit">
<td></td><td></td>
<td>
<button id="regularsubmit" class="btn"
<button class="btn"
onclick="this.value='<?php echo $this->t('{login:processing}'); ?>';
this.disabled=true; this.form.submit(); return true;" tabindex="6">
<?php echo $this->t('{login:login_button}'); ?>
</button>
</td>
</tr>
<tr id="mobilesubmit">
<td></td>
<td>
<button class="btn" tabindex="6">
<?php echo $this->t('{login:login_button}'); ?>
</button>
</td>
</tr>
</table>
<?php
foreach ($this->data['stateparams'] as $name => $value) {
......
......@@ -368,12 +368,14 @@ caption {
.float-l {
float: left;
}
#mobilesubmit {
#mobilesubmit, #mobile_remember_username, #mobile_remember_me {
display: none;
}
@media handheld, only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
#header, #languagebar, #footer, .erroricon, #loginicon, .logintext, #regularsubmit {
#header, #languagebar, #footer, .erroricon, #loginicon, .logintext, #regularsubmit,
#regular_remember_username, #regular_remember_me {
display: none;
}
body {
......@@ -395,12 +397,12 @@ caption {
height: 1.5em;
font-size: 1em;
}
#mobilesubmit {
display: inline;
}
.youareadmin {
font-size: 50%;
}
#mobilesubmit, #mobile_remember_username, #mobile_remember_me {
display: table-row;
}
}
.btn, .btnaddonright {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment