diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-06-16 18:47:20 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-06-16 18:47:30 +0200 |
commit | 5bae5f43def0cfb9e301e0d0bd87f4079679f1db (patch) | |
tree | b66e2400e1ea6aed1b896d9ad4e9f823c6e44f06 /server/sonar-web/src/main/webapp | |
parent | e19020d1f3277bbaa9755154b4851c8c5599f830 (diff) | |
download | sonarqube-5bae5f43def0cfb9e301e0d0bd87f4079679f1db.tar.gz sonarqube-5bae5f43def0cfb9e301e0d0bd87f4079679f1db.zip |
SONAR-6640 bug fixes
Diffstat (limited to 'server/sonar-web/src/main/webapp')
3 files changed, 20 insertions, 14 deletions
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> |