<div class="editor-container">

  <h4 class="bg-primary">Create New User</h4>

  <form name="addUserForm" role="form" ng-submit="doNext()" enter-press="addUserForm.$valid && doNext()" novalidate>

    <div class="form-group">
        <input class="form-control" type="password" name="tempPassword" placeholder="Enter the temporary password" ng-model="user.tempPassword" ng-pattern="/^(?=.*[0-9])(?=.*[A-Z])([A-Z\d]+)$/" required>
    </div>

    <div class="form-group">
        <input class="form-control" type="email" name="email" placeholder="Enter the user's email address" ng-model="user.email" required>
        <p class="help-block" ng-show="addUserForm.email.$invalid && addUserForm.email.$dirty">Please enter a valid email address.</p>
    </div>

    <div class="form-group">
        <input class="form-control" type="text" name="username" placeholder="Enter a username" ng-model="user.username" ng-pattern="/^[a-z0-9](_(?!(\.|_))|\.(?!(_|\.))|[a-z0-9]){4,18}[a-z0-9]$/i" required>
        <p class="help-block" ng-show="addUserForm.username.$error.required && addUserForm.username.$dirty">Please enter a username.</p>
        <p class="help-block" ng-show="addUserForm.username.$error.pattern && addUserForm.username.$dirty">Username must be 4 to 18 characters, containing only alphanumeric characters, periods, and underscores.</p>
    </div>

    <div class="form-group">
        <input class="form-control" type="password" name="password" placeholder="Enter a new password" ng-minlength="8" ng-model="user.password" ng-pattern="/^(?:[0-9]+[a-z]|[a-z]+[0-9])[a-z0-9`\-=\\\[\];',\./~!@#\$%\^&\*\(\)_\+|\{\}:<>\?]*$/i" required>
        <p class="help-block" ng-show="addUserForm.password.$error.pattern && addUserForm.password.$dirty">Your password must be 8 characters long and include 1 letter and number.</p>
        <p class="help-block" ng-show="addUserForm.password.$error.required && addUserForm.password.$dirty">A valid password is required.</p>
    </div>

    <div class="form-group">
        <input class="form-control" type="password" name="confirmedPassword" placeholder="Confirm new password" ng-minlength="8" ng-model="user.confirmedPassword" match="user.password" ng-pattern="/^(?:[0-9]+[a-z]|[a-z]+[0-9])[a-z0-9`\-=\\\[\];',\./~!@#\$%\^&\*\(\)_\+|\{\}:<>\?]*$/i" required>
        <p class="help-block" ng-show="addUserForm.confirmedPassword.$error.match && addUserForm.confirmedPassword.$dirty" >The specified passwords do not match.</p>
        <!-- <p class="help-block" ng-show="addUserForm.confirmedPassword.\$error.required && addUserForm.confirmedPassword.\$dirty">Please confirm your password.</p> -->
    </div>

    <div class="left-and-right">
      <go-back state="send-email"></go-back>
      <button class="btn btn-primary btn-next" type="submit" ng-disabled="addUserForm.$invalid">Next</a>
    </div>
  </form>
</div>