diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-30 19:49:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-30 19:49:40 +0000 |
commit | 8ea17100f1bdd79768cc65238c518c7e1fb0771e (patch) | |
tree | 858283f27347c65f0188d8033bd18306981c0996 | |
parent | 12c904e891c5bb94b85ed20403746cbaa4186063 (diff) | |
download | redmine-8ea17100f1bdd79768cc65238c518c7e1fb0771e.tar.gz redmine-8ea17100f1bdd79768cc65238c518c7e1fb0771e.zip |
Replaces the login table with a div.
git-svn-id: http://svn.redmine.org/redmine/trunk@15595 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/account/login.html.erb | 62 | ||||
-rw-r--r-- | public/stylesheets/application.css | 14 | ||||
-rw-r--r-- | public/stylesheets/responsive.css | 2 |
3 files changed, 35 insertions, 43 deletions
diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index f1b96bae3..1440e3227 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -1,43 +1,31 @@ <%= call_hook :view_account_login_top %> + <div id="login-form"> -<%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %> -<%= back_url_hidden_field_tag %> -<table> -<tr> - <td style="text-align:right;"><label for="username"><%=l(:field_login)%>:</label></td> - <td style="text-align:left;"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td> -</tr> -<tr> - <td style="text-align:right;"><label for="password"><%=l(:field_password)%>:</label></td> - <td style="text-align:left;"><%= password_field_tag 'password', nil, :tabindex => '2' %></td> -</tr> -<% if Setting.openid? %> -<tr> - <td style="text-align:right;"><label for="openid_url"><%=l(:field_identity_url)%></label></td> - <td style="text-align:left;"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td> -</tr> -<% end %> -<tr> - <td></td> - <td style="text-align:left;"> - <% if Setting.autologin? %> - <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label> - <% end %> - </td> -</tr> -<tr> - <td style="text-align:left;"> - <% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), lost_password_path %> - <% end %> - </td> - <td style="text-align:right;"> - <input type="submit" name="login" value="<%=l(:button_login)%> »" tabindex="5"/> - </td> -</tr> -</table> -<% end %> + <%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %> + <%= back_url_hidden_field_tag %> + + <label for="username"><%=l(:field_login)%></label> + <%= text_field_tag 'username', params[:username], :tabindex => '1' %> + + <label for="password"> + <%=l(:field_password)%> + <%= link_to l(:label_password_lost), lost_password_path, :class => "lost_password" if Setting.lost_password? %> + </label> + <%= password_field_tag 'password', nil, :tabindex => '2' %> + + <% if Setting.openid? %> + <label for="openid_url"><%=l(:field_identity_url)%></label> + <%= text_field_tag "openid_url", nil, :tabindex => '3' %> + <% end %> + + <% if Setting.autologin? %> + <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label> + <% end %> + + <input type="submit" name="login" value="<%=l(:button_login)%>" tabindex="5" id="login-submit" /> + <% end %> </div> + <%= call_hook :view_account_login_bottom %> <% if params[:username].present? %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 40ca4a4d8..caab43f6b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -116,18 +116,20 @@ html>body #content { min-height: 600px; } #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;} -#login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; } -#login-form table td {padding: 6px;} -#login-form label {font-weight: bold;} -#login-form input#username, #login-form input#password { width: 300px; } +#login-form {margin:5em auto 2em auto; padding:20px; width:340px; border:1px solid #FDBF3B; background-color:#FFEBC1; border-radius:4px; box-sizing: border-box;} +#login-form label {display:block; margin-bottom:5px;} +#login-form input[type=text], #login-form input[type=password] {border:1px solid #ccc; border-radius:3px; margin-bottom:15px; padding:7px; display:block; width:100%; box-sizing: border-box;} +#login-form label {font-weight:bold;} +#login-form label[for=autologin] {font-weight:normal;} +#login-form a.lost_password {float:right; font-weight:normal;} +#login-form input#openid_url {background:#fff url(../images/openid-bg.gif) no-repeat 4px 50%; padding-left:24px !important;} +#login-form input#login-submit {margin-top:15px; padding:7px; display:block; width:100%; box-sizing: border-box;} div.modal { border-radius:5px; background:#fff; z-index:50; padding:4px;} div.modal h3.title {display:none;} div.modal p.buttons {text-align:right; margin-bottom:0;} div.modal .box p {margin: 0.3em 0;} -input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; } - .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } .mobile-show {display: none;} diff --git a/public/stylesheets/responsive.css b/public/stylesheets/responsive.css index 6997d6257..473b3368f 100644 --- a/public/stylesheets/responsive.css +++ b/public/stylesheets/responsive.css @@ -791,5 +791,7 @@ .pagination ul.pages li.current, .pagination ul.pages li.previous, .pagination ul.pages li.next {display:inline-block; width:32%; overflow:hidden;} + + #login-form {width:100%; margin-top:2em;} } |