
<div class="modal" ng-controller="IdmUserBulkUpdatePopupController">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header-wrapper">
                <div class="modal-header">
                    <button type="button" class="close" ng-click="$hide()">&times;</button>
                    <h2 class="modal-title">{{'IDM.USER-MGMT.POPUP.BULK-UPDATE-TITLE' | translate}}</h2>
                </div>
            </div>

            <div class="modal-body">

                <div class="form-group">
                    <label>{{'IDM.USER-MGMT.POPUP.BULK-UPDATE-NEW-STATUS' | translate}}</label><br />
                    <div class="btn-group">
                        <button type="button" class="btn btn-default dropdown-toggle"
                                data-toggle="dropdown">
                            {{model.updateUsers.status.name}} <i class="caret"></i>
                        </button>
                        <ul class="dropdown-menu pull-left">
                            <li ng-repeat="status in model.statusFilters" ng-if="status.id != 'all'"><a ng-click="setStatus(status)">{{status.name}}</a></li>
                        </ul>
                    </div>
                </div>
                <div class="checkbox">
                    <label>
                        <input type="checkbox" value="" ng-model="model.updateUsers.sendNotifications">
                        {{'IDM.USER-MGMT.POPUP.BULK-UPDATE-EMAIL-NOTIFICATIONS' | translate}}
                    </label>
                </div>
                <div class="well">
                    <p>{{'IDM.USER-MGMT.POPUP.BULK-UPDATE-STATUS-USERS' | translate: getSelectedUsers()}}</p>
                    <ul class="user-list">
                        <li ng-repeat="user in getSelectedUsers()">
                            <i class="glyphicon glyphicon-user"></i> {{user.fullname}} <span>({{user.status}} - {{user.email}})</span>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="modal-footer-wrapper">
                <div class="modal-footer">
                    <div class="pull-right">
                        <button type="button" class="btn btn-sm btn-default" ng-click="$hide()" ng-disabled="model.loading">
                            {{'IDM.USER-MGMT.POPUP.BULK-UPDATE-CANCEL' | translate}}
                        </button>
                        <button type="button" class="btn btn-sm btn-default" ng-click="updateUsers();$hide()" ng-disabled="model.loading || !model.updateUsers.status">
                            {{'IDM.USER-MGMT.POPUP.BULK-UPDATE-CONFIRM' | translate}}
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>