<div class="container">
  <div class="row">
    <div class="col-sm-12">
      <h1>Login</h1>
      <p>Accounts are reset on server restart from <code>server/config/seed.js</code>. Default account is <code>test@example.com</code> / <code>test</code></p>
      <p>Admin account is <code>admin@example.com</code> / <code>admin</code></p>
    </div>
    <div class="col-sm-12">
      <form class="form" name="form" ng-submit="vm.login(form)" novalidate>

        <div class="form-group">
          <label>Email</label>

          <input type="email" name="email" class="form-control" ng-model="vm.user.email" required>
        </div>

        <div class="form-group">
          <label>Password</label>

          <input type="password" name="password" class="form-control" ng-model="vm.user.password" required>
        </div>

        <div class="form-group has-error">
          <p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && vm.submitted">
             Please enter your email and password.
          </p>
          <p class="help-block" ng-show="form.email.$error.email && vm.submitted">
             Please enter a valid email.
          </p>

          <p class="help-block">{{ vm.errors.login }}</p>
        </div>

        <div>
          <button class="btn btn-inverse btn-lg btn-login" type="submit">
            Login
          </button>
          <a class="btn btn-default btn-lg btn-register" <% if (filters.uirouter) { %>ui-sref="signup"<% } else { %>href="/signup"<% } %>>
            Register
          </a>
        </div>
<% if (filters.oauth) { %>
        <hr/>
        <div class="row">
          <div class="col-sm-4 col-md-3">
            <oauth-buttons classes="btn-block"></oauth-buttons>
          </div>
        </div><% } %>
      </form>
    </div>
  </div>
  <hr>
</div>
