aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-06-16 18:47:20 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-06-16 18:47:30 +0200
commit5bae5f43def0cfb9e301e0d0bd87f4079679f1db (patch)
treeb66e2400e1ea6aed1b896d9ad4e9f823c6e44f06 /server
parente19020d1f3277bbaa9755154b4851c8c5599f830 (diff)
downloadsonarqube-5bae5f43def0cfb9e301e0d0bd87f4079679f1db.tar.gz
sonarqube-5bae5f43def0cfb9e301e0d0bd87f4079679f1db.zip
SONAR-6640 bug fixes
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/less/components.less1
-rw-r--r--server/sonar-web/src/main/less/components/login.less48
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb16
5 files changed, 20 insertions, 63 deletions
diff --git a/server/sonar-web/src/main/less/components.less b/server/sonar-web/src/main/less/components.less
index 929acdc7e74..16ed0181661 100644
--- a/server/sonar-web/src/main/less/components.less
+++ b/server/sonar-web/src/main/less/components.less
@@ -35,7 +35,6 @@
@import "components/navbar";
@import "components/navigator";
@import "components/select-list";
-@import "components/login";
@import "components/graphics";
@import "components/list-groups";
@import "components/panels";
diff --git a/server/sonar-web/src/main/less/components/login.less b/server/sonar-web/src/main/less/components/login.less
deleted file mode 100644
index e9c239f413a..00000000000
--- a/server/sonar-web/src/main/less/components/login.less
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-@import (reference) "../variables";
-@import (reference) "../mixins";
-
-#login_form {
- border: 2px solid #4b9fd5;
- width: 230px;
- text-align: left;
- background-color: #CAE3F2;
- padding: 15px 20px;
-}
-
-#login_form h4 {
- text-align: left;
- font-weight: bold;
- color: #036;
-}
-
-#login_form p {
- padding: 3px 0 10px;
-}
-
-#login_form a {
- border-bottom-color: @blue;
-}
-
-#login_form .desc {
- font-size: 85%;
- font-weight: normal;
-}
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb
index 937886484bb..605eaded72e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb
@@ -1,5 +1,5 @@
-<form action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
- <input type="hidden" name="return_to_anchor" value="">
+<form id="login_form" action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
+ <input type="hidden" name="return_to_anchor" value="<%= @return_to_anchor %>">
<h1 class="maintenance-title text-center">Log In to SonarQube</h1>
@@ -39,6 +39,9 @@
<script>
(function ($) {
$('#login').focus();
- $('[name="return_to_anchor"]').val(window.location.hash);
+ var returnToAnchor = $('[name="return_to_anchor"]');
+ if (!returnToAnchor.val()) {
+ returnToAnchor.val(window.location.hash);
+ }
})(window.jQuery);
</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb
index 937886484bb..605eaded72e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb
@@ -1,5 +1,5 @@
-<form action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
- <input type="hidden" name="return_to_anchor" value="">
+<form id="login_form" action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
+ <input type="hidden" name="return_to_anchor" value="<%= @return_to_anchor %>">
<h1 class="maintenance-title text-center">Log In to SonarQube</h1>
@@ -39,6 +39,9 @@
<script>
(function ($) {
$('#login').focus();
- $('[name="return_to_anchor"]').val(window.location.hash);
+ var returnToAnchor = $('[name="return_to_anchor"]');
+ if (!returnToAnchor.val()) {
+ returnToAnchor.val(window.location.hash);
+ }
})(window.jQuery);
</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb
index cbf0297f4a3..4939c85a416 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb
@@ -6,8 +6,8 @@
<%= error_messages_for :user, :class => 'alert alert-danger', :header_message => nil, :message => nil %>
<div class="big-spacer-bottom">
- <label for="login" class="login-label"><%= message('login') %></label>
- <input type="text" id="login" name="user[login]" class="login-input" maxlength="30" required
+ <label for="user_login" class="login-label"><%= message('login') %></label>
+ <input type="text" id="user_login" name="user[login]" class="login-input" maxlength="30" required
placeholder="<%= message('login') %>">
<p class="note spacer-top spacer-left spacer-right">
<%= message('sessions.old_account', :params => [url_for(:controller => 'sessions', :action => 'new')]) -%>
@@ -15,20 +15,20 @@
</div>
<div class="big-spacer-bottom">
- <label for="name" class="login-label"><%= message('name') %></label>
- <input type="text" id="name" name="user[name]" class="login-input" maxlength="30" required
+ <label for="user_name" class="login-label"><%= message('name') %></label>
+ <input type="text" id="user_name" name="user[name]" class="login-input" maxlength="30" required
placeholder="<%= message('name') %>">
</div>
<p class="big-spacer-bottom">
- <label for="password" class="login-label"><%= message('password') %></label>
- <input type="password" id="password" name="user[password]" class="login-input" required
+ <label for="user_password" class="login-label"><%= message('password') %></label>
+ <input type="password" id="user_password" name="user[password]" class="login-input" required
placeholder="<%= message('password') %>">
</p>
<p class="big-spacer-bottom">
- <label for="password-confirmation" class="login-label"><%= message('sessions.confirm_password') %></label>
- <input type="password" id="password-confirmation" name="user[password_confirmation]" class="login-input" required
+ <label for="user_password_confirmation" class="login-label"><%= message('sessions.confirm_password') %></label>
+ <input type="password" id="user_password_confirmation" name="user[password_confirmation]" class="login-input" required
placeholder="<%= message('sessions.confirm_password') %>">
</p>