silverbux/laravel-angular-admin

View on GitHub
angular/app/components/forgot-password/forgot-password.component.html

Summary

Maintainability
Test Coverage
<form ng-submit="vm.submit()" class="ForgotPassword-form" name="vm.forgotPasswordForm" novalidate>
  <div class="callout callout-danger" ng-if="vm.errorTrigger">
    <h4>Error:</h4>
    <p>Please check your email and try again.</p>
  </div>
  <div class="form-group has-feedback" ng-class="{ 'has-error': (vm.forgotPasswordForm.email.$invalid || vm.serverError) && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched) }">
    <input type="email" class="form-control" placeholder="Please enter your email address" name="email" ng-model="vm.email" ng-required="true" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/">
    <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
    <p ng-show="vm.forgotPasswordForm.email.$error.email  && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched)" class="help-block">This is not a valid email</p>
    <p ng-show="vm.forgotPasswordForm.email.$error.required && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched)" class="help-block">Email is required.</p>
    <p ng-show='vm.serverError' class="help-block">{{ vm.serverError }}</p>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <button type="submit" class="btn btn-primary btn-block btn-flat">
        Submit
      </button>
    </div>
  </div>
</form>