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) { ...@@ -42,8 +42,8 @@ if ($this->data['errorcode'] !== null) {
<form action="?" method="post" name="f"> <form action="?" method="post" name="f">
<table> <table>
<tr> <tr>
<td rowspan="2"> <td rowspan="2" id="loginicon">
<img id="loginicon" alt="" <img alt=""
src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /> src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" />
</td> </td>
<td><label for="username"><?php echo $this->t('{login:username}'); ?></label></td> <td><label for="username"><?php echo $this->t('{login:username}'); ?></label></td>
...@@ -58,7 +58,7 @@ if ($this->data['errorcode'] !== null) { ...@@ -58,7 +58,7 @@ if ($this->data['errorcode'] !== null) {
if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) { if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) {
// display the "remember my username" checkbox // display the "remember my username" checkbox
?> ?>
<td> <td id="regular_remember_username">
<input type="checkbox" id="remember_username" tabindex="4" <input type="checkbox" id="remember_username" tabindex="4"
<?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?> <?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?>
name="remember_username" value="Yes"/> name="remember_username" value="Yes"/>
...@@ -68,6 +68,22 @@ if ($this->data['errorcode'] !== null) { ...@@ -68,6 +68,22 @@ if ($this->data['errorcode'] !== null) {
} }
?> ?>
</tr> </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> <tr>
<td><label for="password"><?php echo $this->t('{login:password}'); ?></label></td> <td><label for="password"><?php echo $this->t('{login:password}'); ?></label></td>
<td> <td>
...@@ -77,7 +93,7 @@ if ($this->data['errorcode'] !== null) { ...@@ -77,7 +93,7 @@ if ($this->data['errorcode'] !== null) {
if ($this->data['rememberMeEnabled']) { if ($this->data['rememberMeEnabled']) {
// display the remember me checkbox (keep me logged in) // display the remember me checkbox (keep me logged in)
?> ?>
<td> <td id="regular_remember_me">
<input type="checkbox" id="remember_me" tabindex="5" <input type="checkbox" id="remember_me" tabindex="5"
<?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?> <?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?>
name="remember_me" value="Yes"/> name="remember_me" value="Yes"/>
...@@ -88,6 +104,22 @@ if ($this->data['errorcode'] !== null) { ...@@ -88,6 +104,22 @@ if ($this->data['errorcode'] !== null) {
?> ?>
</tr> </tr>
<?php <?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)) { if (array_key_exists('organizations', $this->data)) {
?> ?>
<tr> <tr>
...@@ -120,16 +152,24 @@ if ($this->data['errorcode'] !== null) { ...@@ -120,16 +152,24 @@ if ($this->data['errorcode'] !== null) {
<?php <?php
} }
?> ?>
<tr> <tr id="regularsubmit">
<td></td><td></td> <td></td><td></td>
<td> <td>
<button id="regularsubmit" class="btn" <button class="btn"
onclick="this.value='<?php echo $this->t('{login:processing}'); ?>'; onclick="this.value='<?php echo $this->t('{login:processing}'); ?>';
this.disabled=true; this.form.submit(); return true;" tabindex="6"> this.disabled=true; this.form.submit(); return true;" tabindex="6">
<?php echo $this->t('{login:login_button}'); ?> <?php echo $this->t('{login:login_button}'); ?>
</button> </button>
</td> </td>
</tr> </tr>
<tr id="mobilesubmit">
<td></td>
<td>
<button class="btn" tabindex="6">
<?php echo $this->t('{login:login_button}'); ?>
</button>
</td>
</tr>
</table> </table>
<?php <?php
foreach ($this->data['stateparams'] as $name => $value) { foreach ($this->data['stateparams'] as $name => $value) {
......
...@@ -368,12 +368,14 @@ caption { ...@@ -368,12 +368,14 @@ caption {
.float-l { .float-l {
float: left; float: left;
} }
#mobilesubmit {
#mobilesubmit, #mobile_remember_username, #mobile_remember_me {
display: none; display: none;
} }
@media handheld, only screen and (max-width: 480px), only screen and (max-device-width: 480px) { @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; display: none;
} }
body { body {
...@@ -395,12 +397,12 @@ caption { ...@@ -395,12 +397,12 @@ caption {
height: 1.5em; height: 1.5em;
font-size: 1em; font-size: 1em;
} }
#mobilesubmit {
display: inline;
}
.youareadmin { .youareadmin {
font-size: 50%; font-size: 50%;
} }
#mobilesubmit, #mobile_remember_username, #mobile_remember_me {
display: table-row;
}
} }
.btn, .btnaddonright { .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