]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6640 bug fixes
authorStas Vilchik <vilchiks@gmail.com>
Tue, 16 Jun 2015 16:47:20 +0000 (18:47 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 16 Jun 2015 16:47:30 +0000 (18:47 +0200)
server/sonar-web/src/main/less/components.less
server/sonar-web/src/main/less/components/login.less [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/users/new.html.erb

index 929acdc7e7479905f15351da50a76b8bf6da5531..16ed01816614b9b067ed4b37a52c4ffb77161c19 100644 (file)
@@ -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 (file)
index e9c239f..0000000
+++ /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;
-}
index 937886484bbbe0512d0fa0f2612eb7204387d2b7..605eaded72e34f06853499601b54454197513c1a 100644 (file)
@@ -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>
index 937886484bbbe0512d0fa0f2612eb7204387d2b7..605eaded72e34f06853499601b54454197513c1a 100644 (file)
@@ -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>
index cbf0297f4a3dee31b178df2cd578fea3984191fd..4939c85a41658dc470f630d0fdead4d84c30bb18 100644 (file)
@@ -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')]) -%>
   </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>