<div ng-controller="chpassword">
    <script>showMenu("");</script>

    <div class="row">
        <div class="col-sm-38"><h4>Change Password</h4></div>
        <div class="col-sm-10"><p>Version: {{controllerMsg}}</p></div>
    </div>

    <form name="frm" ng-submit="changePassword()">
        <div class="form-group">
            <div class="col-sm-12">
                <input class="form-control" id="userName" name="userName" ng-required="true" ng-minlength="0" ng-model="changePassword.emailAddress" autofocus />
                <div class="text-danger" ng-show="frm.userName.$error.required">Please enter user name</div>
                <div class="text-danger" ng-show="frm.userName.$error.minlength">Please enter valid user name</div>
                <br />
                <input class="form-control" type="password" name="userPassword" ng-required="true" ng-minlength="0" ng-model="changePassword.oldPassword" />
                <div class="text-danger" ng-show="frm.userPassword.$error.required">please enter old password</div>
                <div class="text-danger" ng-show="frm.userPassword.$error.minlength">please enter old password</div>
                <br />
                <input class="form-control" type="password" name="userPassword" ng-required="true" ng-minlength="0" ng-model="changePassword.newPassword" />
                <div class="text-danger" ng-show="frm.userPassword.$error.required">please enter new password</div>
                <div class="text-danger" ng-show="frm.userPassword.$error.minlength">please enter new password</div>
                <br />
                <input class="form-control" type="password" name="userPassword" ng-required="true" ng-minlength="0" ng-model="changePassword.retypePassword" />
                <div class="text-danger" ng-show="frm.userPassword.$error.required">please retype new password</div>
                <div class="text-danger" ng-show="frm.userPassword.$error.minlength">please retype new password</div>
                <br />
                <button type="button" class="btn btn-default" ng-click="close()">Close</button>
                <button type="submit" class="btn btn-default" ng-disabled="frm.$invalid">Change</button>
                <div class="text-danger" ng-show="loginForm.loginFailure">Invalid username or password</div>
            </div>
        </div>
    </form>
</div>