<div class="editor-container">
  <h4 class="bg-primary">Dealer/Employee Account Login</h4>

  <form name="loginForm" ng-submit="loginForm.$valid && setDealer()" enter-press="loginForm.$valid && setDealer()" novalidate>

    <div class="form-group">
      <input class="form-control" type="email" name="username" placeholder="Username" ng-model="credentials.username" required>
      <p class="help-block" ng-show="loginForm.username.$error.required && loginForm.username.$dirty">Please enter a username.</p>
    </div>


    <div class="form-group">
      <input class="form-control" type="password" name="password" placeholder="Password" ng-model="credentials.password"
             required>
      <p class="help-block" ng-show="loginForm.password.$error.required && loginForm.password.$dirty" >Please enter a password.</p>
    </div>


    <div ng-if="error" ng-bind-html="error"></div>

    <button class="btn btn-primary pull-right" type="submit" ng-disabled="loginForm.$invalid"><i class="fa fa-sign-in"></i> Sign In</button>
  </form>
  <a ng-click="forgot()">Forgot your password?</a>

</div>