<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main">

    <ul class="nav nav-tabs nav-tabs-pf"  data-ng-show="!create">
        <li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">Attributes</a></li>
        <li class="active"><a href="#/realms/{{realm.realm}}/users/{{user.username}}/user-credentials">Credentials</a></li>
        <li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
        <li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/sessions">Sessions</a></li>
        <li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/users/{{user.username}}/social-links">Social Links</a></li>
    </ul>
    <div id="content">
        <ol class="breadcrumb">
            <li><a href="#/realms/{{realm.realm}}/users">Users</a></li>
            <li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">{{user.username}}</a></li>
            <li class="active">Credentials</li>
        </ol>
        <h2>User <span>{{user.username}}'s</span> Credentials <span tooltip-placement="right" tooltip="This page allows you to reset the user's password with a temporary one that they have to change the first time they log in or it allows you to change the password permanently." class="fa fa-info-circle"></span></h2>

        <form class="form-horizontal" name="userForm" novalidate>
            <fieldset class="border-top">
                <legend><span class="text">Credential Management</span></legend>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="password">Reset password</label>
                    <div class="col-sm-6 kc-multiline">
                        <input class="form-control" type="password" id="password" name="password" data-ng-model="password" placeholder="New password" required>
                        <input class="form-control" type="password" id="confirmPassword" name="confirmPassword" data-ng-model="confirmPassword" placeholder="Password confirmation" required>
                        <button class="btn btn-danger" type="submit" data-ng-click="resetPassword(true)" data-ng-show="password" tooltip="Temporary reset of password.  User will be asked to change it when they log in." tooltip-placement="left">Reset Password</button>
                        <button class="btn btn-danger" type="submit" data-ng-click="resetPassword(false)" data-ng-show="password" tooltip="Change the password of the user." tooltip-placement="right">Change Password</button>
                    </div>
                </div>

                <div class="form-group" data-ng-show="user.email">
                    <label class="col-sm-2 control-label" for="password">Reset password email</label>
                    <div class="col-sm-5">
                        <button class="btn btn-danger" type="submit" data-ng-click="resetPasswordEmail()" tooltip="Send an email to user with a link to reset their password" tooltip-placement="right">Send Email</button>
                    </div>
                </div>

                <div class="form-group" data-ng-show="user.totp">
                    <label class="col-sm-2 control-label" for="password">Remove totp</label>
                    <div class="col-sm-5" data-ng-show="user.totp">
                        <button class="btn btn-danger"  type="submit" data-ng-click="removeTotp()" tooltip="Remove one time password generator for user." tooltip-placement="right">Remove TOTP</button>
                    </div>
                </div>
            </fieldset>
        </form>

    </div>
</div>