<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <form name="addVarForm" role="form" ng-submit="saveUsername(); $hide()" novalidate>
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title"><i class="fa fa-lg fa-exclamation-circle"></i>&nbsp;Change Username / Password</h4>
      </div>
      <div class="modal-body">
        <div class="form-group">
          <label for="username">{{selections.device.varUsername.caption}}:</label>
          <input class="form-control" type="text" name="{{selections.device.varUsername.name}}" ng-model="selections.device.varNewUsername" required>
        </div>

        <div class="form-group">
          <label for="password">{{selections.device.varPassword.caption.split('|')[0]}}:</label>
          <input class="form-control" type="password" name="{{selections.device.varPassword.name}}" ng-model="selections.device.varNewPassword" required>
        </div>

        <div class="form-group">
          <label for="confirmed-password">{{selections.device.varPassword.caption.split('|')[1] ? selections.device.varPassword.caption.split('|')[1] : 'Confirm ' + selections.device.varPassword.name}}:</label>
          <input class="form-control" type="password" name="confirmedPassword" ng-model="selections.device.varConfirmedPassword" match="selections.device.varNewPassword" required>
          <p class="help-block" ng-show="addVarForm.confirmedPassword.$error.match && addVarForm.confirmedPassword.$dirty" >The specified passwords do not match.</p>
        </div>
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary" ng-disabled="addVarForm.$invalid">Save</button>
        <button type="button" class="btn btn-danger" ng-click="$event.stopPropagation();$hide()">Cancel</button>
      </div>
    </div>
    </form>
  </div>
</div>