<form action="<%= url_for :controller => 'users', :action => 'signup' -%>" method="post">

  <h1 class="maintenance-title text-center">Sign Up to SonarQube</h1>

  <%= error_messages_for :user, :class => 'alert alert-danger', :header_message => nil, :message => nil %>

  <div class="big-spacer-bottom">
    <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')]) -%>
    </p>
  </div>

  <div class="big-spacer-bottom">
    <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="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="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>

  <p class="text-right">
    <button name="commit"><%= message('sessions.sign_up') -%></button>
    <a class="spacer-left" href="<%= home_path -%>"><%= message('cancel') -%></a>
  </p>
</form>

<script>
  (function ($) {
    $('#user_login').focus();
  })(window.jQuery);
</script>
